| | |
| | | import { currentPage } from '../../lib/stores/app' |
| | | import { t } from '../../lib/i18n' |
| | | import GeneralPage from './GeneralPage.svelte' |
| | | import LanguagePage from './LanguagePage.svelte' |
| | | import PermissionsPage from './PermissionsPage.svelte' |
| | | import HistoryPage from './HistoryPage.svelte' |
| | | import UserDictPage from './UserDictPage.svelte' |
| | |
| | | |
| | | const navItems = [ |
| | | { id: 'general', label: () => t('nav.home') }, |
| | | { id: 'language', label: () => t('nav.language') }, |
| | | { id: 'userdict', label: () => t('nav.userdict') }, |
| | | { id: 'permissions', label: () => t('nav.permissions') }, |
| | | { id: 'history', label: () => t('nav.history') }, |
| | |
| | | <path d="M2.5 7.5L8 3l5.5 4.5"/> |
| | | <path d="M4 6.5V13h3v-3.5h2V13h3V6.5"/> |
| | | </svg> |
| | | {:else if item.id === 'language'} |
| | | <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"> |
| | | <circle cx="8" cy="8" r="6"/> |
| | | <path d="M2.5 8h11"/> |
| | | <path d="M8 2.5c1.5 1.6 2.2 3.4 2.2 5.5S9.5 11.9 8 13.5"/> |
| | | <path d="M8 2.5C6.5 4.1 5.8 5.9 5.8 8s.7 3.9 2.2 5.5"/> |
| | | </svg> |
| | | {:else if item.id === 'history'} |
| | | <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"> |
| | | <circle cx="8" cy="8" r="6"/> |
| | |
| | | <main class="content"> |
| | | {#if page === 'general'} |
| | | <GeneralPage /> |
| | | {:else if page === 'language'} |
| | | <LanguagePage /> |
| | | {:else if page === 'userdict'} |
| | | <UserDictPage /> |
| | | {:else if page === 'permissions'} |