diff --git a/src/layout/components/lay-navbar/index.vue b/src/layout/components/lay-navbar/index.vue
index 53c3b11..8120cf3 100644
--- a/src/layout/components/lay-navbar/index.vue
+++ b/src/layout/components/lay-navbar/index.vue
@@ -132,6 +132,7 @@ const getRule = () => {
rule.value = res.data.rule === "hand";
}
});
+ storageLocal().setItem("restart-rule", rule.value);
return rule;
};
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 387d463..ca5b417 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -2,9 +2,9 @@
import { useServerStoreHook } from "@/store/modules/server";
import { getSystemLog } from "@/api/dashboard";
import { reactive } from "vue";
-import {getClientConnects, offlineClient} from "@/api/clients";
-import {Refresh} from "@element-plus/icons-vue";
-import {message} from "@/utils/message";
+import { getClientConnects, offlineClient } from "@/api/clients";
+import { Refresh } from "@element-plus/icons-vue";
+import { message } from "@/utils/message";
defineOptions({
name: "Dashboard"
@@ -87,7 +87,13 @@ getClientsStatus();
-
+
{
}
});
const serverInfo = storageLocal().getItem("server-info");
+ const restartRule = storageLocal().getItem("restart-rule") ? 1 : 0;
addDialog({
width: "40%",
title: "新增",
@@ -167,7 +168,7 @@ const openAddClientDialog = () => {
extraAllowedIPS: "",
endpoint: "",
useServerDNS: 0,
- enableAfterCreation: 0,
+ enableAfterCreation: restartRule,
keys: {
privateKey: "",
publicKey: "",