mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-19 15:25:41 +08:00
fix: hide save button in readonly editor view (#1208)
This commit is contained in:
1 parent
455892b414
commit
44dc7fe24a
1 file changed
+6
-4
@@ -171,12 +171,14 @@ export const EditorViewer = (props: Props) => {
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<Button onClick={onClose} variant="outlined">
|
||||
<Button onClick={onClose} variant={readOnly ? "contained" : "outlined"}>
|
||||
{t("Cancel")}
|
||||
</Button>
|
||||
<Button onClick={onSave} variant="contained">
|
||||
{t("Save")}
|
||||
</Button>
|
||||
{readOnly ? null : (
|
||||
<Button onClick={onSave} variant="contained">
|
||||
{t("Save")}
|
||||
</Button>
|
||||
)}
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user