Files
flights_web/src/features/flights-map/components/FlightsMapStartPage.scss
T
gnezim b63fd8fb6b Visual parity fixes vs Angular reference
- SharePanel: fix wrong i18n key (SHARED.COPY → SHARE.COPY) and switch
  to the brand-icon-on-top + translated-label layout that Angular uses
  (renders as untranslated raw key + plain text list before).
- LastUpdate: stamp now reflects when the client received the data, not
  the API record's mutation timestamp — Angular sets `flight.lastUpdate
  = new Date()` in populate.logic.ts; we mirror that behavior so users
  no longer see stale 'updated' values from cached API rows.
- FlightCard: keep operator logo + plane icon + status text on mobile
  (previously hidden via display:none); regrid to 3-col layout so the
  card mirrors Angular's mobile pattern. Boarding status row gains the
  leading colour-coded dot Angular ships ('Уточняется' grey).
- OnlineBoardSearchPage: H1 for /flight/... search now reads
  'Рейс: SU 6497, Сегодня' instead of 'Номер рейса: SU6497' (matches
  Angular's title.service); add the '* Время в системе - МЕСТНОЕ.'
  footer note Angular's <page-footer-notes> renders.
- FlightsMap filter: drop the React-only 'Найдите свой маршрут'
  header; replace the horizontal swap glyph with vertical blue arrows
  (Angular rotates the same SVG 90deg); add Leaflet city-tooltip
  styling so labels render text-only with a white text-shadow halo
  rather than as PrimeReact-default white pills.
- DayQuickPick: new mobile-only 3-day quick-pick row above the manual
  date input on both onlineboard and flights-map filters, mirroring
  Angular's calendar-input.component .calendar--mobile block. Uses
  Intl.DateTimeFormat formatToParts to get the genitive month form.
2026-04-19 16:14:47 +03:00

277 lines
5.8 KiB
SCSS

@use "../../../styles/variables" as vars;
@use "../../../styles/fonts" as fonts;
@use "../../../styles/colors" as colors;
@use "../../../styles/screen" as screen;
@use "../../../styles/shadows" as shadows;
.flights-map-start-page {
section.frame {
padding: 0;
overflow: hidden;
}
.page-title {
width: auto;
display: inline-block;
max-width: 100%;
white-space: normal !important;
}
h1.text--white {
@include fonts.font-overflow();
@include screen.smTablet {
font-size: fonts.$font-size-xxxl--tablet;
margin-bottom: vars.$space-m + vars.$space-s;
overflow: visible;
white-space: normal;
}
@include screen.mobile {
font-size: fonts.$font-size-xxxl--mobile;
margin-bottom: vars.$space-m + vars.$space-s;
margin-top: vars.$space-m;
overflow: visible;
white-space: normal;
}
}
.flights-map-start {
&__map-wrapper {
position: relative;
min-height: 500px;
}
&__map {
width: 100%;
height: 500px;
}
&__spinner,
&__loader,
&__error,
&__empty {
padding: vars.$space-xl;
text-align: center;
color: colors.$light-gray;
display: flex;
align-items: center;
justify-content: center;
min-height: 200px;
}
&__error {
color: colors.$red;
}
}
// Inline loader matching Angular loader-sheet component
.page-loader__loader {
position: relative;
width: 120px;
height: 120px;
transform: scale(0.5);
.loader-circle {
position: absolute;
left: 50%;
top: 50%;
width: 120px;
height: 120px;
border-radius: 50%;
box-shadow: inset 0 0 0 3px colors.$blue-light;
margin-left: -60px;
margin-top: -60px;
}
.loader-line-mask {
position: absolute;
left: 50%;
top: 50%;
width: 60px;
height: 120px;
margin-left: -60px;
margin-top: -60px;
overflow: hidden;
transform-origin: 60px 60px;
animation: flights-map-rotate 1.2s infinite linear;
.loader-line {
width: 120px;
height: 120px;
border-radius: 50%;
box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5);
}
}
@keyframes flights-map-rotate {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
}
}
// Filter panel styling for content-left column
.flights-map-filter {
@include shadows.box-shadow-small;
background-color: colors.$white;
border-radius: vars.$border-radius;
padding: vars.$space-xl;
display: flex;
flex-direction: column;
gap: vars.$space-m;
&__field {
display: flex;
flex-direction: column;
gap: vars.$space-s;
label {
@include fonts.font-small(colors.$gray);
margin-bottom: vars.$label-margin-bottom;
}
input[type="text"],
input[type="date"] {
@include shadows.control-border-shadow();
height: vars.$standard-button-height;
padding: 0 vars.$space-l;
padding-left: vars.$space-m !important;
font-size: fonts.$font-size-l;
font-weight: fonts.$font-regular;
color: colors.$text-color;
width: 100%;
transition-duration: 0.2s;
@include fonts.font-overflow();
&:focus {
outline: none;
border-color: colors.$blue-light;
box-shadow: 0 0 0 0.2em colors.$focus-shadow;
}
}
}
&__exchange {
align-self: center;
width: 35px;
height: vars.$standard-button-height;
background: transparent;
border: none;
box-shadow: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.2s;
padding: 0;
&:hover { opacity: 0.7; }
}
&__exchange-icon {
width: 12px;
height: 25px;
}
&__info {
padding: vars.$space-s 0;
p {
@include fonts.font-small(colors.$gray);
line-height: 1.5;
margin: 0;
}
}
&__title {
font-size: 18px;
font-weight: 600;
color: #222;
margin: 0 0 vars.$space-s;
}
&__toggles {
display: flex;
flex-direction: column;
gap: vars.$space-m;
padding: vars.$space-s 0;
}
// Visual toggle switch matching Angular's p-inputswitch. Hides the
// native checkbox and renders a pill + sliding knob via <span>.
&__toggle {
display: flex;
align-items: center;
gap: vars.$space-m;
cursor: pointer;
@include fonts.font-small(colors.$gray);
input[type="checkbox"] {
position: absolute;
opacity: 0;
pointer-events: none;
}
}
&__switch {
display: inline-block;
width: 36px;
height: 20px;
background: #d0d5dd;
border-radius: 10px;
position: relative;
transition: background-color 150ms ease;
flex-shrink: 0;
&::before {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
background: #fff;
border-radius: 50%;
transition: transform 150ms ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
}
input[type="checkbox"]:checked + &__switch {
background: colors.$blue;
&::before {
transform: translateX(16px);
}
}
&__toggle--disabled {
opacity: 0.5;
cursor: not-allowed !important;
pointer-events: none;
}
}
// Leaflet city tooltips: text-only with white text-shadow halo, matching
// Angular's _leaflet-popup.scss treatment.
.leaflet-tooltip.city-label {
background: transparent;
border: none;
box-shadow: none;
padding: 0;
font-family: 'Inter', 'Roboto', Arial, sans-serif;
color: #1f1f1f;
font-size: 12px;
font-weight: 500;
letter-spacing: 1px;
text-shadow:
-1px 0 rgba(255, 255, 255, 0.53),
1px 0 rgba(255, 255, 255, 0.53),
0 1px rgba(255, 255, 255, 0.53),
0 -1px rgba(255, 255, 255, 0.53);
pointer-events: none;
&::before { display: none; }
}