diff --git a/Dockerfile b/Dockerfile index 144e6ef..b4b5128 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY package.json package-lock.json ./ RUN npm i COPY . . -RUN npm run build -- --configuration=test +RUN npm run build FROM nginx:1.27-alpine diff --git a/src/app/claim/collect-success/collect-success.html b/src/app/claim/collect-success/collect-success.html index 66308bc..10c2c09 100644 --- a/src/app/claim/collect-success/collect-success.html +++ b/src/app/claim/collect-success/collect-success.html @@ -84,33 +84,40 @@ @if (mode() === 'preview') {

{{ title() }}

} @else { -
-

{{ alreadyVisited() ? 'Уже в коллекции' : 'Новое в коллекции' }}

-

{{ title() }}

-

- {{ - alreadyVisited() - ? 'Этот объект уже был в коллекции «' + cityName() + '»' - : 'Добавлено в коллекцию «' + cityName() + '»' - }} -

-
- -
-
- {{ cityName() }} - - {{ opened() }} из {{ total() }} - +
+

+ {{ alreadyVisited() ? 'Уже в коллекции' : 'Новое в коллекции' }} +

+

{{ title() }}

+

+ {{ + alreadyVisited() + ? 'Этот объект уже был в коллекции «' + cityName() + '»' + : 'Добавлено в коллекцию «' + cityName() + '»' + }} +

-
- -
-
-
- Открыть коллекцию - Назад -
+
+
+ {{ cityName() }} + + {{ opened() }} из {{ total() }} + +
+
+ +
+
+ +
+ Открыть коллекцию + Назад +
} diff --git a/src/app/map/city-map/city-map.ts b/src/app/map/city-map/city-map.ts index f6ce9e8..96ccac2 100644 --- a/src/app/map/city-map/city-map.ts +++ b/src/app/map/city-map/city-map.ts @@ -401,7 +401,10 @@ export class CityMap implements AfterViewInit, OnDestroy { continue; } - this.markers.set(item.id, this.createMarker(api, map, item, collectedIds.has(item.id) || item.visited)); + this.markers.set( + item.id, + this.createMarker(api, map, item, collectedIds.has(item.id) || item.visited), + ); } if (this.markers.size > 0) { diff --git a/src/app/pages/cities-page/cities-page.html b/src/app/pages/cities-page/cities-page.html index c18801e..40c4978 100644 --- a/src/app/pages/cities-page/cities-page.html +++ b/src/app/pages/cities-page/cities-page.html @@ -40,10 +40,16 @@ diff --git a/src/app/pages/cities-page/cities-page.ts b/src/app/pages/cities-page/cities-page.ts index 3ddd7d6..aa0e65d 100644 --- a/src/app/pages/cities-page/cities-page.ts +++ b/src/app/pages/cities-page/cities-page.ts @@ -3,8 +3,20 @@ import { MatProgressBar } from '@angular/material/progress-bar'; import { RouterLink } from '@angular/router'; import { Store } from '@ngrx/store'; -import { areaOpenedCount, areaProgress, areaTotalCount, type Area, type Attraction } from '../../areas/area.models'; -import { GorodarActions, selectAreas, selectAreasError, selectAreasStatus, selectCollectedIdSet } from '../../state'; +import { + areaOpenedCount, + areaProgress, + areaTotalCount, + type Area, + type Attraction, +} from '../../areas/area.models'; +import { + GorodarActions, + selectAreas, + selectAreasError, + selectAreasStatus, + selectCollectedIdSet, +} from '../../state'; @Component({ selector: 'app-cities-page', diff --git a/src/app/pages/city-page/city-page.ts b/src/app/pages/city-page/city-page.ts index 4315196..905a975 100644 --- a/src/app/pages/city-page/city-page.ts +++ b/src/app/pages/city-page/city-page.ts @@ -1,4 +1,12 @@ -import { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + computed, + effect, + inject, + input, + signal, +} from '@angular/core'; import { RouterLink } from '@angular/router'; import { Store } from '@ngrx/store'; @@ -116,8 +124,6 @@ export class CityPage { const current = this.area(); const attraction = current ? findAttraction(current, id) : null; const open = attraction ? isObtained(attraction, this.collectedIds()) : false; - return open - ? ['/city', this.areaId(), id, 'icon'] - : ['/city', this.areaId(), id]; + return open ? ['/city', this.areaId(), id, 'icon'] : ['/city', this.areaId(), id]; } } diff --git a/src/app/pages/icon-preview-page/icon-preview-page.ts b/src/app/pages/icon-preview-page/icon-preview-page.ts index 559e0fa..dffa4c0 100644 --- a/src/app/pages/icon-preview-page/icon-preview-page.ts +++ b/src/app/pages/icon-preview-page/icon-preview-page.ts @@ -4,7 +4,12 @@ import { Store } from '@ngrx/store'; import { findAttraction, isObtained } from '../../areas/area.models'; import { CollectSuccess } from '../../claim/collect-success/collect-success'; -import { GorodarActions, selectAreaDetails, selectAreaDetailStatus, selectCollectedIdSet } from '../../state'; +import { + GorodarActions, + selectAreaDetails, + selectAreaDetailStatus, + selectCollectedIdSet, +} from '../../state'; @Component({ selector: 'app-icon-preview-page', diff --git a/src/app/pages/map-item-page/map-item-page.ts b/src/app/pages/map-item-page/map-item-page.ts index 6653017..9475975 100644 --- a/src/app/pages/map-item-page/map-item-page.ts +++ b/src/app/pages/map-item-page/map-item-page.ts @@ -13,7 +13,12 @@ import { MatButton } from '@angular/material/button'; import { Router } from '@angular/router'; import { Store } from '@ngrx/store'; -import { areaOpenedCount, areaTotalCount, isObtained, type AreaDetails } from '../../areas/area.models'; +import { + areaOpenedCount, + areaTotalCount, + isObtained, + type AreaDetails, +} from '../../areas/area.models'; import { ClaimFlow } from '../../claim/claim-flow/claim-flow'; import { AudioGuide } from '../../shared/audio-guide/audio-guide'; import { Icon } from '../../shared/icon/icon'; @@ -54,7 +59,9 @@ export class MapItemPage { protected readonly status = computed(() => this.attractionStatuses()[this.id()] ?? 'loading'); protected readonly error = computed(() => this.attractionErrors()[this.id()] ?? ''); - protected readonly area = computed((): AreaDetails | null => this.details()[this.areaId()] ?? null); + protected readonly area = computed( + (): AreaDetails | null => this.details()[this.areaId()] ?? null, + ); protected readonly landmark = computed(() => this.attractions()[this.id()] ?? null); protected readonly collectedIds = this.store.selectSignal(selectCollectedIdSet); protected readonly photos = this.store.selectSignal(selectPhotos); @@ -138,9 +145,7 @@ export class MapItemPage { return; } - this.store.dispatch( - GorodarActions.authSheetOpened({ intent: 'claim', landmarkId: this.id() }), - ); + this.store.dispatch(GorodarActions.authSheetOpened({ intent: 'claim', landmarkId: this.id() })); } protected openPhoto(): void { diff --git a/src/app/state/gorodar.selectors.ts b/src/app/state/gorodar.selectors.ts index 85d964d..0db9c29 100644 --- a/src/app/state/gorodar.selectors.ts +++ b/src/app/state/gorodar.selectors.ts @@ -39,8 +39,10 @@ function resolveArea(area: Area, details: Record): Area | A return details[area.id] ?? area; } -export const selectProgress = createSelector(selectOpenedCount, selectTotalCount, (opened, total) => - total ? Math.round((opened / total) * 100) : 0, +export const selectProgress = createSelector( + selectOpenedCount, + selectTotalCount, + (opened, total) => (total ? Math.round((opened / total) * 100) : 0), ); export const selectAuthenticated = createSelector(selectAuth, (auth) => auth.authenticated);