mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-13 17:46:02 +00:00
Adds the settings entry as a new Vite multi-page input. Lays down the shared page chrome (sidebar, save bar, restart, security alert) and the AllSetting fetch/dirty-poll lifecycle so 5d-ii through 5d-vi can drop in tab partials without re-implementing it. - settings.html + src/settings.js: third Vite entry; mounts SettingsPage. - SettingsPage.vue: page chrome with the legacy two-button save/restart bar, conf-alerts banner, and 5 a-tabs (4 always-visible + the formats tab gated on subJsonEnable || subClashEnable). Each tab body is an a-empty placeholder until 5d-ii…vi fill them in. - useAllSetting.js composable: POST /panel/setting/all on mount, mirrors the legacy 1s busy-loop dirty check via setInterval, and exposes fetchAll/saveAll. saveDisabled flips off as soon as the user diverges from the server snapshot. - restartPanel rebuilds the URL (host/port/scheme/base path) from the saved settings so users land on the new endpoint after a port or cert change. - models/setting.js: adopts the @/utils alias and a leading file-level doc — semantics unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
18 lines
604 B
JavaScript
18 lines
604 B
JavaScript
import { createApp } from 'vue';
|
|
import Antd, { message } from 'ant-design-vue';
|
|
import 'ant-design-vue/dist/reset.css';
|
|
|
|
import { setupAxios } from '@/api/axios-init.js';
|
|
// Importing useTheme triggers the boot side-effect that applies the
|
|
// stored theme to <body>/<html> before Vue mounts.
|
|
import '@/composables/useTheme.js';
|
|
import SettingsPage from '@/pages/settings/SettingsPage.vue';
|
|
|
|
setupAxios();
|
|
|
|
const messageContainer = document.getElementById('message');
|
|
if (messageContainer) {
|
|
message.config({ getContainer: () => messageContainer });
|
|
}
|
|
|
|
createApp(SettingsPage).use(Antd).mount('#app');
|