Skip to content

Commit

Permalink
Merge pull request #5488 from nextcloud/fix/formatting_help_dialog
Browse files Browse the repository at this point in the history
fix(HelpModal): Migrate to `NcDialog`, fix padding
  • Loading branch information
mejo- authored Mar 15, 2024
2 parents c8b1e9e + 4b4bdb5 commit 093ad0d
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions src/components/HelpModal.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<template>
<NcModal size="normal"
<NcDialog size="normal"
data-text-el="formatting-help"
:name="t('text', 'Formatting help')"
@close="$emit('close')">
:close-on-click-outside="true"
@closing="$emit('close')">
<h2>{{ t('text', 'Formatting help') }}</h2>
<p>{{ t('text', 'Speed up your writing with simple shortcuts.') }}</p>
<p v-if="!isMobileCached">
Expand Down Expand Up @@ -175,17 +176,17 @@
</tr>
</tbody>
</table>
</NcModal>
</NcDialog>
</template>

<script>
import { NcModal } from '@nextcloud/vue'
import { NcDialog } from '@nextcloud/vue'
import { isMobilePlatform } from '../helpers/platform.js'
export default {
name: 'HelpModal',
components: {
NcModal,
NcDialog,
},
data() {
return {
Expand Down Expand Up @@ -222,22 +223,6 @@ export default {
</script>

<style lang="scss" scoped>
:deep(.modal-wrapper) {
.modal-container {
width: max-content;
padding: 30px 40px 20px;
user-select: text;
}
// Remove padding-right on mobile, screen might not be wide enough
@media only screen and (max-width: 512px) {
.modal-container {
width: inherit;
padding: 10px 0;
}
}
}
table {
margin-top: 24px;
border-collapse: collapse;
Expand Down

0 comments on commit 093ad0d

Please sign in to comment.