feat: 添加通知功能自定义telegram域名功能

This commit is contained in:
Baobhan Sith
2025-05-11 13:02:09 +08:00
parent 598df938bf
commit d7bee11383
34 changed files with 121 additions and 71 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ const credentials = reactive({
password: '',
});
const twoFactorToken = ref(''); // 用于存储 2FA 验证码
const rememberMe = ref(false); // 新增:记住我状态,默认为 false
const rememberMe = ref(false); // 记住我状态,默认为 false
const captchaToken = ref<string | null>(null); // NEW: Store CAPTCHA token
const captchaError = ref<string | null>(null); // NEW: Store CAPTCHA specific error
const hcaptchaWidget = ref<InstanceType<typeof VueHcaptcha> | null>(null); // NEW: Ref for hCaptcha component instance
+2 -2
View File
@@ -819,7 +819,7 @@ const blacklistSettingsForm = reactive({ // Renamed to avoid conflict with store
loginBanDuration: '300', // 初始值将在 watcher 中被 store 值覆盖
});
const popupEditorEnabled = ref(true); // 本地状态,用于 v-model
const workspaceSidebarPersistentEnabled = ref(false); // 新增:侧边栏固定设置的本地状态
const workspaceSidebarPersistentEnabled = ref(false); // 侧边栏固定设置的本地状态
const commandInputSyncTargetLocal = ref<'none' | 'quickCommands' | 'commandHistory'>('none'); // NEW: Local state for command input sync target
const ipBlacklistEnabled = ref(true); // <-- Local state for IP Blacklist switch
const showConnectionTagsLocal = ref(true); // NEW: Local state for connection tags switch
@@ -944,7 +944,7 @@ watch(settings, (newSettings, oldSettings) => {
dockerInterval.value = parseInt(newSettings.dockerStatusIntervalSeconds || '2', 10); // 同步 Docker 间隔
dockerExpandDefault.value = dockerDefaultExpandBoolean.value; // 同步 Docker 默认展开状态
statusMonitorIntervalLocal.value = statusMonitorIntervalSecondsNumber.value; // 同步状态监控间隔
workspaceSidebarPersistentEnabled.value = workspaceSidebarPersistentBoolean.value; // 新增:同步侧边栏固定设置
workspaceSidebarPersistentEnabled.value = workspaceSidebarPersistentBoolean.value; // 同步侧边栏固定设置
commandInputSyncTargetLocal.value = commandInputSyncTarget.value; // NEW: Sync command input sync target
selectedTimezone.value = newSettings.timezone || 'UTC'; // 同步时区设置
ipBlacklistEnabled.value = ipBlacklistEnabledBoolean.value; // <-- Sync IP Blacklist enabled state
+4 -4
View File
@@ -88,11 +88,11 @@ import { ref } from 'vue';
import apiClient from '../utils/apiClient'; // 使用统一的 apiClient
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useAuthStore } from '../stores/auth.store'; // *** 新增:导入 Auth Store ***
import { useAuthStore } from '../stores/auth.store'; // *** 导入 Auth Store ***
const { t } = useI18n();
const router = useRouter();
const authStore = useAuthStore(); // *** 新增:获取 Auth Store 实例 ***
const authStore = useAuthStore(); // *** 获取 Auth Store 实例 ***
const username = ref('');
const password = ref('');
@@ -125,9 +125,9 @@ const handleSetup = async () => {
confirmPassword: confirmPassword.value
});
successMessage.value = t('setup.success');
// *** 新增:手动更新 needsSetup 状态 ***
// *** 手动更新 needsSetup 状态 ***
authStore.needsSetup = false;
// *** 新增:重置认证状态,因为设置完成后需要重新登录 ***
// *** 重置认证状态,因为设置完成后需要重新登录 ***
authStore.isAuthenticated = false;
authStore.user = null;
// 禁用表单或按钮,防止重复提交