- variables.css: tighter color palette, modern radius scale (6/8/12/16px), refined shadows, added --radius-xs/xl/full, --bg-elevated tokens - base.css: thinner 5px scrollbar with full-radius thumb, improved input focus with box-shadow ring, line-height 1.5 - AppShell: resize handle 4px→1px with invisible 6px grab zone via ::after, empty state polish (subtle icon, lift animation on CTA) - AccountSwitcher: square avatars → circular (border-radius: 50%), active state uses accent ring (box-shadow double border) instead of bg fill - FolderTreeItem: accent left-bar indicator on active item via ::before, accent-muted background on active, folder names default to text-secondary (hover → text-primary), folder header removed uppercase for email - FolderTree: removed uppercase from account email label - MessageListItem: slightly larger subject/snippet font sizes, sender defaults to text-secondary - MessageHeader: word-break: break-all → overflow-wrap: anywhere, more padding, badge borders added, flagged badge refined - StatusBar: explicit height via CSS variable, flex-shrink: 0 - AddAccountDialog: backdrop-filter blur, border-radius xl, form label uppercase style, submit button lift animation - SettingsView: more padding, border on account items, section h2 refined Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
71 lines
1.9 KiB
Vue
71 lines
1.9 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useAccountsStore } from '../../stores/accounts.store'
|
|
import { useFoldersStore } from '../../stores/folders.store'
|
|
import { useMessagesStore } from '../../stores/messages.store'
|
|
|
|
const accountsStore = useAccountsStore()
|
|
const foldersStore = useFoldersStore()
|
|
const messagesStore = useMessagesStore()
|
|
|
|
const statusText = computed(() => {
|
|
if (!accountsStore.activeAccount) return 'Аккаунт не выбран'
|
|
const folder = foldersStore.activeFolder
|
|
if (!folder) return accountsStore.activeAccount.email
|
|
return `${folder.name} — ${messagesStore.totalCount} сообщений`
|
|
})
|
|
|
|
const connectionText = computed(() => {
|
|
if (!accountsStore.activeAccountId) return ''
|
|
const status = accountsStore.connectionStatus[accountsStore.activeAccountId]
|
|
if (!status) return 'Отключено'
|
|
return status.connected ? 'Подключено' : `Ошибка: ${status.error ?? 'Отключено'}`
|
|
})
|
|
|
|
const isConnected = computed(() => {
|
|
if (!accountsStore.activeAccountId) return false
|
|
return accountsStore.connectionStatus[accountsStore.activeAccountId]?.connected ?? false
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div class="statusbar">
|
|
<span class="status-text">{{ statusText }}</span>
|
|
<span class="connection-status">
|
|
<span class="status-dot" :class="{ connected: isConnected }" />
|
|
{{ connectionText }}
|
|
</span>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.statusbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
height: var(--statusbar-height);
|
|
padding: 0 14px;
|
|
background: var(--bg-tertiary);
|
|
border-top: 1px solid var(--border);
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.connection-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: var(--danger);
|
|
}
|
|
|
|
.status-dot.connected {
|
|
background: var(--success);
|
|
}
|
|
</style>
|