update dockerfile
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ COPY package.json package-lock.json ./
|
|||||||
RUN npm i
|
RUN npm i
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build -- --configuration=test
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:1.27-alpine
|
FROM nginx:1.27-alpine
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,9 @@
|
|||||||
<h1 class="success__title">{{ title() }}</h1>
|
<h1 class="success__title">{{ title() }}</h1>
|
||||||
} @else {
|
} @else {
|
||||||
<div class="success__copy">
|
<div class="success__copy">
|
||||||
<p class="success__eyebrow">{{ alreadyVisited() ? 'Уже в коллекции' : 'Новое в коллекции' }}</p>
|
<p class="success__eyebrow">
|
||||||
|
{{ alreadyVisited() ? 'Уже в коллекции' : 'Новое в коллекции' }}
|
||||||
|
</p>
|
||||||
<h1>{{ title() }}</h1>
|
<h1>{{ title() }}</h1>
|
||||||
<p>
|
<p>
|
||||||
{{
|
{{
|
||||||
@@ -110,7 +112,12 @@
|
|||||||
|
|
||||||
<div class="success__actions">
|
<div class="success__actions">
|
||||||
<a matButton="filled" routerLink="/collections" (click)="leave()">Открыть коллекцию</a>
|
<a matButton="filled" routerLink="/collections" (click)="leave()">Открыть коллекцию</a>
|
||||||
<a class="success__ghost" [routerLink]="areaId() ? ['/city', areaId()] : ['/']" (click)="leave()">Назад</a>
|
<a
|
||||||
|
class="success__ghost"
|
||||||
|
[routerLink]="areaId() ? ['/city', areaId()] : ['/']"
|
||||||
|
(click)="leave()"
|
||||||
|
>Назад</a
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -401,7 +401,10 @@ export class CityMap implements AfterViewInit, OnDestroy {
|
|||||||
continue;
|
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) {
|
if (this.markers.size > 0) {
|
||||||
|
|||||||
@@ -40,10 +40,16 @@
|
|||||||
<span
|
<span
|
||||||
class="cell"
|
class="cell"
|
||||||
[class.cell--open]="obtained(attraction)"
|
[class.cell--open]="obtained(attraction)"
|
||||||
[attr.aria-label]="attraction.name + (obtained(attraction) ? ', получено' : ', не получен')"
|
[attr.aria-label]="
|
||||||
|
attraction.name + (obtained(attraction) ? ', получено' : ', не получен')
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
[src]="obtained(attraction) && attraction.iconUrl ? attraction.iconUrl : '/assets/icons/cell-lock.svg'"
|
[src]="
|
||||||
|
obtained(attraction) && attraction.iconUrl
|
||||||
|
? attraction.iconUrl
|
||||||
|
: '/assets/icons/cell-lock.svg'
|
||||||
|
"
|
||||||
[alt]=""
|
[alt]=""
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -3,8 +3,20 @@ import { MatProgressBar } from '@angular/material/progress-bar';
|
|||||||
import { RouterLink } from '@angular/router';
|
import { RouterLink } from '@angular/router';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
|
||||||
import { areaOpenedCount, areaProgress, areaTotalCount, type Area, type Attraction } from '../../areas/area.models';
|
import {
|
||||||
import { GorodarActions, selectAreas, selectAreasError, selectAreasStatus, selectCollectedIdSet } from '../../state';
|
areaOpenedCount,
|
||||||
|
areaProgress,
|
||||||
|
areaTotalCount,
|
||||||
|
type Area,
|
||||||
|
type Attraction,
|
||||||
|
} from '../../areas/area.models';
|
||||||
|
import {
|
||||||
|
GorodarActions,
|
||||||
|
selectAreas,
|
||||||
|
selectAreasError,
|
||||||
|
selectAreasStatus,
|
||||||
|
selectCollectedIdSet,
|
||||||
|
} from '../../state';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-cities-page',
|
selector: 'app-cities-page',
|
||||||
|
|||||||
@@ -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 { RouterLink } from '@angular/router';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
|
||||||
@@ -116,8 +124,6 @@ export class CityPage {
|
|||||||
const current = this.area();
|
const current = this.area();
|
||||||
const attraction = current ? findAttraction(current, id) : null;
|
const attraction = current ? findAttraction(current, id) : null;
|
||||||
const open = attraction ? isObtained(attraction, this.collectedIds()) : false;
|
const open = attraction ? isObtained(attraction, this.collectedIds()) : false;
|
||||||
return open
|
return open ? ['/city', this.areaId(), id, 'icon'] : ['/city', this.areaId(), id];
|
||||||
? ['/city', this.areaId(), id, 'icon']
|
|
||||||
: ['/city', this.areaId(), id];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,12 @@ import { Store } from '@ngrx/store';
|
|||||||
|
|
||||||
import { findAttraction, isObtained } from '../../areas/area.models';
|
import { findAttraction, isObtained } from '../../areas/area.models';
|
||||||
import { CollectSuccess } from '../../claim/collect-success/collect-success';
|
import { CollectSuccess } from '../../claim/collect-success/collect-success';
|
||||||
import { GorodarActions, selectAreaDetails, selectAreaDetailStatus, selectCollectedIdSet } from '../../state';
|
import {
|
||||||
|
GorodarActions,
|
||||||
|
selectAreaDetails,
|
||||||
|
selectAreaDetailStatus,
|
||||||
|
selectCollectedIdSet,
|
||||||
|
} from '../../state';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-icon-preview-page',
|
selector: 'app-icon-preview-page',
|
||||||
|
|||||||
@@ -13,7 +13,12 @@ import { MatButton } from '@angular/material/button';
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { Store } from '@ngrx/store';
|
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 { ClaimFlow } from '../../claim/claim-flow/claim-flow';
|
||||||
import { AudioGuide } from '../../shared/audio-guide/audio-guide';
|
import { AudioGuide } from '../../shared/audio-guide/audio-guide';
|
||||||
import { Icon } from '../../shared/icon/icon';
|
import { Icon } from '../../shared/icon/icon';
|
||||||
@@ -54,7 +59,9 @@ export class MapItemPage {
|
|||||||
|
|
||||||
protected readonly status = computed(() => this.attractionStatuses()[this.id()] ?? 'loading');
|
protected readonly status = computed(() => this.attractionStatuses()[this.id()] ?? 'loading');
|
||||||
protected readonly error = computed(() => this.attractionErrors()[this.id()] ?? '');
|
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 landmark = computed(() => this.attractions()[this.id()] ?? null);
|
||||||
protected readonly collectedIds = this.store.selectSignal(selectCollectedIdSet);
|
protected readonly collectedIds = this.store.selectSignal(selectCollectedIdSet);
|
||||||
protected readonly photos = this.store.selectSignal(selectPhotos);
|
protected readonly photos = this.store.selectSignal(selectPhotos);
|
||||||
@@ -138,9 +145,7 @@ export class MapItemPage {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.store.dispatch(
|
this.store.dispatch(GorodarActions.authSheetOpened({ intent: 'claim', landmarkId: this.id() }));
|
||||||
GorodarActions.authSheetOpened({ intent: 'claim', landmarkId: this.id() }),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected openPhoto(): void {
|
protected openPhoto(): void {
|
||||||
|
|||||||
@@ -39,8 +39,10 @@ function resolveArea(area: Area, details: Record<string, AreaDetails>): Area | A
|
|||||||
return details[area.id] ?? area;
|
return details[area.id] ?? area;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const selectProgress = createSelector(selectOpenedCount, selectTotalCount, (opened, total) =>
|
export const selectProgress = createSelector(
|
||||||
total ? Math.round((opened / total) * 100) : 0,
|
selectOpenedCount,
|
||||||
|
selectTotalCount,
|
||||||
|
(opened, total) => (total ? Math.round((opened / total) * 100) : 0),
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectAuthenticated = createSelector(selectAuth, (auth) => auth.authenticated);
|
export const selectAuthenticated = createSelector(selectAuth, (auth) => auth.authenticated);
|
||||||
|
|||||||
Reference in New Issue
Block a user