mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
wiz messaging and alert (#713)
Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com>
This commit is contained in:
committed by
Aiden McClelland
parent
65a4b8ab84
commit
c30141c4f0
@@ -25,7 +25,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<p style="margin-top: 8px;">We suggest you copy and save your tor adress in a safe place.</p>
|
<p style="margin-top: 8px;">We suggest you copy and save your tor adress in a safe place. This page will no longer be available once you access your Embassy.</p>
|
||||||
|
|
||||||
<div (click)="toggleLan()">
|
<div (click)="toggleLan()">
|
||||||
<ion-icon
|
<ion-icon
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core'
|
import { Component } from '@angular/core'
|
||||||
import { ToastController } from '@ionic/angular'
|
import { AlertController, ToastController } from '@ionic/angular'
|
||||||
import { StateService } from 'src/app/services/state.service'
|
import { StateService } from 'src/app/services/state.service'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -10,6 +10,7 @@ import { StateService } from 'src/app/services/state.service'
|
|||||||
export class SuccessPage {
|
export class SuccessPage {
|
||||||
constructor (
|
constructor (
|
||||||
private readonly toastCtrl: ToastController,
|
private readonly toastCtrl: ToastController,
|
||||||
|
private readonly alertCtrl: AlertController,
|
||||||
public readonly stateService: StateService,
|
public readonly stateService: StateService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
@@ -34,6 +35,18 @@ export class SuccessPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async copyToClipboard (str: string): Promise<boolean> {
|
async copyToClipboard (str: string): Promise<boolean> {
|
||||||
|
const alert = await this.alertCtrl.create({
|
||||||
|
header: 'Please Save',
|
||||||
|
message: 'Make sure you save the address to your Embassy in a safe place.',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: 'OK',
|
||||||
|
role: 'cancel',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
await alert.present()
|
||||||
if (window.isSecureContext) {
|
if (window.isSecureContext) {
|
||||||
return navigator.clipboard.writeText(str)
|
return navigator.clipboard.writeText(str)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user