Skip to content

Commit

Permalink
enable dark theme on uppy importer
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAndBear committed Oct 30, 2023
1 parent 1887490 commit 6827238
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions packages/web-app-importer/src/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export const extensions = ({ applicationConfig }: ApplicationSetupOptions) => {
})

const handler = async () => {
const currentThemeName = window.localStorage.getItem('oc_currentThemeName')
const renderDarkTheme = unref(currentThemeName) === 'default-dark'

const modal = {
variation: 'passive',
title: $gettext('Import files'),
Expand All @@ -69,6 +72,7 @@ export const extensions = ({ applicationConfig }: ApplicationSetupOptions) => {
disableLocalFiles: true,
disableStatusBar: true,
showSelectedFiles: false,
...(renderDarkTheme && { theme: 'dark' }),
locale: {
strings: {
cancel: $gettext('Cancel'),
Expand Down

0 comments on commit 6827238

Please sign in to comment.