From d1be5623d415860f415dff09d5052938eb2db9ba Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 30 Oct 2023 10:27:26 +0100 Subject: [PATCH] enable dark theme on uppy importer (#9884) * enable dark theme on uppy importer --- .../unreleased/enhancement-enable-dark-theme-on-importer | 7 +++++++ packages/web-app-importer/src/extensions.ts | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 changelog/unreleased/enhancement-enable-dark-theme-on-importer diff --git a/changelog/unreleased/enhancement-enable-dark-theme-on-importer b/changelog/unreleased/enhancement-enable-dark-theme-on-importer new file mode 100644 index 00000000000..e9999b3af8d --- /dev/null +++ b/changelog/unreleased/enhancement-enable-dark-theme-on-importer @@ -0,0 +1,7 @@ +Enhancement: Enable dark theme on importer + +We've enabled the dark theme on our importer, so the user will see a dark-themed dialog, whenever they activate the +dark mode. + +https://github.com/owncloud/web/pull/9884 +https://github.com/owncloud/web/issues/9452 diff --git a/packages/web-app-importer/src/extensions.ts b/packages/web-app-importer/src/extensions.ts index 495fc807256..0505535dc95 100644 --- a/packages/web-app-importer/src/extensions.ts +++ b/packages/web-app-importer/src/extensions.ts @@ -51,6 +51,9 @@ export const extensions = ({ applicationConfig }: ApplicationSetupOptions) => { }) const handler = async () => { + const currentThemeName = window.localStorage.getItem('oc_currentThemeName') + const renderDarkTheme = currentThemeName === 'default-dark' + const modal = { variation: 'passive', title: $gettext('Import files'), @@ -69,6 +72,7 @@ export const extensions = ({ applicationConfig }: ApplicationSetupOptions) => { disableLocalFiles: true, disableStatusBar: true, showSelectedFiles: false, + ...(renderDarkTheme && { theme: 'dark' }), locale: { strings: { cancel: $gettext('Cancel'),