Skip to content

Commit

Permalink
fix: toast display on mark current page
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiksta committed Aug 30, 2024
1 parent ce59c8a commit 239caca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
9 changes: 0 additions & 9 deletions src/renderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,6 @@ async function main() {
}
});

document.addEventListener('keyup', e => {
if (!e.altKey) return;
switch (e.key) {
case 'ArrowLeft': wournal.api.jumplistPrev(); break;
case 'ArrowRight': wournal.api.jumplistNext(); break;
case 'ArrowDown': wournal.api.jumplistMark(); break;
}
});

document.body.appendChild(wournal);
maybeLoadArgvDoc(wournal, await ApiClient["process:argv"](), true);
LOG.info('Startup Complete')
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/wournal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1124,20 +1124,20 @@ export default class Wournal extends Component {
'jumplist_prev': {
human_name: 'Jump to Previous Marked Position',
func: () => this.api.jumplistPrev(),
shortcut: 'Alt+LeftArrow',
shortcut: 'Alt+ArrowLeft',
},
'jumplist_next': {
human_name: 'Jump to Next Marked Position',
func: () => this.api.jumplistNext(),
shortcut: 'Alt+RightArrow',
shortcut: 'Alt+ArrowRight',
},
'jumplist_mark': {
human_name: 'Mark Current Position',
func: () => {
this.toast.open('Current Position Marked');
this.api.jumplistMark();
this.toast.open('Current Position Marked');
},
shortcut: 'Alt+DownArrow',
shortcut: 'Alt+ArrowDown',
},

'tab_next': {
Expand Down

0 comments on commit 239caca

Please sign in to comment.