fix: stabilize settings icons and back label

This commit is contained in:
mirivlad 2026-06-04 07:47:40 +08:00
parent c40d8c9dd3
commit cc157a2d36
9 changed files with 53 additions and 18 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,8 +16,8 @@
background: #13131f; background: #13131f;
} }
</style> </style>
<script type="module" crossorigin src="/assets/main-gfkCdjpq.js"></script> <script type="module" crossorigin src="/assets/main-BKrU8NaM.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-ANUqg_zC.css"> <link rel="stylesheet" crossorigin href="/assets/main-CsuqbBfE.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -1710,7 +1710,7 @@
}}/> }}/>
<button class="btn btn-sm back-btn" on:click={navigateBack}> <button class="btn btn-sm back-btn" on:click={navigateBack}>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>
{t('common.back')} {t('common.backLabel')}
</button> </button>
{:else} {:else}
<FileBreadcrumbs crumbs={[{ name: t('file.root') }]}/> <FileBreadcrumbs crumbs={[{ name: t('file.root') }]}/>

View File

@ -5,14 +5,14 @@
export let onSelect = null export let onSelect = null
const sections = [ const sections = [
{ id: 'general', label: t('settings.general'), icon: '⚙️' }, { id: 'general', label: t('settings.general') },
{ id: 'workspace', label: t('settings.workspace'), icon: '🏠' }, { id: 'workspace', label: t('settings.workspace') },
{ id: 'templates', label: t('settings.templates'), icon: '📋' }, { id: 'templates', label: t('settings.templates') },
{ id: 'plugins', label: t('settings.plugins'), icon: '🔌' }, { id: 'plugins', label: t('settings.plugins') },
{ id: 'files', label: t('settings.files'), icon: '📁' }, { id: 'files', label: t('settings.files') },
{ id: 'activity', label: t('settings.activity'), icon: '📊' }, { id: 'activity', label: t('settings.activity') },
{ id: 'sync', label: t('settings.sync'), icon: '🔄' }, { id: 'sync', label: t('settings.sync') },
{ id: 'backup', label: t('settings.backup'), icon: '💾' }, { id: 'backup', label: t('settings.backup') },
] ]
function select(id) { function select(id) {
@ -28,7 +28,38 @@
class:disabled={sec.id === 'plugins' || sec.id === 'files' || sec.id === 'activity' || sec.id === 'backup'} class:disabled={sec.id === 'plugins' || sec.id === 'files' || sec.id === 'activity' || sec.id === 'backup'}
on:click={() => select(sec.id)} on:click={() => select(sec.id)}
> >
<span class="settings-nav-icon">{sec.icon}</span> <span class="settings-nav-icon">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
{#if sec.id === 'general'}
<circle cx="12" cy="12" r="3"/>
<path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 0 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V22h-4v-.2a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 0 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H2v-4h.2a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 0 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3 1.7 1.7 0 0 0 1-1.5V2h4v.2a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 0 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8 1.7 1.7 0 0 0 1.5 1h.2v4h-.2a1.7 1.7 0 0 0-1.4 1z"/>
{:else if sec.id === 'workspace'}
<path d="M3 10.5 12 3l9 7.5"/>
<path d="M5 9.5V21h14V9.5"/>
<path d="M10 21v-6h4v6"/>
{:else if sec.id === 'templates'}
<rect x="4" y="3" width="16" height="18" rx="2"/>
<path d="M8 7h8M8 11h8M8 15h5"/>
{:else if sec.id === 'plugins'}
<path d="M9 3v5M15 3v5M7 8h10v3a5 5 0 0 1-10 0V8z"/>
<path d="M12 16v5"/>
{:else if sec.id === 'files'}
<path d="M3 6h6l2 2h10v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6z"/>
{:else if sec.id === 'activity'}
<path d="M4 19V9M10 19V5M16 19v-7M22 19H2"/>
{:else if sec.id === 'sync'}
<path d="M20 11a8 8 0 0 0-14-4l-2 2"/>
<path d="M4 5v4h4"/>
<path d="M4 13a8 8 0 0 0 14 4l2-2"/>
<path d="M20 19v-4h-4"/>
{:else if sec.id === 'backup'}
<path d="M5 4h12l2 2v14H5z"/>
<path d="M8 4v6h8V4"/>
<path d="M8 20v-6h8v6"/>
{/if}
</svg>
</span>
<span class="settings-nav-label">{sec.label}</span> <span class="settings-nav-label">{sec.label}</span>
</button> </button>
{/each} {/each}
@ -72,9 +103,11 @@
cursor: default; cursor: default;
} }
.settings-nav-icon { .settings-nav-icon {
font-size: 1rem;
width: 1.4rem; width: 1.4rem;
text-align: center; height: 1rem;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0; flex-shrink: 0;
} }
.settings-nav-label { .settings-nav-label {

View File

@ -37,6 +37,7 @@ export default {
'common.create': 'Create', 'common.create': 'Create',
'common.confirm': 'Confirm', 'common.confirm': 'Confirm',
'common.back': '← Back', 'common.back': '← Back',
'common.backLabel': 'Back',
'common.loading': 'Loading...', 'common.loading': 'Loading...',
'common.error': 'Error:', 'common.error': 'Error:',
'common.yes': 'Yes', 'common.yes': 'Yes',

View File

@ -39,6 +39,7 @@ export default {
'common.create': 'Создать', 'common.create': 'Создать',
'common.confirm': 'Подтверждение', 'common.confirm': 'Подтверждение',
'common.back': '← Назад', 'common.back': '← Назад',
'common.backLabel': 'Назад',
'common.loading': 'Загрузка...', 'common.loading': 'Загрузка...',
'common.error': 'Ошибка:', 'common.error': 'Ошибка:',
'common.yes': 'Да', 'common.yes': 'Да',