stabilization: server.go split + i18n templates + frontend localization

cmd/verstak-server/server.go (2838→127 строк): разделён на 12 файлов
- config.go, tokens.go, schema.go
- server.go (только struct + NewServer + ListenAndServe)
- routes.go, middleware.go, smtp.go
- handlers_api.go, handlers_user.go, handlers_web_user.go, handlers_admin.go
- templates.go (конвертирован в функции с i18n.T())

frontend: все русские строки заменены на t() вызовы
- App.svelte, FileTreeRow.svelte, ConfirmModal.svelte
- FilePreviewModal.svelte, fileUtils.js

core: gofmt по всему проекту

Все сборки (CLI, server, gui, frontend), go vet, go test проходят.
check-i18n.sh: frontend чист, Go-файлы с кириллицей — только тесты/легаси.
This commit is contained in:
2026-06-02 11:08:29 +08:00
parent 3089d777a8
commit 2fa583d157
33 changed files with 3276 additions and 3067 deletions
+15 -15
View File
@@ -7,19 +7,19 @@ import (
// Node is the central entity of Verstak — a tree item that can be
// a case, folder, note, document, etc.
type Node struct {
ID string `json:"id"`
ParentID *string `json:"parent_id,omitempty"`
Type string `json:"type"`
Title string `json:"title"`
Slug string `json:"slug"`
Path *string `json:"path,omitempty"`
Section string `json:"section,omitempty"`
SortOrder int `json:"sort_order"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
Revision int `json:"revision"`
DeviceID *string `json:"device_id,omitempty"`
ID string `json:"id"`
ParentID *string `json:"parent_id,omitempty"`
Type string `json:"type"`
Title string `json:"title"`
Slug string `json:"slug"`
Path *string `json:"path,omitempty"`
Section string `json:"section,omitempty"`
SortOrder int `json:"sort_order"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
Revision int `json:"revision"`
DeviceID *string `json:"device_id,omitempty"`
}
// IsDeleted reports whether the node has been soft-deleted.
@@ -40,6 +40,6 @@ type Meta struct {
// NodeWithMeta bundles a node and its metadata entries.
type NodeWithMeta struct {
Node Node `json:"node"`
Meta []Meta `json:"meta"`
Node Node `json:"node"`
Meta []Meta `json:"meta"`
}