forked from airgap-it/airgap-wallet
-
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.
Revert "Resolve "Remove Mt. Pelerin functionality""
- Loading branch information
Showing
10 changed files
with
254 additions
and
1 deletion.
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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { NgModule } from '@angular/core' | ||
import { CommonModule } from '@angular/common' | ||
import { FormsModule } from '@angular/forms' | ||
|
||
import { IonicModule } from '@ionic/angular' | ||
|
||
import { TranslateModule } from '@ngx-translate/core' | ||
import { ComponentsModule } from '@airgap/angular-core' | ||
import { RouterModule } from '@angular/router' | ||
import { TradingSettingsPage } from './trading-settings.page' | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
FormsModule, | ||
IonicModule, | ||
ComponentsModule, | ||
TranslateModule, | ||
RouterModule.forChild([{ path: '', component: TradingSettingsPage }]) | ||
], | ||
declarations: [TradingSettingsPage] | ||
}) | ||
export class TradingSettingsPageModule {} |
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,65 @@ | ||
<ion-header class="ion-no-border"> | ||
<ion-grid class="ion-no-padding"> | ||
<ion-toolbar> | ||
<ion-buttons slot="start"> | ||
<ion-back-button defaultHref="/tabs/settings"></ion-back-button> | ||
</ion-buttons> | ||
<ion-title>{{ 'settings.trading_settings.text' | translate }}</ion-title> | ||
</ion-toolbar> | ||
</ion-grid> | ||
</ion-header> | ||
<ion-content> | ||
<ion-item> | ||
<ion-toggle [checked]="useMtPerelin" (ionChange)="toggleUseMtPerelin($event)" slot="end">{{ 'settings.trading_settings.mtpelerin' | translate }}</ion-toggle> | ||
</ion-item> | ||
|
||
<div class="mtpelerin-wrapper"> | ||
<img src="https://www.mtpelerin.com/images/logo.svg" /> | ||
<h3>{{ 'mtpelerin.header1' | translate }}</h3> | ||
<p> | ||
{{ 'mtpelerin.paragraph1' | translate }} | ||
</p> | ||
<h3>{{ 'mtpelerin.header2' | translate }}</h3> | ||
<ul> | ||
<li>{{ 'mtpelerin.lineItem1' | translate }}</li> | ||
<li>{{ 'mtpelerin.lineItem2' | translate }}</li> | ||
<li>{{ 'mtpelerin.lineItem3' | translate }}</li> | ||
</ul> | ||
|
||
<ion-row> | ||
<ion-col> | ||
<ion-button | ||
class="mt-perelin-button" | ||
expand="full" | ||
size="small" | ||
color="white" | ||
shape="round" | ||
(click)="navigate('https://www.mtpelerin.com/buy-crypto')" | ||
> | ||
{{ 'mtpelerin.button1' | translate }} | ||
</ion-button> | ||
</ion-col> | ||
</ion-row> | ||
<ion-row> | ||
<ion-col> | ||
<ion-button | ||
class="mt-perelin-button" | ||
expand="full" | ||
size="small" | ||
color="white" | ||
shape="round" | ||
(click)="navigate('https://www.mtpelerin.com/sell-crypto')" | ||
> | ||
{{ 'mtpelerin.button2' | translate }} | ||
</ion-button> | ||
</ion-col> | ||
</ion-row> | ||
|
||
<span> | ||
{{ 'mtpelerin.note' | translate }} | ||
</span> | ||
<span> | ||
<a (click)="navigate('https://developers.mtpelerin.com/service-information/supported-countries')">{{ 'mtpelerin.noteLink1' | translate }}</a>, <a (click)="navigate('https://www.mtpelerin.com/terms-conditions')">{{ 'mtpelerin.noteLink2' | translate }}</a> | ||
</span> | ||
</div> | ||
</ion-content> |
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 @@ | ||
.mtpelerin-wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
padding: 24px; | ||
|
||
.buttons-wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
img { | ||
height: 48px; | ||
width: fit-content; | ||
} | ||
|
||
h3 { | ||
color: white; | ||
margin-top: 32px; | ||
margin-bottom: 0px; | ||
font-size: 18px; | ||
font-weight: bold; | ||
} | ||
|
||
p { | ||
margin-top: 12px; | ||
margin-bottom: 0px; | ||
font-size: 14px; | ||
font-weight: 400; | ||
} | ||
|
||
ul { | ||
margin-top: 12px; | ||
margin-bottom: 32px; | ||
font-size: 14px; | ||
font-weight: 400; | ||
} | ||
|
||
span { | ||
margin-top: 12px; | ||
margin-bottom: 0px; | ||
font-size: 12px; | ||
font-weight: 400; | ||
color: gray; | ||
} | ||
} |
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 { InternalStorageKey, InternalStorageService } from '@airgap/angular-core' | ||
import { Component } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'app-trading-settings', | ||
templateUrl: './trading-settings.page.html', | ||
styleUrls: ['./trading-settings.page.scss'] | ||
}) | ||
export class TradingSettingsPage { | ||
public useMtPerelin: boolean = false | ||
|
||
public constructor(private readonly storageService: InternalStorageService) { | ||
this.storageService.get(InternalStorageKey.SETTINGS_TRADING_USE_MTPELERIN).then((value) => { | ||
this.useMtPerelin = value | ||
}) | ||
} | ||
|
||
public async toggleUseMtPerelin(event: any) { | ||
const value = event.detail.checked | ||
await this.storageService.set(InternalStorageKey.SETTINGS_TRADING_USE_MTPELERIN, value) | ||
} | ||
|
||
public navigate(path: string) { | ||
window.open(path, '_blank') | ||
} | ||
} |
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