Skip to content

Commit

Permalink
Merge pull request #63 from PnEcrins/feat/display
Browse files Browse the repository at this point in the history
rename obs -> evenements + make offline page accessible when not connected
  • Loading branch information
TheoLechemia committed Jul 31, 2024
2 parents 278cee6 + 3bcbcb7 commit c2a6a99
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
8 changes: 4 additions & 4 deletions front-end/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export class AppComponent {
},
{
id: 2,
text: 'Interface de synthèse',
routerLink: 'interface-de-synthese',
text: 'Consulter les évènements',
routerLink: 'evenements',
authenficated: null,
click: () => null,
observationsPending: false,
Expand All @@ -130,14 +130,14 @@ export class AppComponent {
id: 4,
text: 'Fonds de carte hors ligne',
routerLink: 'fonds-de-carte-hors-ligne',
authenficated: true,
authenficated: null,
click: () => null,
observationsPending: false,
},
{
id: 5,
text: 'À propos',
routerLink: 'en-savoir-plus',
routerLink: 'a-propos',
authenficated: null,
click: () => null,
observationsPending: false,
Expand Down
19 changes: 9 additions & 10 deletions front-end/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ export const routes: Routes = [
canActivate: [authGuard],
},
{
path: 'detail-d-une-observation/:observation',
title: "Détail d'une observation • Regard d'altitude",
path: 'evenement/:observation',
title: "Détail d'un évènement • Regard d'altitude",
component: ObservationDetailComponent,
data: {
title: "Détail d'une observation",
title: "Détail d'un évènement",
backButton: true,
accountButton: false,
},
},
{
path: 'interface-de-synthese',
title: "Interface de synthèse • Regard d'altitude",
path: 'evenements',
title: "Les évènements • Regard d'altitude",
component: SynthesisInterfaceComponent,
data: {
title: 'Interface de synthèse',
title: 'Les évènements',
backButton: true,
accountButton: false,
},
Expand Down Expand Up @@ -117,14 +117,13 @@ export const routes: Routes = [
backButton: true,
accountButton: false,
},
canActivate: [authGuard],
},
{
path: 'en-savoir-plus',
title: 'En savoir plus',
path: 'a-propos',
title: 'À propos',
component: LearnMoreComponent,
data: {
title: 'En savoir plus',
title: 'À propos',
backButton: true,
accountButton: false,
},
Expand Down
4 changes: 2 additions & 2 deletions front-end/src/app/pages/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1 id="text-banner">Un collectif pour voir changer la montagne</h1>
de changement climatique. Notamment en permettant un inventaire
collaboratif des évènements en montagne.
</p>
<button class="text-align" routerLink="/en-savoir-plus" mat-flat-button color="primary">
<button class="text-align" routerLink="/a-propos" mat-flat-button color="primary">
À propos
</button>
</div>
Expand Down Expand Up @@ -44,7 +44,7 @@ <h1 id="text-banner">Un collectif pour voir changer la montagne</h1>
Un collectif pour voir changer la montagne
</div>
</section> -->
<a routerLink="/interface-de-synthese" >
<a routerLink="/evenements" >
<mat-card class="col-6 hover mb-3">
<img id="map-img"/>
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
mat-icon-button
class="mt-16"
[routerLink]="[
'/detail-d-une-observation',
'/evenement',
slugify(
observation.id!.concat(
observation.properties.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
>
<mat-expansion-panel-header>
<mat-panel-title>
{{ currentObservationsFeatureCollection.features.length }} observations
{{ currentObservationsFeatureCollection.features.length }} évènements
</mat-panel-title>
</mat-expansion-panel-header>
<mat-list class="mat-expansion-panel-body-visible">
Expand Down Expand Up @@ -59,7 +59,7 @@
mat-icon-button
class="mt-16"
[routerLink]="[
'/detail-d-une-observation',
'/evenement',
slugify(
observation.id!.concat(
observation.properties.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class SynthesisInterfaceComponent {
const slug = slugify(
`${geoJsonPoint.id}-${geoJsonPoint.properties.name}`,
);
this.router.navigate(['/detail-d-une-observation', slug]);
this.router.navigate(['/evenement', slug]);
};
observationPopup.appendChild(observationButton);
if (layer) {
Expand Down

0 comments on commit c2a6a99

Please sign in to comment.