fix: enable frosted glass effect by default

This commit is contained in:
mesalogo
2026-10-02 10:40:16 +08:00
parent 2e5c348dce
commit b1129cedec
7 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -75,18 +75,18 @@ describe('ApplicationSettingsStore', () => {
}
})
it.each([11, 12])('defaults missing frosted glass to off in version %s', async (version) => {
it.each([11, 12])('defaults missing frosted glass to on in version %s', async (version) => {
const { filePath, store } = await createStore()
const legacy: Record<string, unknown> = { ...defaultApplicationSettings, version, lastSeenReleaseNotesVersion: null, checkUpdatesOnStartup: false }
delete legacy.transparentFrostedEffectEnabled
await writeFile(filePath, JSON.stringify(legacy))
expect(await store.get()).toEqual({ ...defaultApplicationSettings, checkUpdatesOnStartup: false })
expect(applicationSettingsSchema.parse({ ...defaultApplicationSettings, transparentFrostedEffectEnabled: undefined }).transparentFrostedEffectEnabled).toBe(false)
expect(applicationSettingsSchema.parse({ ...defaultApplicationSettings, transparentFrostedEffectEnabled: undefined }).transparentFrostedEffectEnabled).toBe(true)
})
it('persists and publishes both frosted glass choices across unrelated updates and reloads', async () => {
const { filePath, store } = await createStore()
expect((await store.get()).transparentFrostedEffectEnabled).toBe(false)
expect((await store.get()).transparentFrostedEffectEnabled).toBe(true)
const changed = vi.fn()
store.onChanged(changed)
for (const transparentFrostedEffectEnabled of [true, false]) {
+1 -1
View File
@@ -251,7 +251,7 @@ export const resolveLegacyLocalToolEnvironmentPaths: LegacyLocalToolEnvironmentR
export const defaultApplicationSettings: ApplicationSettings = {
checkUpdatesOnStartup: true,
desktopNotificationsEnabled: true,
transparentFrostedEffectEnabled: false,
transparentFrostedEffectEnabled: true,
updateSource: 'github',
modelDownloadSource: 'modelscope',
localToolEnvironment: defaultLocalToolEnvironmentSettings,