feat: add i18n, platform channels page, and WeChat QR login
- Add vue-i18n with auto-detect browser language and manual toggle (EN/中文) - Move platform channels to separate page with credential management - Support Telegram, Discord, Slack, WhatsApp, Matrix, Feishu, Weixin, WeCom - Add WeChat QR code login (opens in browser, polls status, auto-saves) - Write platform credentials to ~/.hermes/.env matching hermes gateway setup - Auto restart gateway after platform config changes - Add settings store with per-section save for all config categories - Persist session group collapse state across navigation - Fix pre-existing TypeScript build errors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { NSelect } from 'naive-ui'
|
||||
|
||||
const { locale, availableLocales } = useI18n()
|
||||
|
||||
const options = computed(() =>
|
||||
availableLocales.map(loc => ({
|
||||
label: loc === 'zh' ? '中文' : 'English',
|
||||
value: loc,
|
||||
})),
|
||||
)
|
||||
|
||||
function handleChange(val: string) {
|
||||
locale.value = val
|
||||
localStorage.setItem('hermes_locale', val)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NSelect
|
||||
:value="locale"
|
||||
:options="options"
|
||||
size="tiny"
|
||||
:consistent-menu-width="false"
|
||||
style="width: 90px"
|
||||
@update:value="handleChange"
|
||||
/>
|
||||
</template>
|
||||
Reference in New Issue
Block a user