diff --git a/src/app/settings/settings.component.css b/src/app/settings/settings.component.css index 72174fa..f808522 100644 --- a/src/app/settings/settings.component.css +++ b/src/app/settings/settings.component.css @@ -1,7 +1,18 @@ -* { - font-family: 'Spartan', sans-serif; +@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap'); + +.settings-title { + font-family: Roboto Mono; + background: #ff4700; + color: white; + font-size: 30px; + font-weight: 700; + text-align: center; + margin-bottom: 15px; + height: 40px; + justify-content: center; } -.mat-dialog-content { - max-width: 300px; +.settings_field { + width: 100%; } + diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html index 578e404..9404faa 100644 --- a/src/app/settings/settings.component.html +++ b/src/app/settings/settings.component.html @@ -1,31 +1,57 @@ -

Settings

- - - Name - - - - Currency - - - {{coin.label}} - - - - - Display Zcash amount in zatoshis? - - - Activate payment confirmation? - - - Viewing key - - - +
Settings
- - - - +
+ + + Name + + + + Currency + + + {{coin.label}} + + + + + Use zatoshis? + + +

+			
+				Activate payment confirmation?
+			
+			

+			
+				Viewing key
+				
+				      
+			
+
+	
+ + + + + +
\ No newline at end of file diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index bc0797c..57bc87f 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -16,6 +16,7 @@ export class SettingsComponent implements OnInit { settingsForm: UntypedFormGroup; owner: Owner; useZats: boolean; + useVKey: boolean = false; coins = [ { label: 'US Dollar', @@ -35,6 +36,8 @@ export class SettingsComponent implements OnInit { } ]; + viewkeyControl = new FormControl({ value: null, disabled: true }); + constructor( private fb: UntypedFormBuilder, private dialogRef: MatDialogRef, @@ -44,10 +47,14 @@ export class SettingsComponent implements OnInit { this.settingsForm = fb.group({ name: [data.name, Validators.required], currency: [data.currency, Validators.required], - useZats: [data.zats, Validators.required], - VkeyOn: [data.] + useZats: [data.zats, Validators.required], + VkeyOn: [data.payconf, Validators.required], + VKey: [{value:data.viewkey, disabled: true }, + Validators.required + ] }); this.owner = data; + } ngOnInit() { @@ -60,7 +67,13 @@ export class SettingsComponent implements OnInit { save() { this.owner.name = this.settingsForm.value.name; this.owner.currency = this.settingsForm.value.currency; - this.owner.zats = this.useZats; + this.owner.zats = this.settingsForm.value.useZats; + this.owner.payconf = this.useVKey; + if ( this.settingsForm.value.VkeyOn ) { + this.owner.viewkey = this.settingsForm.value.VKey; + } + else + this.owner.viewkey = ''; this.dialogRef.close(this.owner); } @@ -69,6 +82,15 @@ export class SettingsComponent implements OnInit { } onChangeVKeyOn(ob: MatSlideToggleChange) { - console.log("Viewing key switch is " + ( ob.checked ? "[ON]." : "[OFF].") ); + console.log("Viewing key switch is " + + ( ob.checked ? "[ON]." : "[OFF]." ) ); + + this.useVKey = ob.checked; + + if ( ob.checked ) + this.viewkeyControl.enable() + else + this.viewkeyControl.disable(); + } } diff --git a/src/app/viewer/viewer.component.css b/src/app/viewer/viewer.component.css index 1e43079..a077015 100644 --- a/src/app/viewer/viewer.component.css +++ b/src/app/viewer/viewer.component.css @@ -1,13 +1,26 @@ * { font-family: 'Spartan', sans-serif; } + .icon{ font-family: 'Material Icons'; } + + +.shop-menu { + font-family: Roboto, sans-serif; +} + +.main-buttons { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 12px; + margin-bottom: 12px; +} + .small{ - font-size: x-small; - margin-top: 0px; -} -h3{ - margin-bottom: 0px; + margin-top: 5px; + font-size: 14px !important; } + diff --git a/src/app/viewer/viewer.component.html b/src/app/viewer/viewer.component.html index 6172894..0fd0052 100644 --- a/src/app/viewer/viewer.component.html +++ b/src/app/viewer/viewer.component.html @@ -1,16 +1,37 @@ -
-

{{(ownerUpdate | async)!.name}}

-

{{ shortenZaddr((ownerUpdate | async)!.address) }}

- - - + - - help + + help - +