diff --git a/src/lib/components/EditorTitle.svelte b/src/lib/components/EditorTitle.svelte index 18db75a..ec9ccc7 100644 --- a/src/lib/components/EditorTitle.svelte +++ b/src/lib/components/EditorTitle.svelte @@ -60,5 +60,4 @@ maxlength={24} {readonly} /> - .txt diff --git a/src/lib/components/MenuBar.svelte b/src/lib/components/MenuBar.svelte index 6de89e7..62900c9 100644 --- a/src/lib/components/MenuBar.svelte +++ b/src/lib/components/MenuBar.svelte @@ -5,6 +5,7 @@ import { editors } from '@/store/store'; import { fade } from 'svelte/transition'; import { NotepadHelper } from '@/helpers/notepad-helper'; + import { isTauri } from '$lib'; interface MenuItems { label: string; @@ -24,10 +25,10 @@ items: [ { label: 'New', - shortcut: 'Ctrl+Alt+N', - onClick: NotepadHelper.openFile + shortcut: isTauri ? 'Ctrl+N' : 'Ctrl+Alt+N', + onClick: NotepadHelper.createNew }, - { label: 'Open...', shortcut: 'Ctrl+O' }, + { label: 'Open...', shortcut: 'Ctrl+O', onClick: NotepadHelper.openFile }, { label: 'Save', shortcut: 'Ctrl+S' }, { label: 'Save as...' }, { type: 'separator' }, @@ -113,7 +114,7 @@ {#if !isXS && !tabsMode}