settings.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. {{ template "page/head_start" .}}
  2. {{ template "page/head_end" .}}
  3. {{ template "page/body_start" .}}
  4. <a-layout id="app" v-cloak :class="themeSwitcher.currentTheme + ' settings-page'">
  5. <a-sidebar></a-sidebar>
  6. <a-layout id="content-layout">
  7. <a-layout-content>
  8. <a-spin :spinning="loadingStates.spinning" :delay="500" tip='{{ i18n "loading"}}'>
  9. <transition name="list" appear>
  10. <a-alert type="error" v-if="confAlerts.length>0 && loadingStates.fetched" :style="{ marginBottom: '10px' }"
  11. message='{{ i18n "secAlertTitle" }}'
  12. color="red"
  13. show-icon closable>
  14. <template slot="description">
  15. <b>{{ i18n "secAlertConf" }}</b>
  16. <ul><li v-for="a in confAlerts">[[ a ]]</li></ul>
  17. </template>
  18. </a-alert>
  19. </transition>
  20. <transition name="list" appear>
  21. <template>
  22. <a-row v-if="!loadingStates.fetched">
  23. <a-card :style="{ textAlign: 'center', padding: '30px 0', marginTop: '10px', background: 'transparent', border: 'none' }">
  24. <a-spin tip='{{ i18n "loading" }}'></a-spin>
  25. </a-card>
  26. </a-row>
  27. <a-row :gutter="[isMobile ? 8 : 16, isMobile ? 0 : 12]" v-else>
  28. <a-col>
  29. <a-card hoverable>
  30. <a-row :style="{ display: 'flex', flexWrap: 'wrap', alignItems: 'center' }">
  31. <a-col :xs="24" :sm="10" :style="{ padding: '4px' }">
  32. <a-space direction="horizontal">
  33. <a-button type="primary" :disabled="saveBtnDisable" @click="updateAllSetting">{{ i18n "pages.settings.save" }}</a-button>
  34. <a-button type="danger" :disabled="!saveBtnDisable" @click="restartPanel">{{ i18n "pages.settings.restartPanel" }}</a-button>
  35. </a-space>
  36. </a-col>
  37. <a-col :xs="24" :sm="14">
  38. <template>
  39. <div>
  40. <a-back-top :target="() => document.getElementById('content-layout')" visibility-height="200"></a-back-top>
  41. <a-alert type="warning" :style="{ float: 'right', width: 'fit-content' }"
  42. message='{{ i18n "pages.settings.infoDesc" }}'
  43. show-icon>
  44. </a-alert>
  45. </div>
  46. </template>
  47. </a-col>
  48. </a-row>
  49. </a-card>
  50. </a-col>
  51. <a-col>
  52. <a-tabs default-active-key="1">
  53. <a-tab-pane key="1" :style="{ paddingTop: '20px' }">
  54. <template #tab>
  55. <a-icon type="setting"></a-icon>
  56. <span>{{ i18n "pages.settings.panelSettings" }}</span>
  57. </template>
  58. {{ template "settings/panel/general" . }}
  59. </a-tab-pane>
  60. <a-tab-pane key="2" :style="{ paddingTop: '20px' }">
  61. <template #tab>
  62. <a-icon type="safety"></a-icon>
  63. <span>{{ i18n "pages.settings.securitySettings" }}</span>
  64. </template>
  65. {{ template "settings/panel/security" . }}
  66. </a-tab-pane>
  67. <a-tab-pane key="3" :style="{ paddingTop: '20px' }">
  68. <template #tab>
  69. <a-icon type="message"></a-icon>
  70. <span>{{ i18n "pages.settings.TGBotSettings" }}</span>
  71. </template>
  72. {{ template "settings/panel/telegram" . }}
  73. </a-tab-pane>
  74. <a-tab-pane key="4" :style="{ paddingTop: '20px' }">
  75. <template #tab>
  76. <a-icon type="cloud-server"></a-icon>
  77. <span>{{ i18n "pages.settings.subSettings" }}</span>
  78. </template>
  79. {{ template "settings/panel/subscription/general" . }}
  80. </a-tab-pane>
  81. <a-tab-pane key="5" v-if="allSetting.subJsonEnable" :style="{ paddingTop: '20px' }">
  82. <template #tab>
  83. <a-icon type="code"></a-icon>
  84. <span>{{ i18n "pages.settings.subSettings" }} (JSON)</span>
  85. </template>
  86. {{ template "settings/panel/subscription/json" . }}
  87. </a-tab-pane>
  88. </a-tabs>
  89. </a-col>
  90. </a-row>
  91. </template>
  92. </transition>
  93. </a-spin>
  94. </a-layout-content>
  95. </a-layout>
  96. </a-layout>
  97. {{template "page/body_scripts" .}}
  98. <script src="{{ .base_path }}assets/qrcode/qrious2.min.js?{{ .cur_ver }}"></script>
  99. <script src="{{ .base_path }}assets/otpauth/otpauth.umd.min.js?{{ .cur_ver }}"></script>
  100. <script src="{{ .base_path }}assets/js/model/setting.js?{{ .cur_ver }}"></script>
  101. {{template "component/aSidebar" .}}
  102. {{template "component/aThemeSwitch" .}}
  103. {{template "component/aSettingListItem" .}}
  104. {{template "modals/twoFactorModal"}}
  105. <script>
  106. const app = new Vue({
  107. delimiters: ['[[', ']]'],
  108. mixins: [MediaQueryMixin],
  109. el: '#app',
  110. data: {
  111. themeSwitcher,
  112. loadingStates: {
  113. fetched: false,
  114. spinning: false
  115. },
  116. oldAllSetting: new AllSetting(),
  117. allSetting: new AllSetting(),
  118. saveBtnDisable: true,
  119. user: {},
  120. lang: LanguageManager.getLanguage(),
  121. inboundOptions: [],
  122. remarkModels: { i: 'Inbound', e: 'Email', o: 'Other' },
  123. remarkSeparators: [' ', '-', '_', '@', ':', '~', '|', ',', '.', '/'],
  124. datepickerList: [{ name: 'Gregorian (Standard)', value: 'gregorian' }, { name: 'Jalalian (شمسی)', value: 'jalalian' }],
  125. remarkSample: '',
  126. defaultFragment: {
  127. tag: "fragment",
  128. protocol: "freedom",
  129. settings: {
  130. domainStrategy: "AsIs",
  131. fragment: {
  132. packets: "tlshello",
  133. length: "100-200",
  134. interval: "10-20"
  135. }
  136. },
  137. streamSettings: {
  138. sockopt: {
  139. tcpKeepAliveIdle: 100,
  140. tcpMptcp: true,
  141. penetrate: true
  142. }
  143. }
  144. },
  145. defaultNoises: {
  146. tag: "noises",
  147. protocol: "freedom",
  148. settings: {
  149. domainStrategy: "AsIs",
  150. noises: [
  151. { type: "rand", packet: "10-20", delay: "10-16", applyTo: "ip" },
  152. ],
  153. },
  154. },
  155. defaultMux: {
  156. enabled: true,
  157. concurrency: 8,
  158. xudpConcurrency: 16,
  159. xudpProxyUDP443: "reject"
  160. },
  161. defaultRules: [
  162. {
  163. type: "field",
  164. outboundTag: "direct",
  165. domain: [
  166. "geosite:category-ir"
  167. ]
  168. },
  169. {
  170. type: "field",
  171. outboundTag: "direct",
  172. ip: [
  173. "geoip:private",
  174. "geoip:ir"
  175. ]
  176. },
  177. ],
  178. directIPsOptions: [
  179. { label: 'Private IP', value: 'geoip:private' },
  180. { label: '🇮🇷 Iran', value: 'geoip:ir' },
  181. { label: '🇨🇳 China', value: 'geoip:cn' },
  182. { label: '🇷🇺 Russia', value: 'geoip:ru' },
  183. { label: '🇻🇳 Vietnam', value: 'geoip:vn' },
  184. { label: '🇪🇸 Spain', value: 'geoip:es' },
  185. { label: '🇮🇩 Indonesia', value: 'geoip:id' },
  186. { label: '🇺🇦 Ukraine', value: 'geoip:ua' },
  187. { label: '🇹🇷 Türkiye', value: 'geoip:tr' },
  188. { label: '🇧🇷 Brazil', value: 'geoip:br' },
  189. ],
  190. diretDomainsOptions: [
  191. { label: 'Private DNS', value: 'geosite:private' },
  192. { label: '🇮🇷 Iran', value: 'geosite:category-ir' },
  193. { label: '🇨🇳 China', value: 'geosite:cn' },
  194. { label: '🇷🇺 Russia', value: 'geosite:category-ru' },
  195. { label: 'Apple', value: 'geosite:apple' },
  196. { label: 'Meta', value: 'geosite:meta' },
  197. { label: 'Google', value: 'geosite:google' },
  198. ],
  199. get remarkModel() {
  200. rm = this.allSetting.remarkModel;
  201. return rm.length > 1 ? rm.substring(1).split('') : [];
  202. },
  203. set remarkModel(value) {
  204. rs = this.allSetting.remarkModel[0];
  205. this.allSetting.remarkModel = rs + value.join('');
  206. this.changeRemarkSample();
  207. },
  208. get remarkSeparator() {
  209. return this.allSetting.remarkModel.length > 1 ? this.allSetting.remarkModel.charAt(0) : '-';
  210. },
  211. set remarkSeparator(value) {
  212. this.allSetting.remarkModel = value + this.allSetting.remarkModel.substring(1);
  213. this.changeRemarkSample();
  214. },
  215. get datepicker() {
  216. return this.allSetting.datepicker ? this.allSetting.datepicker : 'gregorian';
  217. },
  218. set datepicker(value) {
  219. this.allSetting.datepicker = value;
  220. },
  221. changeRemarkSample() {
  222. sample = []
  223. this.remarkModel.forEach(r => sample.push(this.remarkModels[r]));
  224. this.remarkSample = sample.length == 0 ? '' : sample.join(this.remarkSeparator);
  225. }
  226. },
  227. methods: {
  228. loading(spinning = true) {
  229. this.loadingStates.spinning = spinning;
  230. },
  231. async getAllSetting() {
  232. const msg = await HttpUtil.post("/panel/setting/all");
  233. if (msg.success) {
  234. if (!this.loadingStates.fetched) {
  235. this.loadingStates.fetched = true
  236. }
  237. this.oldAllSetting = new AllSetting(msg.obj);
  238. this.allSetting = new AllSetting(msg.obj);
  239. app.changeRemarkSample();
  240. this.saveBtnDisable = true;
  241. }
  242. },
  243. async loadInboundTags() {
  244. const msg = await HttpUtil.get("/panel/api/inbounds/list");
  245. if (msg && msg.success && Array.isArray(msg.obj)) {
  246. this.inboundOptions = msg.obj.map(ib => ({
  247. label: `${ib.tag} (${ib.protocol}@${ib.port})`,
  248. value: ib.tag,
  249. }));
  250. } else {
  251. this.inboundOptions = [];
  252. }
  253. },
  254. async updateAllSetting() {
  255. this.loading(true);
  256. const msg = await HttpUtil.post("/panel/setting/update", this.allSetting);
  257. this.loading(false);
  258. if (msg.success) {
  259. await this.getAllSetting();
  260. }
  261. },
  262. async updateUser() {
  263. const sendUpdateUserRequest = async () => {
  264. this.loading(true);
  265. const msg = await HttpUtil.post("/panel/setting/updateUser", this.user);
  266. this.loading(false);
  267. if (msg.success) {
  268. this.user = {};
  269. window.location.replace(basePath + "logout");
  270. }
  271. }
  272. if (this.allSetting.twoFactorEnable) {
  273. twoFactorModal.show({
  274. title: '{{ i18n "pages.settings.security.twoFactorModalChangeCredentialsTitle" }}',
  275. description: '{{ i18n "pages.settings.security.twoFactorModalChangeCredentialsStep" }}',
  276. token: this.allSetting.twoFactorToken,
  277. type: 'confirm',
  278. confirm: (success) => {
  279. if (success) {
  280. sendUpdateUserRequest();
  281. }
  282. }
  283. })
  284. } else {
  285. sendUpdateUserRequest();
  286. }
  287. },
  288. async restartPanel() {
  289. await new Promise(resolve => {
  290. this.$confirm({
  291. title: '{{ i18n "pages.settings.restartPanel" }}',
  292. content: '{{ i18n "pages.settings.restartPanelDesc" }}',
  293. class: themeSwitcher.currentTheme,
  294. okText: '{{ i18n "sure" }}',
  295. cancelText: '{{ i18n "cancel" }}',
  296. onOk: () => resolve(),
  297. });
  298. });
  299. this.loading(true);
  300. const msg = await HttpUtil.post("/panel/setting/restartPanel");
  301. this.loading(false);
  302. if (msg.success) {
  303. this.loading(true);
  304. await PromiseUtil.sleep(5000);
  305. var { webCertFile, webKeyFile, webDomain: host, webPort: port, webBasePath: base } = this.allSetting;
  306. if (host == this.oldAllSetting.webDomain) host = null;
  307. if (port == this.oldAllSetting.webPort) port = null;
  308. const isTLS = webCertFile !== "" || webKeyFile !== "";
  309. const url = URLBuilder.buildURL({ host, port, isTLS, base, path: "panel/settings" });
  310. window.location.replace(url);
  311. }
  312. },
  313. toggleTwoFactor(newValue) {
  314. if (newValue) {
  315. const newTwoFactorToken = RandomUtil.randomBase32String()
  316. twoFactorModal.show({
  317. title: '{{ i18n "pages.settings.security.twoFactorModalSetTitle" }}',
  318. token: newTwoFactorToken,
  319. type: 'set',
  320. confirm: (success) => {
  321. if (success) {
  322. Vue.prototype.$message['success']('{{ i18n "pages.settings.security.twoFactorModalSetSuccess" }}')
  323. this.allSetting.twoFactorToken = newTwoFactorToken
  324. }
  325. this.allSetting.twoFactorEnable = success
  326. }
  327. })
  328. } else {
  329. twoFactorModal.show({
  330. title: '{{ i18n "pages.settings.security.twoFactorModalDeleteTitle" }}',
  331. description: '{{ i18n "pages.settings.security.twoFactorModalRemoveStep" }}',
  332. token: this.allSetting.twoFactorToken,
  333. type: 'confirm',
  334. confirm: (success) => {
  335. if (success) {
  336. Vue.prototype.$message['success']('{{ i18n "pages.settings.security.twoFactorModalDeleteSuccess" }}')
  337. this.allSetting.twoFactorEnable = false
  338. this.allSetting.twoFactorToken = ""
  339. }
  340. }
  341. })
  342. }
  343. },
  344. addNoise() {
  345. const newNoise = { type: "rand", packet: "10-20", delay: "10-16", applyTo: "ip" };
  346. this.noisesArray = [...this.noisesArray, newNoise];
  347. },
  348. removeNoise(index) {
  349. const newNoises = [...this.noisesArray];
  350. newNoises.splice(index, 1);
  351. this.noisesArray = newNoises;
  352. },
  353. updateNoiseType(index, value) {
  354. const updatedNoises = [...this.noisesArray];
  355. updatedNoises[index] = { ...updatedNoises[index], type: value };
  356. this.noisesArray = updatedNoises;
  357. },
  358. updateNoisePacket(index, value) {
  359. const updatedNoises = [...this.noisesArray];
  360. updatedNoises[index] = { ...updatedNoises[index], packet: value };
  361. this.noisesArray = updatedNoises;
  362. },
  363. updateNoiseDelay(index, value) {
  364. const updatedNoises = [...this.noisesArray];
  365. updatedNoises[index] = { ...updatedNoises[index], delay: value };
  366. this.noisesArray = updatedNoises;
  367. },
  368. updateNoiseApplyTo(index, value) {
  369. const updatedNoises = [...this.noisesArray];
  370. updatedNoises[index] = { ...updatedNoises[index], applyTo: value };
  371. this.noisesArray = updatedNoises;
  372. },
  373. },
  374. computed: {
  375. ldapInboundTagList: {
  376. get: function() {
  377. const csv = this.allSetting.ldapInboundTags || "";
  378. return csv.length ? csv.split(',').map(s => s.trim()).filter(Boolean) : [];
  379. },
  380. set: function(list) {
  381. this.allSetting.ldapInboundTags = Array.isArray(list) ? list.join(',') : '';
  382. }
  383. },
  384. fragment: {
  385. get: function () { return this.allSetting?.subJsonFragment != ""; },
  386. set: function (v) {
  387. this.allSetting.subJsonFragment = v ? JSON.stringify(this.defaultFragment) : "";
  388. }
  389. },
  390. fragmentPackets: {
  391. get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.packets : ""; },
  392. set: function (v) {
  393. if (v != "") {
  394. newFragment = JSON.parse(this.allSetting.subJsonFragment);
  395. newFragment.settings.fragment.packets = v;
  396. this.allSetting.subJsonFragment = JSON.stringify(newFragment);
  397. }
  398. }
  399. },
  400. fragmentLength: {
  401. get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.length : ""; },
  402. set: function (v) {
  403. if (v != "") {
  404. newFragment = JSON.parse(this.allSetting.subJsonFragment);
  405. newFragment.settings.fragment.length = v;
  406. this.allSetting.subJsonFragment = JSON.stringify(newFragment);
  407. }
  408. }
  409. },
  410. fragmentInterval: {
  411. get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.interval : ""; },
  412. set: function (v) {
  413. if (v != "") {
  414. newFragment = JSON.parse(this.allSetting.subJsonFragment);
  415. newFragment.settings.fragment.interval = v;
  416. this.allSetting.subJsonFragment = JSON.stringify(newFragment);
  417. }
  418. }
  419. },
  420. noises: {
  421. get() {
  422. return this.allSetting?.subJsonNoises != "";
  423. },
  424. set(v) {
  425. if (v) {
  426. this.allSetting.subJsonNoises = JSON.stringify(this.defaultNoises);
  427. } else {
  428. this.allSetting.subJsonNoises = "";
  429. }
  430. }
  431. },
  432. noisesArray: {
  433. get() {
  434. return this.noises ? JSON.parse(this.allSetting.subJsonNoises).settings.noises : [];
  435. },
  436. set(value) {
  437. if (this.noises) {
  438. const newNoises = JSON.parse(this.allSetting.subJsonNoises);
  439. newNoises.settings.noises = value;
  440. this.allSetting.subJsonNoises = JSON.stringify(newNoises);
  441. }
  442. }
  443. },
  444. enableMux: {
  445. get: function () { return this.allSetting?.subJsonMux != ""; },
  446. set: function (v) {
  447. this.allSetting.subJsonMux = v ? JSON.stringify(this.defaultMux) : "";
  448. }
  449. },
  450. muxConcurrency: {
  451. get: function () { return this.enableMux ? JSON.parse(this.allSetting.subJsonMux).concurrency : -1; },
  452. set: function (v) {
  453. newMux = JSON.parse(this.allSetting.subJsonMux);
  454. newMux.concurrency = v;
  455. this.allSetting.subJsonMux = JSON.stringify(newMux);
  456. }
  457. },
  458. muxXudpConcurrency: {
  459. get: function () { return this.enableMux ? JSON.parse(this.allSetting.subJsonMux).xudpConcurrency : -1; },
  460. set: function (v) {
  461. newMux = JSON.parse(this.allSetting.subJsonMux);
  462. newMux.xudpConcurrency = v;
  463. this.allSetting.subJsonMux = JSON.stringify(newMux);
  464. }
  465. },
  466. muxXudpProxyUDP443: {
  467. get: function () { return this.enableMux ? JSON.parse(this.allSetting.subJsonMux).xudpProxyUDP443 : "reject"; },
  468. set: function (v) {
  469. newMux = JSON.parse(this.allSetting.subJsonMux);
  470. newMux.xudpProxyUDP443 = v;
  471. this.allSetting.subJsonMux = JSON.stringify(newMux);
  472. }
  473. },
  474. enableDirect: {
  475. get: function () { return this.allSetting?.subJsonRules != ""; },
  476. set: function (v) {
  477. this.allSetting.subJsonRules = v ? JSON.stringify(this.defaultRules) : "";
  478. }
  479. },
  480. directIPs: {
  481. get: function () {
  482. if (!this.enableDirect) return [];
  483. const rules = JSON.parse(this.allSetting.subJsonRules);
  484. if (!Array.isArray(rules)) return [];
  485. const ipRule = rules.find(r => r.ip);
  486. return ipRule?.ip ?? [];
  487. },
  488. set: function (v) {
  489. let rules = JSON.parse(this.allSetting.subJsonRules);
  490. if (!Array.isArray(rules)) return;
  491. if (v.length == 0) {
  492. rules = rules.filter(r => !r.ip);
  493. } else {
  494. let ruleIndex = rules.findIndex(r => r.ip);
  495. if (ruleIndex == -1) ruleIndex = rules.push(this.defaultRules[1]) - 1;
  496. rules[ruleIndex].ip = [];
  497. v.forEach(d => {
  498. rules[ruleIndex].ip.push(d);
  499. });
  500. }
  501. this.allSetting.subJsonRules = JSON.stringify(rules);
  502. }
  503. },
  504. directDomains: {
  505. get: function () {
  506. if (!this.enableDirect) return [];
  507. const rules = JSON.parse(this.allSetting.subJsonRules);
  508. if (!Array.isArray(rules)) return [];
  509. const domainRule = rules.find(r => r.domain);
  510. return domainRule?.domain ?? [];
  511. },
  512. set: function (v) {
  513. let rules = JSON.parse(this.allSetting.subJsonRules);
  514. if (!Array.isArray(rules)) return;
  515. if (v.length == 0) {
  516. rules = rules.filter(r => !r.domain);
  517. } else {
  518. let ruleIndex = rules.findIndex(r => r.domain);
  519. if (ruleIndex == -1) ruleIndex = rules.push(this.defaultRules[0]) - 1;
  520. rules[ruleIndex].domain = v;
  521. }
  522. this.allSetting.subJsonRules = JSON.stringify(rules);
  523. }
  524. },
  525. confAlerts: {
  526. get: function () {
  527. if (!this.allSetting) return [];
  528. var alerts = []
  529. if (window.location.protocol !== "https:") alerts.push('{{ i18n "secAlertSSL" }}');
  530. if (this.allSetting.webPort === 2053) alerts.push('{{ i18n "secAlertPanelPort" }}');
  531. panelPath = window.location.pathname.split('/').length < 4
  532. if (panelPath && this.allSetting.webBasePath == '/') alerts.push('{{ i18n "secAlertPanelURI" }}');
  533. if (this.allSetting.subEnable) {
  534. subPath = this.allSetting.subURI.length > 0 ? new URL(this.allSetting.subURI).pathname : this.allSetting.subPath;
  535. if (subPath == '/sub/') alerts.push('{{ i18n "secAlertSubURI" }}');
  536. }
  537. if (this.allSetting.subJsonEnable) {
  538. subJsonPath = this.allSetting.subJsonURI.length > 0 ? new URL(this.allSetting.subJsonURI).pathname : this.allSetting.subJsonPath;
  539. if (subJsonPath == '/json/') alerts.push('{{ i18n "secAlertSubJsonURI" }}');
  540. }
  541. return alerts
  542. }
  543. }
  544. },
  545. async mounted() {
  546. await this.getAllSetting();
  547. await this.loadInboundTags();
  548. while (true) {
  549. await PromiseUtil.sleep(1000);
  550. this.saveBtnDisable = this.oldAllSetting.equals(this.allSetting);
  551. }
  552. }
  553. });
  554. </script>
  555. {{ template "page/body_end" .}}