Skip to content

Commit b2f2f7a

Browse files
authored
Merge pull request #55 from ParkTrack-Project/AnalyticsPanel
style: polish analytics refresh and fullscreen camera previews
2 parents 8cfecf9 + 1a7d0a6 commit b2f2f7a

2 files changed

Lines changed: 55 additions & 7 deletions

File tree

src/pages/AnalyticsPage.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,9 +1097,22 @@ function AnalyticsFiltersPanel({
10971097
<div className="section-panel analytics-controls-panel">
10981098
<div className="analytics-toolbar">
10991099
<div className="analytics-refresh-control">
1100-
<Button type="button" variant="ghost" className="analytics-refresh-button" onClick={onRefresh} disabled={loading}>
1101-
<span className="analytics-refresh-icon" aria-hidden="true"></span>
1102-
<span>Обновить</span>
1100+
<Button
1101+
type="button"
1102+
variant="ghost"
1103+
className="analytics-refresh-button"
1104+
onClick={onRefresh}
1105+
disabled={loading}
1106+
aria-label={loading ? 'Обновление данных' : 'Обновить данные'}
1107+
title={loading ? 'Обновление данных' : 'Обновить данные'}
1108+
>
1109+
<svg
1110+
className={`analytics-refresh-icon${loading ? ' loading' : ''}`}
1111+
viewBox="0 0 24 24"
1112+
aria-hidden="true"
1113+
>
1114+
<path d="M20 11a8.1 8.1 0 0 0-15.5-2M4 4v5h5M4 13a8.1 8.1 0 0 0 15.5 2M20 20v-5h-5" />
1115+
</svg>
11031116
</Button>
11041117
<Select
11051118
className="analytics-toolbar-select analytics-refresh-select"

src/styles.css

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,38 @@ body { background: var(--bg); color: var(--text); font-family: Inter, system-ui,
7070
}
7171

7272
.analytics-refresh-button {
73+
width: 46px;
74+
min-width: 46px;
7375
min-height: 42px;
76+
padding: 0;
7477
border-radius: 8px 0 0 8px;
78+
color: var(--accent);
79+
background: #f1f8f3;
80+
}
81+
82+
.analytics-refresh-button:hover:not(:disabled) {
83+
color: #fff;
84+
background: var(--accent);
7585
}
7686

7787
.analytics-refresh-icon {
78-
font-size: 21px;
79-
line-height: 1;
88+
width: 22px;
89+
height: 22px;
90+
fill: none;
91+
stroke: currentColor;
92+
stroke-width: 2;
93+
stroke-linecap: round;
94+
stroke-linejoin: round;
95+
}
96+
97+
.analytics-refresh-icon.loading {
98+
animation: analytics-refresh-spin 0.9s linear infinite;
99+
}
100+
101+
@keyframes analytics-refresh-spin {
102+
to {
103+
transform: rotate(360deg);
104+
}
80105
}
81106

82107
.analytics-toolbar-select {
@@ -585,13 +610,23 @@ body { background: var(--bg); color: var(--text); font-family: Inter, system-ui,
585610
.analytics-snapshot-fullscreen-stage {
586611
min-height: 0;
587612
display: grid;
588-
place-items: center;
613+
place-items: stretch;
589614
overflow: hidden;
590615
}
591616

617+
.analytics-snapshot-fullscreen-stage img {
618+
width: 100%;
619+
height: 100%;
620+
max-width: none;
621+
max-height: none;
622+
object-fit: cover;
623+
}
624+
592625
.analytics-snapshot-fullscreen-state {
593626
color: #fff;
594627
font-weight: 700;
628+
align-self: center;
629+
justify-self: center;
595630
}
596631

597632
.fullscreen-close {
@@ -1675,7 +1710,7 @@ hr { border: none; height: 1px; background: var(--border); margin: 10px 0; }
16751710
width: 100%;
16761711
height: 100%;
16771712
min-height: 0;
1678-
object-fit: contain;
1713+
object-fit: cover;
16791714
border-color: rgba(255, 255, 255, 0.18);
16801715
}
16811716

0 commit comments

Comments
 (0)