feat(app): новый визуальный язык, верхняя навигация, портфели, создание счетов и ручные события
Тема и общие виджеты (AssetIcon, ServiceMark, HelpTip, глоссарий), верхняя панель TopNav и вкладки Аналитики вместо NavSidebar, иконки PWA. Экраны: портфели, создание брокерского счёта, ручное событие, правка инструмента, Обзор карточками по скоупам и таблица активов, пересчёт метрик с опросом /metrics/status. design-system.md обновлён.
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// The three groups the sidebar buckets destinations under (Grimmory-style caps headers).
|
||||
/// Order here is display order, top to bottom.
|
||||
/// The groups destinations belong to: the main tabs, the ledger screens behind «Операции», and
|
||||
/// the system ones (Здоровье, Настройки) that sit as icons on the right of the top bar.
|
||||
enum NavGroup { overview, ledger, system }
|
||||
|
||||
const navGroupLabels = {
|
||||
NavGroup.overview: 'ОБЗОР',
|
||||
NavGroup.ledger: 'ОПЕРАЦИИ',
|
||||
NavGroup.system: 'СИСТЕМА',
|
||||
};
|
||||
|
||||
class NavDestination {
|
||||
const NavDestination(this.path, this.icon, this.selectedIcon, this.label, this.group,
|
||||
{this.alsoMatches = const [], this.primary = false});
|
||||
const NavDestination(
|
||||
this.path,
|
||||
this.icon,
|
||||
this.selectedIcon,
|
||||
this.label,
|
||||
this.group, {
|
||||
this.alsoMatches = const [],
|
||||
this.primary = false,
|
||||
});
|
||||
final String path;
|
||||
final IconData icon;
|
||||
final IconData selectedIcon;
|
||||
@@ -39,28 +40,97 @@ class NavDestination {
|
||||
}
|
||||
|
||||
const navDestinations = [
|
||||
NavDestination('/', Icons.dashboard_outlined, Icons.dashboard, 'Обзор', NavGroup.overview,
|
||||
primary: true),
|
||||
NavDestination(
|
||||
'/accounts', Icons.account_balance_outlined, Icons.account_balance, 'Счета', NavGroup.overview,
|
||||
primary: true),
|
||||
'/',
|
||||
Icons.dashboard_outlined,
|
||||
Icons.dashboard,
|
||||
'Обзор',
|
||||
NavGroup.overview,
|
||||
primary: true,
|
||||
),
|
||||
// One entry for the phase-4 screens. They keep their own top-level routes from the
|
||||
// contract and stay deep-linkable; `/analytics` is what the bars point at, and
|
||||
// `alsoMatches` keeps it highlighted while you are inside any of them.
|
||||
NavDestination(
|
||||
'/portfolio', Icons.pie_chart_outline, Icons.pie_chart, 'Портфель', NavGroup.overview,
|
||||
primary: true),
|
||||
// One entry for the four phase-4 screens. They keep their own top-level routes from the
|
||||
// contract and stay deep-linkable; the hub at `/analytics` is what the bottom bar and the
|
||||
// rail point at, and `alsoMatches` keeps it highlighted while you are inside any of them.
|
||||
NavDestination('/analytics', Icons.insights_outlined, Icons.insights, 'Аналитика', NavGroup.overview,
|
||||
alsoMatches: ['/income', '/rebalance', '/goals', '/tax'], primary: true),
|
||||
NavDestination('/events', Icons.event_note_outlined, Icons.event_note, 'События', NavGroup.ledger),
|
||||
NavDestination('/imports', Icons.upload_file_outlined, Icons.upload_file, 'Импорт', NavGroup.ledger,
|
||||
alsoMatches: ['/instruments/pending']),
|
||||
NavDestination('/cashflow', Icons.swap_horiz_outlined, Icons.swap_horiz, 'Потоки', NavGroup.ledger),
|
||||
NavDestination('/categories', Icons.category_outlined, Icons.category, 'Категории', NavGroup.ledger),
|
||||
'/analytics',
|
||||
Icons.insights_outlined,
|
||||
Icons.insights,
|
||||
'Аналитика',
|
||||
NavGroup.overview,
|
||||
alsoMatches: ['/income', '/rebalance', '/goals', '/tax', '/portfolios'],
|
||||
primary: true,
|
||||
),
|
||||
NavDestination(
|
||||
'/transactions', Icons.receipt_long_outlined, Icons.receipt_long, 'Операции', NavGroup.ledger),
|
||||
NavDestination('/rules', Icons.rule_folder_outlined, Icons.rule_folder, 'Правила', NavGroup.ledger),
|
||||
'/portfolio',
|
||||
Icons.pie_chart_outline,
|
||||
Icons.pie_chart,
|
||||
'Портфель',
|
||||
NavGroup.overview,
|
||||
primary: true,
|
||||
),
|
||||
NavDestination(
|
||||
'/health', Icons.monitor_heart_outlined, Icons.monitor_heart, 'Здоровье', NavGroup.system),
|
||||
NavDestination('/settings', Icons.settings_outlined, Icons.settings, 'Настройки', NavGroup.system),
|
||||
'/accounts',
|
||||
Icons.account_balance_outlined,
|
||||
Icons.account_balance,
|
||||
'Счета',
|
||||
NavGroup.overview,
|
||||
primary: true,
|
||||
),
|
||||
NavDestination(
|
||||
'/events',
|
||||
Icons.event_note_outlined,
|
||||
Icons.event_note,
|
||||
'События',
|
||||
NavGroup.ledger,
|
||||
),
|
||||
NavDestination(
|
||||
'/imports',
|
||||
Icons.upload_file_outlined,
|
||||
Icons.upload_file,
|
||||
'Импорт',
|
||||
NavGroup.ledger,
|
||||
alsoMatches: ['/instruments/pending'],
|
||||
),
|
||||
NavDestination(
|
||||
'/cashflow',
|
||||
Icons.swap_horiz_outlined,
|
||||
Icons.swap_horiz,
|
||||
'Потоки',
|
||||
NavGroup.ledger,
|
||||
),
|
||||
NavDestination(
|
||||
'/categories',
|
||||
Icons.category_outlined,
|
||||
Icons.category,
|
||||
'Категории',
|
||||
NavGroup.ledger,
|
||||
),
|
||||
NavDestination(
|
||||
'/transactions',
|
||||
Icons.receipt_long_outlined,
|
||||
Icons.receipt_long,
|
||||
'Операции',
|
||||
NavGroup.ledger,
|
||||
),
|
||||
NavDestination(
|
||||
'/rules',
|
||||
Icons.rule_folder_outlined,
|
||||
Icons.rule_folder,
|
||||
'Правила',
|
||||
NavGroup.ledger,
|
||||
),
|
||||
NavDestination(
|
||||
'/health',
|
||||
Icons.monitor_heart_outlined,
|
||||
Icons.monitor_heart,
|
||||
'Здоровье',
|
||||
NavGroup.system,
|
||||
),
|
||||
NavDestination(
|
||||
'/settings',
|
||||
Icons.settings_outlined,
|
||||
Icons.settings,
|
||||
'Настройки',
|
||||
NavGroup.system,
|
||||
),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user