diff --git a/queues/async_wg_config.go b/queues/async_wg_config.go
index c2db28a..46e9ecc 100644
--- a/queues/async_wg_config.go
+++ b/queues/async_wg_config.go
@@ -79,7 +79,7 @@ func asyncWireguardConfigFile() {
var renderClients []template_data.Client
for _, v := range serverEnt.Clients {
// 如果不是确认后创建或者未启用就不写入到wireguard配置文件当中
- if *v.EnableAfterCreation != 1 || *v.Enabled != 1 {
+ if *v.Enabled != 1 {
continue
}
var clientKey template_data.Keys
diff --git a/web-src/src/layout/components/lay-navbar/index.vue b/web-src/src/layout/components/lay-navbar/index.vue
index 53c3b11..8120cf3 100644
--- a/web-src/src/layout/components/lay-navbar/index.vue
+++ b/web-src/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/web-src/src/views/dashboard/index.vue b/web-src/src/views/dashboard/index.vue
index 387d463..ca5b417 100644
--- a/web-src/src/views/dashboard/index.vue
+++ b/web-src/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: "",
diff --git a/web-src/vite.config.ts b/web-src/vite.config.ts
index f7d4133..47fe8d9 100644
--- a/web-src/vite.config.ts
+++ b/web-src/vite.config.ts
@@ -47,7 +47,7 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
sourcemap: false,
// 消除打包大小超过500kb警告
chunkSizeWarningLimit: 4000,
- outDir: "../web",
+ outDit: "../web",
rollupOptions: {
input: {
index: pathResolve("./index.html", import.meta.url)