Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions src/components/HelpModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-->

<template>
<NcDialog size="normal"
<NcDialog size="large"
data-text-el="formatting-help"
:name="t('text', 'Formatting and shortcuts')"
:close-on-click-outside="true"
Expand Down Expand Up @@ -53,7 +53,7 @@
<td>{{ t('text', 'Bold') }}</td>
<td><code>**{{ t('text', 'Bold text') }}**</code></td>
<td v-if="!isMobileCached">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>B</kbd>
</td>
Expand All @@ -62,7 +62,7 @@
<td>{{ t('text', 'Italic') }}</td>
<td><code>*{{ t('text', 'Italicized text') }}*</code></td>
<td v-if="!isMobileCached">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>I</kbd>
</td>
Expand All @@ -71,7 +71,7 @@
<td>{{ t('text', 'Strikethrough') }}</td>
<td><code>~~{{ t('text', 'Mistaken text') }}~~</code></td>
<td v-if="!isMobileCached">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>{{ t('text', 'Shift') }}</kbd>
+
Expand All @@ -82,7 +82,7 @@
<td>{{ t('text', 'Underline') }}</td>
<td><code>__{{ t('text', 'Underlined text') }}__</code></td>
<td v-if="!isMobileCached">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>U</kbd>
</td>
Expand All @@ -95,7 +95,7 @@
<code># {{ t('text', 'Heading level 1') }}</code>
</td>
<td v-if="!isMobileCached" class="ellipsis_top">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>{{ t('text', 'Shift') }}</kbd>
+
Expand All @@ -121,7 +121,7 @@
<code>###### {{ t('text', 'Heading level 6') }}</code>
</td>
<td v-if="!isMobileCached" class="noborder ellipsis_bottom">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>{{ t('text', 'Shift') }}</kbd>
+
Expand All @@ -134,7 +134,7 @@
<code>* {{ t('text', 'An item') }}</code>
</td>
<td v-if="!isMobileCached">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>{{ t('text', 'Shift') }}</kbd>
+
Expand All @@ -147,7 +147,7 @@
<code>1. {{ t('text', 'First item') }}</code>
</td>
<td v-if="!isMobileCached">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>{{ t('text', 'Shift') }}</kbd>
+
Expand All @@ -159,15 +159,21 @@
<td>
<code>* [] {{ t('text', 'To-Do item') }}</code>
</td>
<td v-if="!isMobileCached" />
<td v-if="!isMobileCached">
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>{{ t('text', 'Shift') }}</kbd>
+
<kbd>9</kbd>
</td>
</tr>
<tr>
<td>{{ t('text', 'Blockquote') }}</td>
<td>
<code>> {{ t('text', 'Quoted text') }}</code>
</td>
<td v-if="!isMobileCached">
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>></kbd>
</td>
Expand Down Expand Up @@ -221,23 +227,23 @@
<tr>
<td>{{ t('text', 'Undo') }}</td>
<td>
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>Z</kbd>
</td>
</tr>
<tr>
<td>{{ t('text', 'Redo') }}</td>
<td>
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>Y</kbd>
</td>
</tr>
<tr>
<td>{{ t('text', 'Toggle outline') }}</td>
<td>
<kbd>{{ t('text', 'Ctrl') }}</kbd>
<kbd>{{ ctrlOrModKey }}</kbd>
+
<kbd>{{ t('text', 'Alt') }}</kbd>
+
Expand All @@ -252,6 +258,7 @@
<script>
import { NcDialog } from '@nextcloud/vue'
import { isMobilePlatform } from '../helpers/platform.js'
import { TRANSLATIONS, MODIFIERS } from './Menu/keys.js'

Check warning on line 261 in src/components/HelpModal.vue

View check run for this annotation

Codecov / codecov/patch

src/components/HelpModal.vue#L261

Added line #L261 was not covered by tests

export default {
name: 'HelpModal',
Expand All @@ -272,6 +279,7 @@
blockQuote: true,
codeBlock: true,
},
ctrlOrModKey: TRANSLATIONS[MODIFIERS.Mod],

Check warning on line 282 in src/components/HelpModal.vue

View check run for this annotation

Codecov / codecov/patch

src/components/HelpModal.vue#L282

Added line #L282 was not covered by tests
}
},
computed: {
Expand All @@ -296,6 +304,7 @@
table {
margin-top: 24px;
border-collapse: collapse;
width: 100%;

tbody tr {
&:hover, &:focus, &:active {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const MODIFIERS = {
}

const TRANSLATIONS = {
[MODIFIERS.Mod]: isMac ? t('text', 'Command') : t('text', 'Control'),
[MODIFIERS.Mod]: isMac ? t('text', 'Command') : t('text', 'Ctrl'),
[MODIFIERS.Control]: t('text', 'Ctrl'),
[MODIFIERS.Alt]: t('text', isMac ? 'Option' : 'Alt'),
[MODIFIERS.Shift]: t('text', 'Shift'),
Expand Down
1 change: 1 addition & 0 deletions src/components/Suggestion/Mention/suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
sessionId: session.id,
sessionToken: session.token,
mention: props.id,
scope: window.location,

Check warning on line 20 in src/components/Suggestion/Mention/suggestions.js

View check run for this annotation

Codecov / codecov/patch

src/components/Suggestion/Mention/suggestions.js#L20

Added line #L20 was not covered by tests
})
}

Expand Down
Loading