Skip to content

Commit

Permalink
Update UI transitions and add delay before invoking functions
Browse files Browse the repository at this point in the history
  • Loading branch information
LyubomirT committed Jan 27, 2024
1 parent f625737 commit f0f2703
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
15 changes: 12 additions & 3 deletions renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,23 @@ ctmnHelp.addEventListener('click', () => {

// In the help context menu, add a click event listener to the "Handbook" button
document.getElementById('handbook-button').addEventListener('click', () => {
document.body.style.transform = 'scale(0)'
// Open the handbook in the default browser
ipcRenderer.invoke('open-handbook')
setTimeout(() => {
ipcRenderer.invoke('open-handbook')
}, 400)
})

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

aboutButton.addEventListener('click', () => {
ipcRenderer.invoke('not-implemented')
document.body.style.transform = 'scale(0)'
setTimeout(() => {
ipcRenderer.invoke('not-implemented')
}, 400)
})
5 changes: 5 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ body *:not(#note-content):not(#note-title) {
user-select: none;
}

body {
transform: scale(1);
transition:all cubic-bezier(1, 0, 0, 1) 0.3s;
}

/* Set the background color and height for the title bar */
#title-bar {
background-color: #333;
Expand Down

0 comments on commit f0f2703

Please sign in to comment.