fix: store minapp url use base64 data image

This commit is contained in:
kangfenmao 2025-01-19 15:35:17 +08:00
parent a7d9700f06
commit fd7132cd3a
2 changed files with 32 additions and 7 deletions

View File

@ -30,7 +30,7 @@ const persistedReducer = persistReducer(
{
key: 'cherry-studio',
storage,
version: 57,
version: 58,
blacklist: ['runtime'],
migrate
},

View File

@ -1,4 +1,5 @@
import { isMac } from '@renderer/config/constant'
import { DEFAULT_MIN_APPS } from '@renderer/config/minapps'
import { SYSTEM_MODELS } from '@renderer/config/models'
import { TRANSLATE_PROMPT } from '@renderer/config/prompts'
import db from '@renderer/databases'
@ -814,13 +815,37 @@ const migrateConfig = {
return state
},
'57': (state: RootState) => {
state.shortcuts.shortcuts.push({
key: 'mini_window',
shortcut: [isMac ? 'Command' : 'Ctrl', 'E'],
editable: true,
enabled: false,
system: true
if (state.shortcuts) {
state.shortcuts.shortcuts.push({
key: 'mini_window',
shortcut: [isMac ? 'Command' : 'Ctrl', 'E'],
editable: true,
enabled: false,
system: true
})
}
if (state.minapps) {
state.minapps.enabled = state.minapps.enabled.map((app) => {
const _app = DEFAULT_MIN_APPS.find((m) => m.id === app.id)
return _app || app
})
state.minapps.disabled = state.minapps.disabled.map((app) => {
const _app = DEFAULT_MIN_APPS.find((m) => m.id === app.id)
return _app || app
})
state.minapps.pinned = state.minapps.pinned.map((app) => {
const _app = DEFAULT_MIN_APPS.find((m) => m.id === app.id)
return _app || app
})
}
state.llm.providers.forEach((provider) => {
if (provider.id === 'qwenlm') {
provider.type = 'qwenlm'
}
})
return state
}
}