From 7d7d9c5437ad09cc9809e53c2e86b8c5b18cd946 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 6 Dec 2024 18:39:25 +0100 Subject: [PATCH] Improve icon buttons --- .../src/hooks/providers/ThemeProvider.tsx | 2 +- remote_frontend/src/widgets/GroupVMAction.tsx | 27 ++++++++++--------- .../src/widgets/VirtualMachinesWidget.tsx | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/remote_frontend/src/hooks/providers/ThemeProvider.tsx b/remote_frontend/src/hooks/providers/ThemeProvider.tsx index fd419f6..efce516 100644 --- a/remote_frontend/src/hooks/providers/ThemeProvider.tsx +++ b/remote_frontend/src/hooks/providers/ThemeProvider.tsx @@ -20,7 +20,7 @@ type ThemeContext = { theme: Theme; set: (theme: Theme) => void }; const ThemeContextK = React.createContext(null); export function ThemeProvider(p: React.PropsWithChildren): React.ReactElement { - const [theme, setTheme] = React.useState("highcontrast"); + const [theme, setTheme] = React.useState("teamsdark"); let fluentTheme = teamsHighContrastTheme; switch (theme) { diff --git a/remote_frontend/src/widgets/GroupVMAction.tsx b/remote_frontend/src/widgets/GroupVMAction.tsx index eb508a9..b6b9662 100644 --- a/remote_frontend/src/widgets/GroupVMAction.tsx +++ b/remote_frontend/src/widgets/GroupVMAction.tsx @@ -2,7 +2,8 @@ import { Button, Spinner, Toolbar, Tooltip } from "@fluentui/react-components"; import { ArrowResetRegular, PauseRegular, - PlayRegular, + PlayCircleRegular, + PlayFilled, PowerRegular, StopRegular, } from "@fluentui/react-icons"; @@ -23,7 +24,7 @@ export function GroupVMAction(p: { } + icon={} tooltip="Start" group={p.group} vm={p.vm} @@ -32,17 +33,6 @@ export function GroupVMAction(p: { needConfirm={false} action={GroupApi.StartVM} /> - } - tooltip="Resume" - group={p.group} - vm={p.vm} - allowedStates={["Paused", "PowerManagementSuspended"]} - currState={p.state} - needConfirm={false} - action={GroupApi.ResumeVM} - /> } @@ -54,6 +44,17 @@ export function GroupVMAction(p: { needConfirm={true} action={GroupApi.SuspendVM} /> + } + tooltip="Resume" + group={p.group} + vm={p.vm} + allowedStates={["Paused", "PowerManagementSuspended"]} + currState={p.state} + needConfirm={false} + action={GroupApi.ResumeVM} + /> } diff --git a/remote_frontend/src/widgets/VirtualMachinesWidget.tsx b/remote_frontend/src/widgets/VirtualMachinesWidget.tsx index b0c78ca..a674bcd 100644 --- a/remote_frontend/src/widgets/VirtualMachinesWidget.tsx +++ b/remote_frontend/src/widgets/VirtualMachinesWidget.tsx @@ -25,8 +25,8 @@ import { Rights } from "../api/ServerApi"; import { VMApi, VMInfo, VMInfoAndCaps, VMState } from "../api/VMApi"; import { useConfirm } from "../hooks/providers/ConfirmDialogProvider"; import { useToast } from "../hooks/providers/ToastProvider"; -import { VMLiveScreenshot } from "./VMLiveScreenshot"; import { SectionContainer } from "./SectionContainer"; +import { VMLiveScreenshot } from "./VMLiveScreenshot"; const useStyles = makeStyles({ body1Stronger: typographyStyles.body1Stronger,