mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 11:20:07 +08:00
fix: one-off minapp should not show minimize button
This commit is contained in:
parent
d0cfaf51bb
commit
8a2ef9f4b0
@ -99,6 +99,9 @@ const MinappPopupContainer: React.FC = () => {
|
||||
})
|
||||
}, [currentMinappId])
|
||||
|
||||
/** only the keepalive minapp can be minimized */
|
||||
const canMinimize = !(openedOneOffMinapp && openedOneOffMinapp.id == currentMinappId)
|
||||
|
||||
/** combine the openedKeepAliveMinapps and openedOneOffMinapp */
|
||||
const combinedApps = useMemo(() => {
|
||||
return [...openedKeepAliveMinapps, ...(openedOneOffMinapp ? [openedOneOffMinapp] : [])]
|
||||
@ -237,11 +240,13 @@ const MinappPopupContainer: React.FC = () => {
|
||||
</Button>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title={t('minapp.popup.minimize')} mouseEnterDelay={0.8} placement="bottom">
|
||||
<Button onClick={() => handlePopupMinimize()}>
|
||||
<MinusOutlined />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
{canMinimize && (
|
||||
<Tooltip title={t('minapp.popup.minimize')} mouseEnterDelay={0.8} placement="bottom">
|
||||
<Button onClick={() => handlePopupMinimize()}>
|
||||
<MinusOutlined />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title={t('minapp.popup.close')} mouseEnterDelay={0.8} placement="bottom">
|
||||
<Button onClick={() => handlePopupClose(appInfo.id)}>
|
||||
<CloseOutlined />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user