Skip to content

Commit

Permalink
fix(HelpModal): Migrate to NcDialog, fix padding
Browse files Browse the repository at this point in the history
Fixes: #5456

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Mar 14, 2024
1 parent e61a6da commit 4b4bdb5
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 4b4bdb5

Please sign in to comment.