feat: enable pinned functionality for minapps and update 'flowith' configuration
This commit is contained in:
parent
b01aca9066
commit
46b314303c
@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable react/no-unknown-property */
|
/* eslint-disable react/no-unknown-property */
|
||||||
import { CloseOutlined, ExportOutlined, PushpinOutlined, ReloadOutlined } from '@ant-design/icons'
|
import { CloseOutlined, ExportOutlined, PushpinOutlined, ReloadOutlined } from '@ant-design/icons'
|
||||||
import { isMac, isWindows } from '@renderer/config/constant'
|
import { isMac, isWindows } from '@renderer/config/constant'
|
||||||
|
import { DEFAULT_MIN_APPS } from '@renderer/config/minapps'
|
||||||
import { useBridge } from '@renderer/hooks/useBridge'
|
import { useBridge } from '@renderer/hooks/useBridge'
|
||||||
import { useMinapps } from '@renderer/hooks/useMinapps'
|
import { useMinapps } from '@renderer/hooks/useMinapps'
|
||||||
import store from '@renderer/store'
|
import store from '@renderer/store'
|
||||||
@ -31,7 +32,7 @@ const PopupContainer: React.FC<Props> = ({ app, resolve }) => {
|
|||||||
useBridge()
|
useBridge()
|
||||||
|
|
||||||
const canOpenExternalLink = app.url.startsWith('http://') || app.url.startsWith('https://')
|
const canOpenExternalLink = app.url.startsWith('http://') || app.url.startsWith('https://')
|
||||||
const canPinned = !!app.id
|
const canPinned = DEFAULT_MIN_APPS.some((i) => i.id === app?.id)
|
||||||
|
|
||||||
const onClose = async (_delay = 0.3) => {
|
const onClose = async (_delay = 0.3) => {
|
||||||
setOpen(false)
|
setOpen(false)
|
||||||
|
|||||||
@ -266,7 +266,8 @@ export const DEFAULT_MIN_APPS: MinAppType[] = [
|
|||||||
id: 'flowith',
|
id: 'flowith',
|
||||||
name: 'Flowith',
|
name: 'Flowith',
|
||||||
logo: FlowithAppLogo,
|
logo: FlowithAppLogo,
|
||||||
url: 'https://www.flowith.io/'
|
url: 'https://www.flowith.io/',
|
||||||
|
bodered: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ const persistedReducer = persistReducer(
|
|||||||
{
|
{
|
||||||
key: 'cherry-studio',
|
key: 'cherry-studio',
|
||||||
storage,
|
storage,
|
||||||
version: 58,
|
version: 59,
|
||||||
blacklist: ['runtime'],
|
blacklist: ['runtime'],
|
||||||
migrate
|
migrate
|
||||||
},
|
},
|
||||||
|
|||||||
@ -871,6 +871,15 @@ const migrateConfig = {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
return state
|
return state
|
||||||
|
},
|
||||||
|
'59': (state: RootState) => {
|
||||||
|
if (state.minapps) {
|
||||||
|
const flowith = DEFAULT_MIN_APPS.find((app) => app.id === 'flowith')
|
||||||
|
if (flowith) {
|
||||||
|
state.minapps.enabled.push(flowith)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user