Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(HelpModal): Migrate to NcDialog, fix padding #5488

Merged
merged 1 commit into from
Mar 15, 2024
Merged
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
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
Loading