diff --git a/src/renderer/src/pages/apps/App.tsx b/src/renderer/src/pages/apps/App.tsx index f03e5f934d..0c4c46951e 100644 --- a/src/renderer/src/pages/apps/App.tsx +++ b/src/renderer/src/pages/apps/App.tsx @@ -29,9 +29,7 @@ const App: FC = ({ app, onClick, size = 60, isLast }) => { const handleClick = () => { if (!isHome) { - setTimeout(() => { - navigate('/') - }, 300) + setTimeout(() => navigate('/'), 300) } openMinappKeepAlive(app) diff --git a/src/renderer/src/pages/home/MainSidebar/MainSidebar.tsx b/src/renderer/src/pages/home/MainSidebar/MainSidebar.tsx index 57c5a22a6f..984595d206 100644 --- a/src/renderer/src/pages/home/MainSidebar/MainSidebar.tsx +++ b/src/renderer/src/pages/home/MainSidebar/MainSidebar.tsx @@ -173,7 +173,7 @@ const MainSidebar: FC = () => { overflow: showAssistants ? 'initial' : 'hidden' }}> - + setIsAppMenuExpanded(!isAppMenuExpanded)}> diff --git a/src/renderer/src/pages/home/MainSidebar/OpenedMinapps.tsx b/src/renderer/src/pages/home/MainSidebar/OpenedMinapps.tsx index 87023187ef..8aa94d5455 100644 --- a/src/renderer/src/pages/home/MainSidebar/OpenedMinapps.tsx +++ b/src/renderer/src/pages/home/MainSidebar/OpenedMinapps.tsx @@ -81,7 +81,7 @@ const OpenedMinapps: FC = () => { if (!isShowApps) return return ( - + { - const { pinned, updatePinnedMinapps } = useMinapps() - const { t } = useTranslation() - const { openMinappKeepAlive } = useMinappPopup() - const { openedKeepAliveMinapps } = useRuntime() - - if (isEmpty(pinned)) { - return null - } - - return ( -
- - - {(app) => { - const menuItems: MenuProps['items'] = [ - { - key: 'togglePin', - label: t('minapp.sidebar.remove.title'), - onClick: () => { - const newPinned = pinned.filter((item) => item.id !== app.id) - updatePinnedMinapps(newPinned) - } - } - ] - - return ( - - openMinappKeepAlive(app)}> - - - - - {app.name} - - - - ) - }} - - {isEmpty(openedKeepAliveMinapps) && } -
- ) -} - -const Divider = styled.div` - width: 100%; - height: 1px; - background-color: var(--color-border); - opacity: 0.5; -` - -export default PinnedApps