Skip to content

Commit

Permalink
fix: Logger does not show logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Apr 25, 2024
1 parent 3671647 commit cf16c54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions xmcl-keystone-ui/src/composables/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ export interface UIThemeData {
blurAppBar?: number
}

export function useTheme(framework: Framework) {
const { addMedia, removeMedia, exportTheme, importTheme } = useService(ThemeServiceKey)

export function useTheme(framework: Framework, { addMedia, removeMedia, exportTheme, importTheme } = useService(ThemeServiceKey)) {
const selectedThemeName = useLocalStorageCacheStringValue('selectedThemeName', 'default' as string)
const darkTheme = useLocalStorageCacheStringValue<'dark' | 'light' | 'system'>('darkTheme', 'system')
const currentTheme = ref<UIThemeData>({
Expand Down
4 changes: 4 additions & 0 deletions xmcl-keystone-ui/src/windows/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import Vue, { h } from 'vue'
import App from './App.vue'
import { baseService } from './baseService'
import { usePreferredDark } from '@vueuse/core'
import { kTheme, useTheme } from '@/composables/theme'
import { ServiceFactoryImpl } from '@/composables'
import { ThemeServiceKey } from '@xmcl/runtime-api'

const search = window.location.search.slice(1)
const pairs = search.split('&').map((pair) => pair.split('='))
Expand All @@ -17,6 +20,7 @@ const app = new Vue(defineComponent({
i18n,
setup(props, context) {
provide(kVuetify, vuetify.framework)
provide(kTheme, useTheme(vuetify.framework, new ServiceFactoryImpl().getService(ThemeServiceKey)))

baseService.call('getSettings').then(state => state).then(state => {
i18n.locale = state.locale
Expand Down

0 comments on commit cf16c54

Please sign in to comment.