70ddbd0bcd
- Add username/password login as additional auth mechanism alongside existing token - First login must use token; password can be configured in Settings > Account - Password login returns the existing static token (no auth middleware changes) - Add account settings: setup, change password, change username, remove password - Add logout button to sidebar footer - Add version changelog popup (click version number in sidebar) - Support all 8 locales (en, zh, de, es, fr, ja, ko, pt) - Bump version to 0.4.3 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
81 lines
2.4 KiB
Vue
81 lines
2.4 KiB
Vue
<script setup lang="ts">
|
|
import { onMounted } from "vue";
|
|
import {
|
|
NTabs,
|
|
NTabPane,
|
|
NSpin,
|
|
} from "naive-ui";
|
|
import { useI18n } from "vue-i18n";
|
|
import { useSettingsStore } from "@/stores/hermes/settings";
|
|
import DisplaySettings from "@/components/hermes/settings/DisplaySettings.vue";
|
|
import AgentSettings from "@/components/hermes/settings/AgentSettings.vue";
|
|
import MemorySettings from "@/components/hermes/settings/MemorySettings.vue";
|
|
import SessionSettings from "@/components/hermes/settings/SessionSettings.vue";
|
|
import PrivacySettings from "@/components/hermes/settings/PrivacySettings.vue";
|
|
import ModelSettings from "@/components/hermes/settings/ModelSettings.vue";
|
|
import AccountSettings from "@/components/hermes/settings/AccountSettings.vue";
|
|
|
|
const settingsStore = useSettingsStore();
|
|
const { t } = useI18n();
|
|
|
|
onMounted(() => {
|
|
settingsStore.fetchSettings();
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="settings-view">
|
|
<header class="page-header">
|
|
<h2 class="header-title">{{ t("settings.title") }}</h2>
|
|
</header>
|
|
|
|
<div class="settings-content">
|
|
<NSpin
|
|
:show="settingsStore.loading || settingsStore.saving"
|
|
size="large"
|
|
:description="t('common.loading')"
|
|
>
|
|
<NTabs type="line" animated>
|
|
<NTabPane name="account" :tab="t('settings.tabs.account')">
|
|
<AccountSettings />
|
|
</NTabPane>
|
|
<NTabPane name="display" :tab="t('settings.tabs.display')">
|
|
<DisplaySettings />
|
|
</NTabPane>
|
|
<NTabPane name="agent" :tab="t('settings.tabs.agent')">
|
|
<AgentSettings />
|
|
</NTabPane>
|
|
<NTabPane name="memory" :tab="t('settings.tabs.memory')">
|
|
<MemorySettings />
|
|
</NTabPane>
|
|
<NTabPane name="session" :tab="t('settings.tabs.session')">
|
|
<SessionSettings />
|
|
</NTabPane>
|
|
<NTabPane name="privacy" :tab="t('settings.tabs.privacy')">
|
|
<PrivacySettings />
|
|
</NTabPane>
|
|
<NTabPane name="models" :tab="t('settings.tabs.models')">
|
|
<ModelSettings />
|
|
</NTabPane>
|
|
</NTabs>
|
|
</NSpin>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
@use "@/styles/variables" as *;
|
|
|
|
.settings-view {
|
|
height: calc(100 * var(--vh));
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.settings-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
}
|
|
</style>
|