fix: one-off minapp should not show minimize button
This commit is contained in:
parent
ae2a661201
commit
3698238e9e
@ -99,6 +99,9 @@ const MinappPopupContainer: React.FC = () => {
|
|||||||
})
|
})
|
||||||
}, [currentMinappId])
|
}, [currentMinappId])
|
||||||
|
|
||||||
|
/** only the keepalive minapp can be minimized */
|
||||||
|
const canMinimize = !(openedOneOffMinapp && openedOneOffMinapp.id == currentMinappId)
|
||||||
|
|
||||||
/** combine the openedKeepAliveMinapps and openedOneOffMinapp */
|
/** combine the openedKeepAliveMinapps and openedOneOffMinapp */
|
||||||
const combinedApps = useMemo(() => {
|
const combinedApps = useMemo(() => {
|
||||||
return [...openedKeepAliveMinapps, ...(openedOneOffMinapp ? [openedOneOffMinapp] : [])]
|
return [...openedKeepAliveMinapps, ...(openedOneOffMinapp ? [openedOneOffMinapp] : [])]
|
||||||
@ -237,11 +240,13 @@ const MinappPopupContainer: React.FC = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
<Tooltip title={t('minapp.popup.minimize')} mouseEnterDelay={0.8} placement="bottom">
|
{canMinimize && (
|
||||||
<Button onClick={() => handlePopupMinimize()}>
|
<Tooltip title={t('minapp.popup.minimize')} mouseEnterDelay={0.8} placement="bottom">
|
||||||
<MinusOutlined />
|
<Button onClick={() => handlePopupMinimize()}>
|
||||||
</Button>
|
<MinusOutlined />
|
||||||
</Tooltip>
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
<Tooltip title={t('minapp.popup.close')} mouseEnterDelay={0.8} placement="bottom">
|
<Tooltip title={t('minapp.popup.close')} mouseEnterDelay={0.8} placement="bottom">
|
||||||
<Button onClick={() => handlePopupClose(appInfo.id)}>
|
<Button onClick={() => handlePopupClose(appInfo.id)}>
|
||||||
<CloseOutlined />
|
<CloseOutlined />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user