Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Commit

Permalink
translation section for update notification
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Apr 30, 2022
1 parent db522bf commit f8c75c0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,7 @@
"alertUserTaken": "Username is taken",
"alertPassMismatch": "Password and password confirmation do not match",
"alertAuthNoRegister": "Authentication is disabled, no need to register!",
"alertRegisterSuccess": "Registration successful!"
"alertRegisterSuccess": "Registration successful!",

"updateNotifText": "A new update is available! Newest version: "
}
4 changes: 2 additions & 2 deletions resources/js/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ async function checkForUpdates() {
return latest
}

async function displayUpdate(version) {
async function displayUpdate() {
const latest = await checkForUpdates()
const versionDisplay = document.querySelector('#newestVersion')
const notif = document.querySelector('#downloadNotif')

//if (latest === `v${NL_APPVERSION}`) return
if (latest === `v${NL_APPVERSION}`) return

versionDisplay.innerText = latest

Expand Down
3 changes: 3 additions & 0 deletions resources/js/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,7 @@ async function doTranslation() {
set('loginPopupContentBodyBtnLogin', 'authLoginBtn')
set('loginPopupContentBodyBtnRegister', 'authRegisterBtn')
set('noLoginBtn', 'launchWithoutAuth')

// update notification
set('updateNotifText', 'updateNotifText')
}
4 changes: 2 additions & 2 deletions resources/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -551,13 +551,13 @@ a {

padding: 1em;
top: 80%;
left: 110%;
left: 120%;
width: 20%;
border-radius: 5px;

text-align: center;

transition: left 0.4s ease-in-out;
transition: left 0.5s ease-in-out;
}

#downloadNotif:hover {
Expand Down

0 comments on commit f8c75c0

Please sign in to comment.