Skip to content

Commit

Permalink
Merge branch 'master' into update-frontend-packages-2024-05-12
Browse files Browse the repository at this point in the history
  • Loading branch information
Elweyn committed May 13, 2024
2 parents d877c99 + e2d4ae7 commit 56cc847
Show file tree
Hide file tree
Showing 12 changed files with 608 additions and 20 deletions.
39 changes: 38 additions & 1 deletion frontend/renderer/plugins/vuetify.ts
@@ -1,11 +1,41 @@
// eslint-disable-next-line import/no-unassigned-import
import 'vuetify/styles'
import { I18n, useI18n } from 'vue-i18n'
import { createVuetify } from 'vuetify'
import { createVuetify, ThemeDefinition } from 'vuetify'
import { mdi } from 'vuetify/iconsets/mdi-svg'
import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n'

import { aliases, set } from '#assets/icons'
import tokens from '#assets/sass/tokens.module.scss'

const lightTheme: ThemeDefinition = {
dark: false,
colors: {
background: tokens.backgroundColorBase,
surface: tokens.backgroundColorSoft,
primary: tokens.colorPrimary,
secondary: tokens.colorSecondary,
success: tokens.colorSuccess,
info: tokens.colorInfo,
warning: tokens.colorWarning,
error: tokens.colorError,
},
variables: {
'border-color': '#000000',
},
}

const darkTheme: ThemeDefinition = {
dark: true,
colors: {
...lightTheme.colors,
background: tokens.backgroundColorInverse,
surface: tokens.backgroundColorInverseSoft,
},
variables: {
'border-color': '#000000',
},
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default (i18n: I18n<any, NonNullable<unknown>, NonNullable<unknown>, string, false>) =>
Expand All @@ -22,4 +52,11 @@ export default (i18n: I18n<any, NonNullable<unknown>, NonNullable<unknown>, stri
mdi,
},
},
theme: {
defaultTheme: 'light',
themes: {
light: lightTheme,
dark: darkTheme,
},
},
})

0 comments on commit 56cc847

Please sign in to comment.