mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Rename themes to standard names
This commit is contained in:
parent
790e5497be
commit
79e7cff04e
@ -8,7 +8,7 @@ import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n'
|
||||
|
||||
import tokens from '#assets/sass/tokens.module.scss'
|
||||
|
||||
const ocelotStandardLightTheme: ThemeDefinition = {
|
||||
const lightTheme: ThemeDefinition = {
|
||||
dark: false,
|
||||
colors: {
|
||||
background: tokens.backgroundColorBase,
|
||||
@ -25,10 +25,10 @@ const ocelotStandardLightTheme: ThemeDefinition = {
|
||||
},
|
||||
}
|
||||
|
||||
const ocelotStandardDarkTheme: ThemeDefinition = {
|
||||
const darkTheme: ThemeDefinition = {
|
||||
dark: true,
|
||||
colors: {
|
||||
...ocelotStandardLightTheme.colors,
|
||||
...lightTheme.colors,
|
||||
background: tokens.backgroundColorInverse,
|
||||
surface: tokens.backgroundColorInverseSoft,
|
||||
},
|
||||
@ -45,11 +45,10 @@ export default (i18n: I18n<any, NonNullable<unknown>, NonNullable<unknown>, stri
|
||||
},
|
||||
ssr: true,
|
||||
theme: {
|
||||
defaultTheme: 'ocelotStandardLightTheme',
|
||||
// defaultTheme: 'ocelotStandardDarkTheme',
|
||||
defaultTheme: 'light',
|
||||
themes: {
|
||||
ocelotStandardLightTheme,
|
||||
ocelotStandardDarkTheme,
|
||||
light: lightTheme,
|
||||
dark: darkTheme,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<!-- eslint-disable prettier/prettier -->
|
||||
<template>
|
||||
<v-app-bar flat>
|
||||
<v-row>
|
||||
@ -39,9 +40,7 @@ import LogoAvatar from './LogoAvatar.vue'
|
||||
|
||||
const theme = useTheme()
|
||||
function toggleTheme() {
|
||||
theme.global.name.value = theme.global.current.value.dark
|
||||
? 'ocelotStandardLightTheme'
|
||||
: 'ocelotStandardDarkTheme'
|
||||
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
|
||||
}
|
||||
|
||||
const { current: locale } = useLocale()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user