Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display diffrent title on app and browser #2145

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading