Improve icon buttons
This commit is contained in:
parent
49d77cd379
commit
7d7d9c5437
@ -20,7 +20,7 @@ type ThemeContext = { theme: Theme; set: (theme: Theme) => void };
|
|||||||
const ThemeContextK = React.createContext<ThemeContext | null>(null);
|
const ThemeContextK = React.createContext<ThemeContext | null>(null);
|
||||||
|
|
||||||
export function ThemeProvider(p: React.PropsWithChildren): React.ReactElement {
|
export function ThemeProvider(p: React.PropsWithChildren): React.ReactElement {
|
||||||
const [theme, setTheme] = React.useState<Theme>("highcontrast");
|
const [theme, setTheme] = React.useState<Theme>("teamsdark");
|
||||||
|
|
||||||
let fluentTheme = teamsHighContrastTheme;
|
let fluentTheme = teamsHighContrastTheme;
|
||||||
switch (theme) {
|
switch (theme) {
|
||||||
|
@ -2,7 +2,8 @@ import { Button, Spinner, Toolbar, Tooltip } from "@fluentui/react-components";
|
|||||||
import {
|
import {
|
||||||
ArrowResetRegular,
|
ArrowResetRegular,
|
||||||
PauseRegular,
|
PauseRegular,
|
||||||
PlayRegular,
|
PlayCircleRegular,
|
||||||
|
PlayFilled,
|
||||||
PowerRegular,
|
PowerRegular,
|
||||||
StopRegular,
|
StopRegular,
|
||||||
} from "@fluentui/react-icons";
|
} from "@fluentui/react-icons";
|
||||||
@ -23,7 +24,7 @@ export function GroupVMAction(p: {
|
|||||||
<Toolbar>
|
<Toolbar>
|
||||||
<GroupVMButton
|
<GroupVMButton
|
||||||
enabled={p.group.can_start}
|
enabled={p.group.can_start}
|
||||||
icon={<PlayRegular />}
|
icon={<PlayFilled />}
|
||||||
tooltip="Start"
|
tooltip="Start"
|
||||||
group={p.group}
|
group={p.group}
|
||||||
vm={p.vm}
|
vm={p.vm}
|
||||||
@ -32,17 +33,6 @@ export function GroupVMAction(p: {
|
|||||||
needConfirm={false}
|
needConfirm={false}
|
||||||
action={GroupApi.StartVM}
|
action={GroupApi.StartVM}
|
||||||
/>
|
/>
|
||||||
<GroupVMButton
|
|
||||||
enabled={p.group.can_resume}
|
|
||||||
icon={<PlayRegular />}
|
|
||||||
tooltip="Resume"
|
|
||||||
group={p.group}
|
|
||||||
vm={p.vm}
|
|
||||||
allowedStates={["Paused", "PowerManagementSuspended"]}
|
|
||||||
currState={p.state}
|
|
||||||
needConfirm={false}
|
|
||||||
action={GroupApi.ResumeVM}
|
|
||||||
/>
|
|
||||||
<GroupVMButton
|
<GroupVMButton
|
||||||
enabled={p.group.can_suspend}
|
enabled={p.group.can_suspend}
|
||||||
icon={<PauseRegular />}
|
icon={<PauseRegular />}
|
||||||
@ -54,6 +44,17 @@ export function GroupVMAction(p: {
|
|||||||
needConfirm={true}
|
needConfirm={true}
|
||||||
action={GroupApi.SuspendVM}
|
action={GroupApi.SuspendVM}
|
||||||
/>
|
/>
|
||||||
|
<GroupVMButton
|
||||||
|
enabled={p.group.can_resume}
|
||||||
|
icon={<PlayCircleRegular />}
|
||||||
|
tooltip="Resume"
|
||||||
|
group={p.group}
|
||||||
|
vm={p.vm}
|
||||||
|
allowedStates={["Paused", "PowerManagementSuspended"]}
|
||||||
|
currState={p.state}
|
||||||
|
needConfirm={false}
|
||||||
|
action={GroupApi.ResumeVM}
|
||||||
|
/>
|
||||||
<GroupVMButton
|
<GroupVMButton
|
||||||
enabled={p.group.can_shutdown}
|
enabled={p.group.can_shutdown}
|
||||||
icon={<PowerRegular />}
|
icon={<PowerRegular />}
|
||||||
|
@ -25,8 +25,8 @@ import { Rights } from "../api/ServerApi";
|
|||||||
import { VMApi, VMInfo, VMInfoAndCaps, VMState } from "../api/VMApi";
|
import { VMApi, VMInfo, VMInfoAndCaps, VMState } from "../api/VMApi";
|
||||||
import { useConfirm } from "../hooks/providers/ConfirmDialogProvider";
|
import { useConfirm } from "../hooks/providers/ConfirmDialogProvider";
|
||||||
import { useToast } from "../hooks/providers/ToastProvider";
|
import { useToast } from "../hooks/providers/ToastProvider";
|
||||||
import { VMLiveScreenshot } from "./VMLiveScreenshot";
|
|
||||||
import { SectionContainer } from "./SectionContainer";
|
import { SectionContainer } from "./SectionContainer";
|
||||||
|
import { VMLiveScreenshot } from "./VMLiveScreenshot";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles({
|
||||||
body1Stronger: typographyStyles.body1Stronger,
|
body1Stronger: typographyStyles.body1Stronger,
|
||||||
|
Loading…
Reference in New Issue
Block a user