diff options
author | zeroinformatique | 2023-03-26 19:46:10 +0200 |
---|---|---|
committer | GitHub | 2023-03-26 19:46:10 +0200 |
commit | 713103575e5ee58fec6fdf5e65975a284807327f (patch) | |
tree | 378cc58f28d722aab4ab27684847648e7d273681 /viewer/src/views/item_handlers | |
parent | 64f3ee483b2148c773a404ca296836f7259a9670 (diff) | |
parent | ca9cb0d767c6dda5e73290d588d4d21b30adf198 (diff) | |
download | ldgallery-713103575e5ee58fec6fdf5e65975a284807327f.tar.gz |
Merge pull request #361 from ldgallery/oz-fix-txt-scroll
viewer: cannot scroll in text viewer
Diffstat (limited to 'viewer/src/views/item_handlers')
-rw-r--r-- | viewer/src/views/item_handlers/PictureViewer.vue | 2 | ||||
-rw-r--r-- | viewer/src/views/item_handlers/PlainTextViewer.vue | 29 |
2 files changed, 9 insertions, 22 deletions
diff --git a/viewer/src/views/item_handlers/PictureViewer.vue b/viewer/src/views/item_handlers/PictureViewer.vue index 74b978f..d091f19 100644 --- a/viewer/src/views/item_handlers/PictureViewer.vue +++ b/viewer/src/views/item_handlers/PictureViewer.vue | |||
@@ -18,12 +18,14 @@ | |||
18 | --> | 18 | --> |
19 | 19 | ||
20 | <template> | 20 | <template> |
21 | <!-- @dragstart.prevent stops Drag 'n Drop of pictures on FireFox --> | ||
21 | <div | 22 | <div |
22 | ref="containerElement" | 23 | ref="containerElement" |
23 | v-dragscroll | 24 | v-dragscroll |
24 | class="scrollbar" | 25 | class="scrollbar" |
25 | :class="$style.pictureContainer" | 26 | :class="$style.pictureContainer" |
26 | @dblclick="uiStore.toggleFullscreen()" | 27 | @dblclick="uiStore.toggleFullscreen()" |
28 | @dragstart.prevent="false" | ||
27 | > | 29 | > |
28 | <img | 30 | <img |
29 | v-if="!error" | 31 | v-if="!error" |
diff --git a/viewer/src/views/item_handlers/PlainTextViewer.vue b/viewer/src/views/item_handlers/PlainTextViewer.vue index 2ab429a..96c4d4c 100644 --- a/viewer/src/views/item_handlers/PlainTextViewer.vue +++ b/viewer/src/views/item_handlers/PlainTextViewer.vue | |||
@@ -19,17 +19,12 @@ | |||
19 | --> | 19 | --> |
20 | 20 | ||
21 | <template> | 21 | <template> |
22 | <!-- Outer div necessary for the resize handle to appear on Firefox. --> | 22 | <pre |
23 | <div | 23 | v-if="isFinished" |
24 | :class="$style.content" | 24 | :class="$style.content" |
25 | class="fill" | 25 | v-text="data" |
26 | > | 26 | /> |
27 | <pre | 27 | <LdLoading v-else /> |
28 | v-if="isFinished" | ||
29 | v-text="data" | ||
30 | /> | ||
31 | <LdLoading v-else /> | ||
32 | </div> | ||
33 | </template> | 28 | </template> |
34 | 29 | ||
35 | <script setup lang="ts"> | 30 | <script setup lang="ts"> |
@@ -51,19 +46,9 @@ const { isFinished, data } = useFetch(itemResourceUrl).text(); | |||
51 | @import "~@/assets/scss/theme"; | 46 | @import "~@/assets/scss/theme"; |
52 | 47 | ||
53 | .content { | 48 | .content { |
54 | display: flex; | 49 | margin: 1em; |
55 | justify-content: center; | ||
56 | background: $viewer-text-background; | 50 | background: $viewer-text-background; |
57 | color: $viewer-text; | 51 | color: $viewer-text; |
58 | 52 | white-space: pre-wrap; | |
59 | > pre { | ||
60 | width: 100%; | ||
61 | max-width: 100%; // Forbid overflow when resizing. | ||
62 | margin: 1em; // Necessary for the resize handle to be selectable on qutebrowser. | ||
63 | border: none; | ||
64 | white-space: pre-wrap; | ||
65 | resize: horizontal; // Allow the user to adjust the width of the text view for easier column reading. | ||
66 | overflow: hidden; // Necessary for the resize handle to be shown in Chromium. | ||
67 | } | ||
68 | } | 53 | } |
69 | </style> | 54 | </style> |