mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 14:03:44 +08:00
fix: hide save button in readonly editor view (#1208)
This commit is contained in:
parent
2662df2547
commit
4ab507fd43
@ -171,12 +171,14 @@ export const EditorViewer = (props: Props) => {
|
|||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button onClick={onClose} variant="outlined">
|
<Button onClick={onClose} variant={readOnly ? "contained" : "outlined"}>
|
||||||
{t("Cancel")}
|
{t("Cancel")}
|
||||||
</Button>
|
</Button>
|
||||||
|
{readOnly ? null : (
|
||||||
<Button onClick={onSave} variant="contained">
|
<Button onClick={onSave} variant="contained">
|
||||||
{t("Save")}
|
{t("Save")}
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user