Skip to content

Commit

Permalink
Merge branch 'branch-2.4.0' into feature/WFNEWS-2493
Browse files Browse the repository at this point in the history
  • Loading branch information
ssylver93 authored Dec 13, 2024
2 parents b75a1ff + 74f3a77 commit 41fb65b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div [class]="isMobileView() ? '' : 'desktop-container'">
<div class="section">
<div class="section-header-row">
<span class="section-header">Saved Locations & Notifications</span>
<span class="section-header">{{notificationsTitle}}</span>
<span class="section-button" (click)="addNewLocation()" *ngIf="savedLocations?.length < 3">
<img alt="icon" src="/assets/images/svg-icons/Type.svg" class="button-icon">
Add new
Expand All @@ -15,7 +15,7 @@
<div class="section-card" *ngIf="!savedLocations.length" (click)="addNewLocation()">
<div class="add-location-content flex-enabled">
<img alt="icon" class="location-icon" src="/assets/images/svg-icons/carbon_location.svg">
<span>Add a saved location to receive notifications</span>
<span>{{notificationsSubTitle}}</span>
</div>
</div>
<div *ngIf="savedLocations.length">
Expand Down Expand Up @@ -113,7 +113,7 @@
</div>
<div class="section-card-wildfires" *ngIf="!wildFireWatchlist.length">
<div class="saved-wildfires-content flex-enabled">
<img alt="icon" class="location-icon" src="/assets/images/svg-icons/saved-blue-border.svg">
<img alt="icon" class="location-icon" src="/assets/images/svg-icons/saved-blue-border.svg">
<span>Save a wildfire on the map to easily find here later</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

.add-location-content {
padding: 72px 26px;
align-items: center;

span {
padding-left: 9px;
Expand All @@ -93,7 +94,7 @@

.saved-wildfires-content {
padding: 72px 26px;

align-items: center;
span {
padding-left: 9px;
color: var(--Gray-1, #242424);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
isMobileView,
} from '@app/utils';
import { SpatialUtilsService } from '@wf1/core-ui';
import { Capacitor } from '@capacitor/core';


@Component({
selector: 'wfnews-saved',
Expand All @@ -27,6 +29,8 @@ export class SavedComponent implements OnInit {
public distanceInKm = 1;
public wildFireWatchlist: any[] = [];
public errorString: string;
public notificationsTitle: string;
public notificationsSubTitle: string;
convertToStageOfControlDescription = convertToStageOfControlDescription;
convertToDateYear = convertToDateYear;
isMobileView = isMobileView;
Expand Down Expand Up @@ -63,6 +67,10 @@ export class SavedComponent implements OnInit {
});

this.loadWatchlist();

const isNative = Capacitor.isNativePlatform();
this.notificationsTitle = isNative ? 'Saved Locations & Notifications' : 'Saved Locations';
this.notificationsSubTitle = isNative ? 'Add a saved location to receive notifications' : 'Add a saved location';
}

addNewLocation() {
Expand Down

0 comments on commit 41fb65b

Please sign in to comment.