Оформление StackWorks и русский язык по умолчанию

Логотип и значок StackWorks, палитра и шрифты бренда, тёмные верхняя полоса и
боковое меню, язык интерфейса всегда русский, перевод схемы сервера по словарю
src/i18n/schema-ru.json (заполняется отдельно), рабочие файлы перевода в i18n-work.

Claude-Session: https://claude.ai/code/session_01BFaqS6mH9sa99RWghq2j46
Этот коммит содержится в:
2026-10-06 01:28:34 +09:00
родитель dc462b137f
Коммит 891297bdac
34 изменённых файлов: 10359 добавлений и 65 удалений
+12 -15
Просмотреть файл
@@ -10,22 +10,19 @@ import { getLogoState, loadLogoOnce, subscribeToLogo } from '@/lib/logoCache';
export function DefaultLogo() {
const { t } = useTranslation();
// Знак StackWorks вместо логотипа Stalwart (сборка stalwart-webui-ru)
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="95 84 500 90"
aria-label={t('logo.stalwartAlt', 'Stalwart Logo')}
className="h-7 w-auto max-w-[320px]"
>
<path
className="fill-current"
d="M227.8 143.6c.3 4.2 2.1 7.6 5.1 10.1 3.1 2.5 7.1 3.8 12.1 3.8 4.3 0 7.9-.9 10.5-2.8 2.7-1.9 4-4.5 4-7.8 0-2.4-.7-4.3-2.2-5.7-1.5-1.4-3.4-2.5-6-3.2-2.5-.7-6-1.5-10.6-2.3-4.6-.8-8.6-1.9-11.9-3.2-3.3-1.3-6-3.3-8.1-6.1-2.1-2.7-3.1-6.3-3.1-10.7 0-4.1 1.1-7.7 3.2-10.9s5.1-5.7 9-7.4c3.8-1.8 8.2-2.6 13.2-2.6 5.1 0 9.6 1 13.7 2.9 4 1.9 7.2 4.5 9.5 7.8s3.6 7.1 3.8 11.4h-11.5c-.4-3.7-2-6.6-4.8-8.9-2.8-2.2-6.3-3.4-10.6-3.4-4.1 0-7.5.9-9.9 2.7-2.5 1.8-3.7 4.3-3.7 7.6 0 2.3.7 4.1 2.2 5.5 1.5 1.4 3.4 2.4 5.9 3.1 2.4.7 5.9 1.4 10.5 2.2 4.6.8 8.6 1.9 11.9 3.3 3.3 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.2 8.8-9.4c3.7-2.2 7.9-3.3 12.6-3.3 3.9 0 7.2.7 10.1 2.2 2.9 1.5 5.2 3.5 6.9 6.1l1.3-7.6h9.7zm-15.1 38.7c2.8-3.2 4.2-7.3 4.2-12.4 0-5.2-1.4-9.4-4.2-12.6-2.8-3.3-6.5-4.9-11-4.9-4.6 0-8.2 1.6-11 4.8-2.8 3.2-4.2 7.4-4.2 12.5 0 5.2 1.4 9.4 4.2 12.6 2.8 3.2 6.5 4.8 11 4.8 4.6 0 8.2-1.6 11-4.8zM551.3 114.6v10.3h-4.9c-4.6 0-7.8 1.5-9.9 4.4-2 3-3.1 6.7-3.1 11.3v26.2h-11v-52.2h9.8l1.2 7.8c1.5-2.4 3.4-4.4 5.8-5.8 2.4-1.4 5.6-2.1 9.6-2.1h2.5zM556.3 102.1l11-2.1v14.6h12.6v9.7h-12.6v27.2c0 2 .4 3.5 1.2 4.3.8.9 2.2 1.3 4.2 1.3h8.4v9.7h-10.6c-5 0-8.6-1.2-10.8-3.5s-3.4-5.9-3.4-10.7v-50.5z"
/>
<path
fill="#db2d54"
d="M149.1 84.7h-4.8l-44.8 25.9v8.3l44.8 25.9h4.8l44.8-25.9v-8.3l-44.8-25.9zm32.9 30h-35.3V94.4l35.3 20.3zm-35.3 20.4-35.3-20.4 27-15.6v20.2l6.3 3.6h22.9l-20.9 12.2zM99.5 129.9v11l44.8 25.9h4.8l44.8-25.9v-11l-47.2 27.3zM187.3 166.8l6.6-3.8v-11l-25.7 14.8zM99.5 163l6.6 3.8h19.1L99.5 152z"
/>
</svg>
<span className="sw-logo flex items-center gap-2.5" aria-label={t('logo.stalwartAlt', 'StackWorks')}>
<svg viewBox="0 0 100 100" className="h-8 w-8 shrink-0" aria-hidden="true">
<rect x="2" y="2" width="96" height="96" rx="25" fill="#F3F1EB" />
<rect x="20" y="29" width="44" height="12" rx="6" fill="#16171C" />
<rect x="30" y="45" width="50" height="12" rx="6" fill="#FF4A1C" />
<rect x="40" y="61" width="34" height="12" rx="6" fill="#16171C" />
</svg>
<span className="sw-logo-text">
StackWorks<small>почта</small>
</span>
</span>
);
}
+5 -5
Просмотреть файл
@@ -149,7 +149,7 @@ function SidebarSubItem({
ref={isActive ? activeItemRef : undefined}
className={cn(
'w-full justify-start gap-2 font-normal',
isActive && 'bg-accent text-accent-foreground',
isActive && 'bg-accent text-accent-foreground sw-active',
depth > 0 && 'text-sm',
)}
style={{ paddingLeft: `${(depth + 1) * 12 + 8}px` }}
@@ -241,7 +241,7 @@ function SidebarTopItem({
<Button
variant="ghost"
ref={isActive ? activeItemRef : undefined}
className={cn('w-full justify-start gap-2 font-normal', isActive && 'bg-accent text-accent-foreground')}
className={cn('w-full justify-start gap-2 font-normal', isActive && 'bg-accent text-accent-foreground sw-active')}
onClick={() => {
if (isLocked) {
onUpsell();
@@ -347,7 +347,7 @@ export function Sidebar() {
className="fixed inset-0 top-14 z-20 bg-black/40 md:hidden"
onClick={() => setSidebarOpen(false)}
/>
<aside className="fixed top-14 left-0 bottom-0 z-30 flex w-64 flex-col border-r bg-background">
<aside className="sw-aside fixed top-14 left-0 bottom-0 z-30 flex w-64 flex-col border-r bg-background">
<div className="flex-1 overflow-y-auto py-2 [scrollbar-width:thin]">
<nav className="flex flex-col gap-0.5 px-2">
{layout.items.map((item) => (
@@ -367,7 +367,7 @@ export function Sidebar() {
{layouts.length > 1 && (
<TooltipProvider>
<div className="flex items-center justify-around border-t bg-background px-2 py-2">
<div className="sw-aside-foot flex items-center justify-around border-t bg-background px-2 py-2">
{layouts.map((target) => {
const Icon = (LucideIcons as Record<string, unknown>)[
target.icon
@@ -386,7 +386,7 @@ export function Sidebar() {
aria-label={target.name}
aria-current={isActive ? 'page' : undefined}
onClick={() => handleSectionClick(target)}
className={cn('h-9 w-9', isActive && 'bg-accent text-accent-foreground')}
className={cn('h-9 w-9', isActive && 'bg-accent text-accent-foreground sw-active')}
>
{Icon ? <Icon className="h-4 w-4" /> : <LucideIcons.Circle className="h-4 w-4" />}
</Button>
+1 -1
Просмотреть файл
@@ -75,7 +75,7 @@ export function TopBar() {
: [];
return (
<header className="sticky top-0 z-40 flex h-14 items-center gap-4 border-b bg-background px-4">
<header className="sw-top sticky top-0 z-40 flex h-14 items-center gap-4 border-b bg-background px-4">
<Button variant="ghost" size="icon" onClick={toggleSidebar} className="md:hidden">
<Menu className="h-4 w-4" />
</Button>