Skip to content

Commit

Permalink
Merge pull request #2312 from nextcloud/fix/modal_height
Browse files Browse the repository at this point in the history
Fix modal heights
  • Loading branch information
juliusknorr authored Apr 19, 2022
2 parents dbe4406 + cbc0ec1 commit 6f5e192
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 42 deletions.
4 changes: 2 additions & 2 deletions js/editor-collab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-collab.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/editor-rich.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-rich.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/files-modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/files-modal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/components/EditorWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ export default {
max-width: 100%;
height: 100%;
left: 0;
top: 50px;
margin: 0 auto;
position: relative;
background-color: var(--color-main-background);
Expand Down
17 changes: 3 additions & 14 deletions src/components/HelpModal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Modal size="large"
<Modal size="normal"
:title="t('text', 'Formatting help')"
@close="$emit('close')">
<h2>{{ t('text', 'Formatting help') }}</h2>
Expand Down Expand Up @@ -204,26 +204,15 @@ export default {

<style lang="scss" scoped>
::v-deep .modal-wrapper {
// TODO: can be removed once migrated to @nextcloud-vue >= 5.0
.prev, .next {
display: none !important;
}
.modal-container {
// TODO: can be removed once migrated to @nextcloud-vue >= 5.0
overflow: auto;
// Diverge from upstream modal styling
padding: 30px 40px 20px;
user-select: text;
}
// TODO: can be removed once migrated to @nextcloud-vue >= 5.0
// Make modal full screen on mobile
// Remove padding-right on mobile, screen might not be wide enough
@media only screen and (max-width: 512px) {
.modal-container {
position: absolute;
top: var(--header-height);
height: calc(100% - var(--header-height));
padding: 30px 0px 20px 40px;
}
}
}
Expand Down
12 changes: 9 additions & 3 deletions src/components/ViewerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,15 @@ export default {
},
}
</script>
<style>
<style lang="scss">
#editor-container {
height: calc(100% - 50px);
top: 50px;
top: var(--header-height);
}

@media only screen and (max-width: 512px) {
// on mobile, modal-container has top: 50px
#editor-container {
top: auto;
}
}
</style>

0 comments on commit 6f5e192

Please sign in to comment.