Skip to content

Commit

Permalink
Hide context menu help and update button click events
Browse files Browse the repository at this point in the history
  • Loading branch information
LyubomirT committed Jan 27, 2024
1 parent f0f2703 commit 078067e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ ctmnHelp.addEventListener('click', () => {

// In the help context menu, add a click event listener to the "Handbook" button
document.getElementById('handbook-button').addEventListener('click', () => {
// Hide the context menu help
contextMenuHelp.setAttribute('state', 'hidden')
ctmnHelp.setAttribute('state', 'hidden')
document.body.style.transform = 'scale(0)'
// Open the handbook in the default browser
setTimeout(() => {
Expand All @@ -305,14 +308,15 @@ document.getElementById('handbook-button').addEventListener('click', () => {
})

githubButton.addEventListener('click', () => {
document.body.style.transform = 'scale(0)'
setTimeout(() => {
ipcRenderer.invoke('open-link', 'https://github.com/LyubomirT/remembered')
}, 400)
contextMenuHelp.setAttribute('state', 'hidden')
ctmnHelp.setAttribute('state', 'hidden')
ipcRenderer.invoke('open-link', 'https://github.com/LyubomirT/remembered')
})

aboutButton.addEventListener('click', () => {
document.body.style.transform = 'scale(0)'
contextMenuHelp.setAttribute('state', 'hidden')
ctmnHelp.setAttribute('state', 'hidden')
setTimeout(() => {
ipcRenderer.invoke('not-implemented')
}, 400)
Expand Down

0 comments on commit 078067e

Please sign in to comment.