Унификация ширины полей-фильтров: все 195px, короткий год в «Период»
- .hgroup-fields: колонки 170→195px (все фильтры одинаковой ширины) - «Период» (.dr-field) 333→195px, вровень с остальными - Формат даты в поле «Период» — 2-значный год (05.08.26 — 20.08.26), чтобы диапазон целиком помещался в 195px; в чипсах год остался полным Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
5ba5a77f97
commit
147529c20f
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "mapdash-frontend",
|
"name": "mapdash-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.2.14",
|
"version": "0.2.15",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -16,7 +16,8 @@ function toISO(d: Date): string {
|
|||||||
}
|
}
|
||||||
function fmt(iso: string): string {
|
function fmt(iso: string): string {
|
||||||
const p = iso.split('-');
|
const p = iso.split('-');
|
||||||
return p.length === 3 ? `${p[2]}.${p[1]}.${p[0]}` : iso;
|
// Short 2-digit year so the full range fits the compact "Период" field.
|
||||||
|
return p.length === 3 ? `${p[2]}.${p[1]}.${p[0].slice(2)}` : iso;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DateRange {
|
export interface DateRange {
|
||||||
|
|||||||
@ -107,7 +107,7 @@ header {
|
|||||||
.hgroup-fields {
|
.hgroup-fields {
|
||||||
flex-shrink: 4; min-width: 0;
|
flex-shrink: 4; min-width: 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, 170px);
|
grid-template-columns: repeat(4, 195px);
|
||||||
gap: 12px 14px;
|
gap: 12px 14px;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
align-content: start;
|
align-content: start;
|
||||||
@ -124,7 +124,7 @@ header {
|
|||||||
|
|
||||||
/* ---- date-range field + calendar popup ---- */
|
/* ---- date-range field + calendar popup ---- */
|
||||||
.field-dates { grid-column: span 2; }
|
.field-dates { grid-column: span 2; }
|
||||||
.field-dates .dr-field { max-width: 333px; } /* the "Период" field is 40px narrower than its 2-col slot */
|
.field-dates .dr-field { max-width: 195px; } /* "Период" matches the other fields (short 2-digit-year date fits) */
|
||||||
.dr-native { display: none; }
|
.dr-native { display: none; }
|
||||||
.daterange { position: relative; }
|
.daterange { position: relative; }
|
||||||
.dr-field {
|
.dr-field {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user