Skip to content

Commit

Permalink
enable dark theme on uppy importer (#9884)
Browse files Browse the repository at this point in the history
* enable dark theme on uppy importer
  • Loading branch information
AlexAndBear authored Oct 30, 2023
1 parent 778a46e commit d1be562
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 = 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 d1be562

Please sign in to comment.