Skip to content

Commit

Permalink
Show max passwords stored per user
Browse files Browse the repository at this point in the history
  • Loading branch information
zigazajc007 committed Jul 12, 2022
1 parent c205276 commit 6b3bfcd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "passky-main-website",
"version": "3.1.0",
"version": "3.2.0",
"description": "Main website for Passky (password manager)",
"main": "index.js",
"scripts": {
Expand All @@ -17,6 +17,6 @@
},
"homepage": "https://github.com/Rabbit-Company/Passky-Main-Website#readme",
"devDependencies": {
"tailwindcss": "^3.1.4"
"tailwindcss": "^3.1.5"
}
}
}
2 changes: 1 addition & 1 deletion website/css/tailwind.min.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com
! tailwindcss v3.1.6 | MIT License | https://tailwindcss.com
*/

/*
Expand Down
10 changes: 5 additions & 5 deletions website/js/servers.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ for(let i = 0; i < Object.values(servers).length; i++){
let json = JSON.parse(jsonData);
latencies.push(Number(latency));
document.getElementById("srv-accounts-" + i).innerText = json.users + "/" + json.maxUsers;
document.getElementById("srv-passwords-" + i).innerText = json.passwords + "/" + (json.maxPasswords * json.maxUsers);
document.getElementById("srv-passwords-" + i).innerText = json.passwords + " (" + json.maxPasswords + ")";
document.getElementById("srv-version-" + i).innerText = json.version;
document.getElementById("srv-latency-" + i).innerText = Number(latency) + " ms";
document.getElementById("srv-status-" + i).innerText = "Online";
Expand Down Expand Up @@ -105,7 +105,7 @@ function fetchServerInfo(i){
localStorage.setItem("latency-" + i, latency);
localStorage.setItem("time-" + i, Date.now());
document.getElementById("srv-accounts-" + i).innerText = json.users + "/" + json.maxUsers;
document.getElementById("srv-passwords-" + i).innerText = json.passwords + "/" + (json.maxPasswords * json.maxUsers);
document.getElementById("srv-passwords-" + i).innerText = json.passwords + " (" + json.maxPasswords + ")";
document.getElementById("srv-version-" + i).innerText = json.version;
document.getElementById("srv-latency-" + i).innerText = latency + " ms";
document.getElementById("srv-status-" + i).innerText = "Online";
Expand Down Expand Up @@ -158,8 +158,8 @@ document.getElementById("server-stats-btn").addEventListener("click", () => {
document.getElementById("stats-accounts-text").innerText = json.users + " / " + json.maxUsers;
document.getElementById("stats-accounts-bar").style = "width: " + (json.users/json.maxUsers)*100 + "%";

document.getElementById("stats-passwords-text").innerText = json.passwords + " / " + (json.maxUsers*json.maxPasswords);
document.getElementById("stats-passwords-bar").style = "width: " + (json.passwords/(json.maxUsers*json.maxPasswords))*100 + "%";
document.getElementById("stats-passwords-text").innerText = json.passwords + " (" + json.maxPasswords + ")";
document.getElementById("stats-passwords-bar").style = "width: 0%";

document.getElementById("stats-version-text").innerText = json.version;
}else{
Expand Down Expand Up @@ -192,7 +192,7 @@ function resetInfoStats(){
document.getElementById("stats-accounts-text").innerText = "0 / 0";
document.getElementById("stats-accounts-bar").style = "width: 0%";

document.getElementById("stats-passwords-text").innerText = "0 / 0";
document.getElementById("stats-passwords-text").innerText = "0 (0)";
document.getElementById("stats-passwords-bar").style = "width: 0%";

document.getElementById("stats-version-text").innerText = "0.0.0";
Expand Down

0 comments on commit 6b3bfcd

Please sign in to comment.