Skip to content

Commit

Permalink
add appSize
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 committed Apr 22, 2024
1 parent e557fad commit 3a94272
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions frontend/desktop/src/components/desktop_content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import MoreButton from '@/components/more_button';
import UserMenu from '@/components/user_menu';
import useDriver from '@/hooks/useDriver';
import useAppStore from '@/stores/app';
import { TApp } from '@/types';
import { TApp, WindowSize } from '@/types';
import { Box, Flex, Grid, GridItem, Image, Text } from '@chakra-ui/react';
import { useTranslation } from 'next-i18next';
import dynamic from 'next/dynamic';
Expand Down Expand Up @@ -54,17 +54,19 @@ export default function DesktopContent(props: any) {
appKey,
query = {},
messageData = {},
pathname = '/'
pathname = '/',
appSize = 'maximize'
}: {
appKey: string;
query?: Record<string, string>;
messageData?: Record<string, any>;
pathname: string;
appSize?: WindowSize;
}) => {
const app = apps.find((item) => item.key === appKey);
const runningApp = runningInfo.find((item) => item.key === appKey);
if (!app) return;
openApp(app, { query, pathname });
openApp(app, { query, pathname, appSize });
if (runningApp) {
setToHighestLayerById(runningApp.pid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ const OrderList = ({ apps = [], refetchApps }: { apps: any[]; refetchApps: () =>
query: {
defaultCommand
},
messageData: { type: 'new terminal', command: defaultCommand }
messageData: { type: 'new terminal', command: defaultCommand },
appSize: 'maxmin'
});
}
},
Expand Down

0 comments on commit 3a94272

Please sign in to comment.