Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix: set light backdrop according to theme
Required to fix regression with Text in Viewer in Nextcloud 30, where we
still want a white viewer header.

Also fixes the header color for PDFs with light theme.
Fixes: nextcloud/text#6386

Co-authored-by: Jonas <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux and mejo- committed Sep 17, 2024
commit f6e89dee24f0daa99e15b46f94acae6a85b7340c
29 changes: 14 additions & 15 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@nextcloud/paths": "^2.2.1",
"@nextcloud/router": "^3.0.1",
"@nextcloud/typings": "^1.9.1",
"@nextcloud/vue": "^8.18.0",
"@nextcloud/vue": "^8.19.0",
"@skjnldsv/vue-plyr": "^7.5.0",
"camelcase": "^8.0.0",
"debounce": "^2.1.1",
Expand Down
4 changes: 4 additions & 0 deletions src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
:clear-view-delay="-1 /* disable fade-out because of accessibility reasons */"
:close-button-contained="false"
:dark="true"
:light-backdrop="lightBackdrop"
:data-handler="handlerId"
:enable-slideshow="hasPrevious || hasNext"
:slideshow-paused="editing"
Expand Down Expand Up @@ -286,6 +287,7 @@ export default {
canSwipe: true,
isStandalone: false,
theme: null,
lightBackdrop: null,
root: davRemoteURL,
handlerId: '',

Expand Down Expand Up @@ -687,6 +689,8 @@ export default {
}

this.theme = handler.theme ?? 'dark'
const defaultThemeIsLight = window.getComputedStyle(document.body).getPropertyValue('--background-invert-if-dark') !== 'invert(100%)'
this.lightBackdrop = handler.theme === 'light' || (handler.theme === 'default' && defaultThemeIsLight)
this.handlerId = handler.id

// check if part of a group, if so retrieve full files list
Expand Down