feat: add StroyBot app shell with URL routing
One web part replaces the separate stroy-bot-* web parts. The section and its parameters live in the page query string (?page=objects&projectId=5), so links can be copied, opened in a new tab and the browser Back button works. - shared config: site/Dataverse/API addresses, list and table names - HTTP layer behind IHttpClient so repositories can be unit-tested - ui-kit AppLayout + Sidebar, placeholder for sections not ported yet - migration checklist with every feature of the old web parts - design tokens mirrored from ui-kit instead of 8 copies Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
@import '../../../../styles/design-tokens';
|
||||
|
||||
.emptyState {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: $sp-2;
|
||||
padding: $sp-8 $sp-4;
|
||||
text-align: center;
|
||||
color: $gray-500;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: $r-full;
|
||||
background: $navy-50;
|
||||
color: $navy-700;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0;
|
||||
font-family: $font-sans;
|
||||
font-size: $fs-body;
|
||||
font-weight: 600;
|
||||
color: $navy-900;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin: 0;
|
||||
font-size: $fs-sm;
|
||||
}
|
||||
|
||||
.action {
|
||||
margin-top: $sp-2;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import * as React from 'react';
|
||||
import { Icon, IconName } from '@tnsu/ui-kit';
|
||||
import styles from './EmptyState.module.scss';
|
||||
|
||||
interface Props {
|
||||
icon?: IconName;
|
||||
title: string;
|
||||
text?: string;
|
||||
/** Кнопка действия под текстом (например, «+ Добавить объект»). */
|
||||
action?: React.ReactNode;
|
||||
}
|
||||
|
||||
// В ui-kit пока нет EmptyState — живёт здесь, позже переедет в кит.
|
||||
export const EmptyState: React.FC<Props> = ({ icon = 'info', title, text, action }) => (
|
||||
<div className={styles.emptyState}>
|
||||
<span className={styles.icon}>
|
||||
<Icon name={icon} size="lg" />
|
||||
</span>
|
||||
<p className={styles.title}>{title}</p>
|
||||
{text && <p className={styles.text}>{text}</p>}
|
||||
{action && <div className={styles.action}>{action}</div>}
|
||||
</div>
|
||||
);
|
||||
Reference in New Issue
Block a user