-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2515 from numbersprotocol/milestone-v230112
Milestone v230112
- Loading branch information
Showing
39 changed files
with
778 additions
and
174 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,5 @@ | |
</mat-toolbar> | ||
|
||
<div class="page-content"> | ||
<mat-list *transloco="let t"> | ||
<mat-list-item> | ||
<mat-icon mat-list-icon>update</mat-icon> | ||
<div mat-line>{{ t('version') }}</div> | ||
<div mat-line>{{ version$ | ngrxPush }}</div> | ||
</mat-list-item> | ||
<mat-list-item> | ||
<mat-icon mat-list-icon>help</mat-icon> | ||
<div mat-line>{{ t('contactUs') }}</div> | ||
<div mat-line> | ||
<a href="mailto:[email protected]"> | ||
[email protected] | ||
</a> | ||
</div> | ||
</mat-list-item> | ||
</mat-list> | ||
<!-- TODO: add about page text according to design. blocked by @Noir --> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
import { UntilDestroy } from '@ngneat/until-destroy'; | ||
import { VersionService } from '../../shared/version/version.service'; | ||
|
||
@UntilDestroy({ checkProperties: true }) | ||
@Component({ | ||
selector: 'app-about', | ||
templateUrl: './about.page.html', | ||
styleUrls: ['./about.page.scss'], | ||
}) | ||
export class AboutPage { | ||
readonly version$ = this.versionService.version$; | ||
|
||
constructor(private readonly versionService: VersionService) {} | ||
} | ||
export class AboutPage {} |
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
17 changes: 17 additions & 0 deletions
17
src/app/features/data-policy/data-policy-routing.module.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,17 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
|
||
import { DataPolicyPage } from './data-policy.page'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: DataPolicyPage, | ||
}, | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule], | ||
}) | ||
export class DataPolicyPageRoutingModule {} |
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,12 @@ | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { DataPolicyPageRoutingModule } from './data-policy-routing.module'; | ||
|
||
import { SharedModule } from '../../shared/shared.module'; | ||
import { DataPolicyPage } from './data-policy.page'; | ||
|
||
@NgModule({ | ||
imports: [SharedModule, DataPolicyPageRoutingModule], | ||
declarations: [DataPolicyPage], | ||
}) | ||
export class DataPolicyPageModule {} |
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,27 @@ | ||
<ng-container *ngIf="(networkConnected$ | async) === false; else bubbleIframe"> | ||
<mat-toolbar> | ||
<button | ||
routerLink=".." | ||
routerDirection="back" | ||
mat-mini-fab | ||
class="capture-rebranded-button" | ||
> | ||
<mat-icon>arrow_back</mat-icon> | ||
</button> | ||
<span>{{ 'dataPolicy' | transloco }}</span> | ||
</mat-toolbar> | ||
<div class="no-network-text"> | ||
{{ 'message.networkNotConnected' | transloco }} | ||
</div> | ||
</ng-container> | ||
|
||
<ng-template #bubbleIframe> | ||
<iframe | ||
[src]="dataPolicyUrl | safeResourceUrl" | ||
class="bubble-iframe" | ||
></iframe> | ||
<ion-spinner | ||
*ngIf="(iframeLoaded$ | async) !== true" | ||
name="lines-sharp" | ||
></ion-spinner> | ||
</ng-template> |
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,39 @@ | ||
mat-toolbar { | ||
span { | ||
padding-right: 40px; | ||
font-style: normal; | ||
font-weight: 500; | ||
font-size: 16px; | ||
line-height: 21px; | ||
text-align: center; | ||
color: white; | ||
} | ||
|
||
.capture-rebranded-button { | ||
margin: 0 4px; | ||
background: #ffffff40 !important; /* stylelint-disable-line declaration-no-important */ | ||
color: white !important; /* stylelint-disable-line declaration-no-important */ | ||
backdrop-filter: blur(4px); | ||
box-shadow: none; | ||
} | ||
} | ||
|
||
.no-network-text { | ||
font-size: 18px; | ||
margin: auto; | ||
} | ||
|
||
.bubble-iframe { | ||
background-color: black; | ||
width: 100vw; | ||
height: 100vh; | ||
border: 0; | ||
} | ||
|
||
ion-spinner { | ||
position: absolute; | ||
left: 50%; | ||
top: 50%; | ||
transform: translate(-50%, -50%); | ||
scale: 1.5; | ||
} |
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,26 @@ | ||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; | ||
import { SharedTestingModule } from '../../shared/shared-testing.module'; | ||
|
||
import { DataPolicyPage } from './data-policy.page'; | ||
|
||
describe('DataPolicyPage', () => { | ||
let component: DataPolicyPage; | ||
let fixture: ComponentFixture<DataPolicyPage>; | ||
|
||
beforeEach( | ||
waitForAsync(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [DataPolicyPage], | ||
imports: [SharedTestingModule], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(DataPolicyPage); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}) | ||
); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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,45 @@ | ||
import { Component } from '@angular/core'; | ||
import { NavController } from '@ionic/angular'; | ||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; | ||
import { BehaviorSubject, fromEvent } from 'rxjs'; | ||
import { tap } from 'rxjs/operators'; | ||
import { BUBBLE_IFRAME_URL } from '../../shared/dia-backend/secret'; | ||
import { NetworkService } from '../../shared/network/network.service'; | ||
|
||
@UntilDestroy() | ||
@Component({ | ||
selector: 'app-data-policy', | ||
templateUrl: './data-policy.page.html', | ||
styleUrls: ['./data-policy.page.scss'], | ||
}) | ||
export class DataPolicyPage { | ||
readonly networkConnected$ = this.networkService.connected$; | ||
readonly dataPolicyUrl = `${BUBBLE_IFRAME_URL}/data_policy`; | ||
readonly iframeLoaded$ = new BehaviorSubject(false); | ||
|
||
constructor( | ||
private readonly networkService: NetworkService, | ||
private readonly navController: NavController | ||
) {} | ||
|
||
ionViewDidEnter() { | ||
this.processIframeEvents(); | ||
} | ||
|
||
processIframeEvents() { | ||
fromEvent(window, 'message') | ||
.pipe( | ||
tap(event => { | ||
const postMessageEvent = event as MessageEvent; | ||
if (postMessageEvent.data === 'iframe-on-load') { | ||
this.iframeLoaded$.next(true); | ||
} | ||
if (postMessageEvent.data === 'iframeBackButtonClicked') { | ||
this.navController.back(); | ||
} | ||
}), | ||
untilDestroyed(this) | ||
) | ||
.subscribe(); | ||
} | ||
} |
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
Oops, something went wrong.