-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
283 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<div style="max-width: 600px;"> | ||
<app-splash-screen></app-splash-screen> | ||
<app-landing-page></app-landing-page> | ||
<!-- <router-outlet></router-outlet> --> | ||
|
||
<app-landing-page></app-landing-page> | ||
<!-- <router-outlet></router-outlet> --> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/app/shared/shared-components/location-dialog/location-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div matRipple class="locationdialog-conatiner custom-scroll"> | ||
<div class="cross"> | ||
<button mat-icon-button aria-label="" (click)="closePage()"> | ||
<mat-icon>close</mat-icon> | ||
</button> | ||
</div> | ||
<div *ngFor="let browser of selectedBrowser" class="browser-content"> | ||
<!--browser name will change when other browser detects --> | ||
<h3>Step: {{ browser.step }}</h3> | ||
<img src="{{ browser.image }}" height="120px" alt="" /> | ||
<p>{{ browser.text }}</p> | ||
</div> | ||
</div> |
28 changes: 28 additions & 0 deletions
28
src/app/shared/shared-components/location-dialog/location-dialog.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.locationdialog-conatiner { | ||
position: relative; | ||
padding: 15px 10px; | ||
.cross { | ||
position: absolute; | ||
right: 5px; | ||
top: -5px; | ||
margin: 20px; | ||
width: 20px; | ||
height: 20px; | ||
} | ||
background-color: #f6f6f6; | ||
overflow-y: auto; | ||
overflow-x: hidden; | ||
max-height: 75vh; | ||
.browser-content { | ||
margin: 15px 0px; | ||
img { | ||
width: 100%; | ||
height: auto; | ||
} | ||
h3 { | ||
font-weight: bolder; | ||
text-decoration: underline; | ||
text-align: center; | ||
} | ||
} | ||
} |
143 changes: 143 additions & 0 deletions
143
src/app/shared/shared-components/location-dialog/location-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { DeviceDetectorService } from 'ngx-device-detector'; | ||
import { MatBottomSheetRef } from '@angular/material'; | ||
|
||
export const BROWSERS = { | ||
CHROME: 'Chrome', | ||
FIREFOX: 'Firefox', | ||
SAFARI: 'Safari', | ||
OPERA: 'Opera', | ||
IE: 'IE', | ||
MS_EDGE: 'MS-Edge', | ||
MS_EDGE_CHROMIUM: 'MS-Edge-Chromium', | ||
FB_MESSANGER: 'FB-Messanger', | ||
SAMSUNG: 'Samsung', | ||
UCBROWSER: 'UC-Browser', | ||
UNKNOWN: 'Unknown' | ||
}; | ||
@Component({ | ||
selector: 'app-location-dialog', | ||
templateUrl: './location-dialog.component.html', | ||
styleUrls: ['./location-dialog.component.scss'], | ||
}) | ||
export class LocationDialogComponent implements OnInit { | ||
selectedBrowser = []; | ||
stepsMap = { | ||
[BROWSERS.CHROME]: [ | ||
{ | ||
step: '1', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '2', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '3', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
], | ||
[BROWSERS.MS_EDGE]: [ | ||
{ | ||
step: '1', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '2', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '3', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
], | ||
[BROWSERS.FIREFOX]: [ | ||
{ | ||
step: '1', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '2', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '3', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
], | ||
[BROWSERS.SAFARI]: [ | ||
{ | ||
step: '1', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '2', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '3', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
], | ||
[BROWSERS.UNKNOWN]: [ | ||
{ | ||
step: '1', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '2', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '3', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
], | ||
}; | ||
|
||
chrome = [ | ||
{ | ||
step: '1', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '2', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
{ | ||
step: '3', | ||
image: 'https://password-managers.bestreviews.net/files/six-web-browsers.png', | ||
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.", | ||
}, | ||
]; | ||
deviceInfo: any; | ||
|
||
constructor(private deviceService: DeviceDetectorService, private bottomRef: MatBottomSheetRef<LocationDialogComponent>) {} | ||
|
||
ngOnInit() { | ||
console.log('hello `Home` component'); | ||
this.deviceInfo = this.deviceService.getDeviceInfo(); | ||
this.selectedBrowser = this.stepsMap[this.deviceInfo.browser]; | ||
} | ||
|
||
closePage() { | ||
this.bottomRef.dismiss(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/app/shared/shared-components/location-popup/location-popup.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div *ngIf="isLocationNotAllowed" class="location-popup-content-area"> | ||
<img height="70px" src="assets/img/sad.svg" alt="gift" /> | ||
<div class="content">{{ 'MAIN_PAGE.OFFER_NEAR_ME' | translate }}</div> | ||
<button mat-raised-button color="primary" (click)="gotoHelpForLocation()">{{ 'MAIN_PAGE.ENABLE' | translate }}</button> | ||
</div> | ||
<div *ngIf="!isLocationNotAllowed" class="location-popup-content-area"> | ||
<img height="70px" src="assets/img/sad.svg" alt="gift" /> | ||
<div class="content">{{ 'MAIN_PAGE.NEED_LOCATION_FOR_OFFER' | translate }}</div> | ||
<button mat-raised-button color="primary" (click)="onAllow()">{{ 'OKAY' | translate }}</button> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
src/app/shared/shared-components/location-popup/location-popup.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.location-popup-content-area{ | ||
display: flex; | ||
flex-flow: column; | ||
padding: 10px; | ||
.content{ | ||
padding: 13px; | ||
text-align: center; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/app/shared/shared-components/location-popup/location-popup.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Component, OnInit, Inject } from '@angular/core'; | ||
import { MatDialog, MatBottomSheetRef, MAT_DIALOG_DATA, MAT_BOTTOM_SHEET_DATA, MatBottomSheet } from '@angular/material'; | ||
import { LocationDialogComponent } from '../location-dialog/location-dialog.component'; | ||
|
||
@Component({ | ||
selector: 'app-location-popup', | ||
templateUrl: './location-popup.component.html', | ||
styleUrls: ['./location-popup.component.scss'] | ||
}) | ||
export class LocationPopupComponent implements OnInit { | ||
isLocationNotAllowed = false; | ||
constructor(private bottomSheet: MatBottomSheet, | ||
private bottomSheetRef: MatBottomSheetRef<LocationPopupComponent>, | ||
@Inject(MAT_BOTTOM_SHEET_DATA) public data: any) { | ||
this.isLocationNotAllowed = data.isLocationNotAllowed; | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
gotoHelpForLocation() { | ||
console.log('goto help'); | ||
this.bottomSheetRef.dismiss(); | ||
this.openDialog(); | ||
} | ||
|
||
openDialog(): void { | ||
const dialogRef = this.bottomSheet.open(LocationDialogComponent, { | ||
data: null, | ||
}); | ||
|
||
dialogRef.afterDismissed().subscribe((result) => { | ||
// Navigate to page | ||
console.log('The dialog was closed', result); | ||
}); | ||
} | ||
|
||
onAllow() { | ||
this.bottomSheetRef.dismiss(); | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.