Skip to content
Snippets Groups Projects
Unverified Commit cb48600b authored by GyDi's avatar GyDi
Browse files

fix: adjust dialog action button variant

parent 33ce2357
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ import useSWR from "swr"; ...@@ -2,6 +2,7 @@ import useSWR from "swr";
import snarkdown from "snarkdown"; import snarkdown from "snarkdown";
import { useMemo } from "react"; import { useMemo } from "react";
import { useRecoilState } from "recoil"; import { useRecoilState } from "recoil";
import { useTranslation } from "react-i18next";
import { import {
Box, Box,
Button, Button,
...@@ -28,6 +29,7 @@ const UpdateLog = styled(Box)(() => ({ ...@@ -28,6 +29,7 @@ const UpdateLog = styled(Box)(() => ({
const UpdateDialog = (props: Props) => { const UpdateDialog = (props: Props) => {
const { open, onClose } = props; const { open, onClose } = props;
const { t } = useTranslation();
const { data: updateInfo } = useSWR("checkUpdate", checkUpdate, { const { data: updateInfo } = useSWR("checkUpdate", checkUpdate, {
errorRetryCount: 2, errorRetryCount: 2,
revalidateIfStale: false, revalidateIfStale: false,
...@@ -69,14 +71,16 @@ const UpdateDialog = (props: Props) => { ...@@ -69,14 +71,16 @@ const UpdateDialog = (props: Props) => {
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={onClose}>Cancel</Button> <Button variant="outlined" onClick={onClose}>
{t("Cancel")}
</Button>
<Button <Button
autoFocus autoFocus
variant="contained" variant="contained"
disabled={updateState} disabled={updateState}
onClick={onUpdate} onClick={onUpdate}
> >
Update {t("Update")}
</Button> </Button>
</DialogActions> </DialogActions>
</Dialog> </Dialog>
......
...@@ -64,7 +64,9 @@ const ConfigViewer = () => { ...@@ -64,7 +64,9 @@ const ConfigViewer = () => {
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={() => setOpen(false)}>{t("Back")}</Button> <Button variant="outlined" onClick={() => setOpen(false)}>
{t("Back")}
</Button>
</DialogActions> </DialogActions>
</Dialog> </Dialog>
......
...@@ -145,7 +145,9 @@ const WebUIViewer = ({ handler, onError }: Props) => { ...@@ -145,7 +145,9 @@ const WebUIViewer = ({ handler, onError }: Props) => {
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={() => setOpen(false)}>{t("Back")}</Button> <Button variant="outlined" onClick={() => setOpen(false)}>
{t("Back")}
</Button>
</DialogActions> </DialogActions>
</Dialog> </Dialog>
); );
......
...@@ -142,7 +142,9 @@ const SettingTheme = (props: Props) => { ...@@ -142,7 +142,9 @@ const SettingTheme = (props: Props) => {
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={onClose}>{t("Cancel")}</Button> <Button variant="outlined" onClick={onClose}>
{t("Cancel")}
</Button>
<Button onClick={onSave} variant="contained"> <Button onClick={onSave} variant="contained">
{t("Save")} {t("Save")}
</Button> </Button>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment