mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-13 19:36:26 +03:00
green execute button
This commit is contained in:
@@ -131,7 +131,7 @@ const CommandsPage = () => {
|
|||||||
name: ci.name
|
name: ci.name
|
||||||
}))
|
}))
|
||||||
});
|
});
|
||||||
toast.success(LL.UPDATED_OF(LL.COMMANDS(0)));
|
toast.success(LL.UPDATED_OF(LL.COMMANDS()));
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
const message = error instanceof Error ? error.message : String(error);
|
const message = error instanceof Error ? error.message : String(error);
|
||||||
toast.error(message);
|
toast.error(message);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { useEffect, useState } from 'react';
|
|||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
|
|
||||||
import CancelIcon from '@mui/icons-material/Cancel';
|
import CancelIcon from '@mui/icons-material/Cancel';
|
||||||
|
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
|
||||||
import WarningIcon from '@mui/icons-material/Warning';
|
import WarningIcon from '@mui/icons-material/Warning';
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
@@ -226,10 +227,12 @@ const DevicesDialog = ({
|
|||||||
{LL.CANCEL()}
|
{LL.CANCEL()}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
startIcon={<WarningIcon color="warning" />}
|
startIcon={
|
||||||
|
isCommand ? <PlayArrowIcon /> : <WarningIcon color="warning" />
|
||||||
|
}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onClick={doAction}
|
onClick={doAction}
|
||||||
color="primary"
|
color={isCommand ? 'success' : 'primary'}
|
||||||
>
|
>
|
||||||
{buttonLabel}
|
{buttonLabel}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user