Skip to content

Commit 53dcee3

Browse files
committed
AppHelp: Merge into settings dialog
Signed-off-by: Jonathan Pagel <jonny_tischbein@systemli.org>
1 parent 1545268 commit 53dcee3

File tree

3 files changed

+45
-203
lines changed

3 files changed

+45
-203
lines changed

src/App.vue

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@
1717
@category-selected="onSelectCategory"
1818
@note-deleted="onNoteDeleted"
1919
/>
20-
<NcAppNavigationItem
21-
:title="t('notes', 'Help')"
22-
:pinned="true"
23-
@click.prevent="openHelp"
24-
>
25-
<InfoIcon slot="icon" :size="20" />
26-
</NcAppNavigationItem>
27-
<AppHelp :open.sync="helpVisible" />
2820
</template>
2921

3022
<template #footer>
@@ -71,7 +63,6 @@ import CogIcon from 'vue-material-design-icons/Cog.vue'
7163
7264
import AppSettings from './components/AppSettings.vue'
7365
import NavigationList from './components/NavigationList.vue'
74-
import AppHelp from './components/AppHelp.vue'
7566
import EditorHint from './components/Modal/EditorHint.vue'
7667
7768
import { config } from './config.js'
@@ -82,7 +73,6 @@ export default {
8273
name: 'App',
8374
8475
components: {
85-
AppHelp,
8676
AppSettings,
8777
EditorHint,
8878
InfoIcon,
@@ -110,7 +100,6 @@ export default {
110100
undoTimer: null,
111101
deletedNotes: [],
112102
refreshTimer: null,
113-
helpVisible: false,
114103
editorHint: loadState('notes', 'editorHint', '') === 'yes' && window.OCA.Text?.createEditor,
115104
settingsVisible: false,
116105
}
@@ -259,10 +248,6 @@ export default {
259248
}
260249
},
261250
262-
openHelp() {
263-
this.helpVisible = true
264-
},
265-
266251
openSettings() {
267252
this.settingsVisible = true
268253
},

src/components/AppHelp.vue

Lines changed: 0 additions & 188 deletions
This file was deleted.

src/components/AppSettings.vue

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
:open="settingsOpen"
77
@update:open="setSettingsOpen($event)"
88
>
9+
<NcAppSettingsSection id="help-basics" :title="t('notes', 'Basics')">
10+
<div class="feature icon-add">
11+
{{ t('notes', 'Start writing a note by clicking on “{newnote}” in the app navigation.', { newnote: t('notes', 'New note') }) }}
12+
</div>
13+
<div class="feature icon-fullscreen">
14+
{{ t('notes', 'Write down your thoughts without any distractions.') }}
15+
</div>
16+
<div class="feature icon-files-dark">
17+
{{ t('notes', 'Organize your notes in categories.') }}
18+
</div>
19+
</NcAppSettingsSection>
920
<NcAppSettingsSection id="notes-path-section" :title="t('notes', 'Notes path')">
1021
<p class="app-settings-section__desc">
1122
{{ t('notes', 'Folder to store your notes') }}
@@ -48,6 +59,24 @@
4859
</option>
4960
</select>
5061
</NcAppSettingsSection>
62+
<NcAppSettingsSection id="help-shortcuts" :title="t('notes', 'Shortcuts')">
63+
<div class="feature icon-toggle-filelist">
64+
{{ t('notes', 'Use shortcuts to quickly navigate this app.') }}
65+
</div>
66+
<table class="notes-help">
67+
<tr>
68+
<th>{{ t('notes', 'Shortcut') }}</th>
69+
<th>{{ t('notes', 'Action') }}</th>
70+
</tr>
71+
<tr v-for="(item, index) in shortcuts" :key="index">
72+
<td>{{ item.shortcut }}</td>
73+
<td>{{ item.action }}</td>
74+
</tr>
75+
</table>
76+
</NcAppSettingsSection>
77+
<NcAppSettingsSection id="help-apps" :title="t('notes', 'Mobile apps')">
78+
<HelpMobile />
79+
</NcAppSettingsSection>
5180
</NcAppSettingsDialog>
5281
</template>
5382

@@ -59,13 +88,15 @@ import {
5988
6089
import { setSettings } from '../NotesService.js'
6190
import store from '../store.js'
91+
import HelpMobile from './HelpMobile.vue'
6292
6393
export default {
6494
name: 'AppSettings',
6595
6696
components: {
6797
NcAppSettingsDialog,
6898
NcAppSettingsSection,
99+
HelpMobile,
69100
},
70101
71102
props: {
@@ -86,6 +117,20 @@ export default {
86117
],
87118
saving: false,
88119
settingsOpen: this.open,
120+
shortcuts: [
121+
{ shortcut: t('notes', 'CTRL') + '+B', action: t('notes', 'Make the selection bold') },
122+
{ shortcut: t('notes', 'CTRL') + '+I', action: t('notes', 'Make the selection italic') },
123+
{ shortcut: t('notes', 'CTRL') + '+\'', action: t('notes', 'Wrap the selection in quotes') },
124+
{ shortcut: t('notes', 'CTRL') + '+' + t('notes', 'ALT') + '+C', action: t('notes', 'The selection will be turned into monospace') },
125+
{ shortcut: t('notes', 'CTRL') + '+E', action: t('notes', 'Remove any styles from the selected text') },
126+
{ shortcut: t('notes', 'CTRL') + '+L', action: t('notes', 'Makes the current line a list element') },
127+
{ shortcut: t('notes', 'CTRL') + '+' + t('notes', 'ALT') + '+L', action: t('notes', 'Makes the current line a list element with a number') },
128+
{ shortcut: t('notes', 'CTRL') + '+H', action: t('notes', 'Toggle heading for current line') },
129+
{ shortcut: t('notes', 'CTRL') + '+' + t('notes', 'SHIFT') + '+H', action: t('notes', 'Set the current line as a big heading') },
130+
{ shortcut: t('notes', 'CTRL') + '+K', action: t('notes', 'Insert link') },
131+
{ shortcut: t('notes', 'CTRL') + '+' + t('notes', 'ALT') + '+I', action: t('notes', 'Insert image') },
132+
{ shortcut: t('notes', 'CTRL') + '+/', action: t('notes', 'Switch between editor and viewer') },
133+
],
89134
}
90135
},
91136

0 commit comments

Comments
 (0)