优化
This commit is contained in:
truewhile
2026-08-24 17:40:43 +08:00
parent 99ef2ed410
commit 44ca451cd4
374 changed files with 1029 additions and 1028 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ export interface ExternalPlayer {
function publicOriginHeader() {
if (typeof window === 'undefined' || !window.location?.origin) return undefined
return { 'X-MediaStation-Public-Origin': window.location.origin }
return { 'X-MMTL-Public-Origin': window.location.origin }
}
export const playbackAPI = {
+3 -2
View File
@@ -3,12 +3,13 @@ import { useCallback, useEffect, useState } from 'react'
export type ThemeMode = 'light' | 'dark' | 'system'
export type ResolvedTheme = 'light' | 'dark'
const THEME_STORAGE_KEY = 'mediastationgo.theme'
const THEME_STORAGE_KEY = 'mmtl.theme'
const THEME_LEGACY_STORAGE_KEY = 'mediastationgo.theme'
const DARK_QUERY = '(prefers-color-scheme: dark)'
function readStoredTheme(): ThemeMode {
if (typeof window === 'undefined') return 'system'
const value = window.localStorage.getItem(THEME_STORAGE_KEY)
const value = window.localStorage.getItem(THEME_STORAGE_KEY) || window.localStorage.getItem(THEME_LEGACY_STORAGE_KEY)
return value === 'light' || value === 'dark' || value === 'system' ? value : 'system'
}
+1 -1
View File
@@ -56,7 +56,7 @@ export const useAuthStore = create<AuthState>()(
},
}),
{
name: 'mediastationgo-auth',
name: 'mmtl-auth',
partialize: (state) => ({
token: state.token,
refreshToken: state.refreshToken,
+1 -1
View File
@@ -22,7 +22,7 @@ export const usePlayProfileStore = create<PlayProfileState>()(
})),
}),
{
name: 'mediastationgo-play-profile',
name: 'mmtl-play-profile',
storage: createJSONStorage(() => sessionStorage),
},
),