Skip to content

Commit

Permalink
Update tray and fix show/hide app
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed May 29, 2022
1 parent 1172ad9 commit 9652523
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
6 changes: 3 additions & 3 deletions languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module.exports = {
},

"tray": {
"show_app": "Show App",
"hide_app": "Hide App",
"show_app": "Show Authme",
"hide_app": "Hide Authme",
"settings": "Settings",
"exit_app": "Exit App",
"exit_app": "Exit Authme",
},

"menu": {
Expand Down
20 changes: 7 additions & 13 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ let authenticated = false
let shortcuts = false
let update_seen = false
let manual_update = false
let password_buffer = null
let tray = null
let menu = null
let /** @type{Buffer} */ password_buffer = null
let /** @type{Tray} */ tray = null
let /** @type{Menu} */ menu = null
let lang = en

/**
Expand Down Expand Up @@ -941,12 +941,12 @@ app.whenReady()

codes_shown = true
}
}, 100)

authenticated = true
authenticated = true

createTray()
createMenu()
createTray()
createMenu()
}, 100)
}
})
}
Expand Down Expand Up @@ -1539,12 +1539,6 @@ power.on("lock-screen", () => {
*/
const createTray = () => {
const contextmenu = Menu.buildFromTemplate([
{
label: `Authme (${authme_version})`,
enabled: false,
icon: path.join(__dirname, "img/traymenu.png"),
},
{ type: "separator" },
{
label: codes_shown ? lang.tray.hide_app : lang.tray.show_app,
accelerator: shortcuts ? "" : settings.global_shortcuts.show,
Expand Down

0 comments on commit 9652523

Please sign in to comment.