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 #3209 collabora open when nextcloud is in a iframe #3445

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions src/helpers/coolParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
const uiMode = defaults.UIMode ?? 'notebookbar' // or notebookbar

const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
// FIXME For now we need to access parent here as the public page loaded for collabora doesn't have the user theme
const nextcloudDarkMode = parent.document.body.dataset.themeDark === '' || parent.document.body.dataset.themeDarkHighcontrast === ''
const matchedDarkMode = parent.document.body.dataset.themeDefault === '' ? systemDarkMode : nextcloudDarkMode
const dataSet = document.body.dataset?.themeDark ? document.body.dataset : parent.document.body.dataset

Check failure on line 34 in src/helpers/coolParameters.js

View workflow job for this annotation

GitHub Actions / NPM lint

'dataSet' is assigned a value but never used
const nextcloudDarkMode = dataset?.themeDark === '' || dataset?.themeDarkHighcontrast === ''

Check failure on line 35 in src/helpers/coolParameters.js

View workflow job for this annotation

GitHub Actions / NPM lint

'dataset' is not defined

Check failure on line 35 in src/helpers/coolParameters.js

View workflow job for this annotation

GitHub Actions / NPM lint

'dataset' is not defined
const matchedDarkMode = dataset?.themeDefault === '' ? systemDarkMode : nextcloudDarkMode

Check failure on line 36 in src/helpers/coolParameters.js

View workflow job for this annotation

GitHub Actions / NPM lint

'dataset' is not defined
const uiTheme = matchedDarkMode ? 'dark' : 'light'

let uiDefaults = 'TextRuler=' + textRuler + ';'
Expand Down
Loading