Update main view to 'shop'
This commit is contained in:
parent
4c5d4c311f
commit
172f4da6b1
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ import { NodeResolverService } from './node-resolver.service';
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: LoginComponent, resolve: { response: NodeResolverService} },
|
{ path: '', component: LoginComponent, resolve: { response: NodeResolverService} },
|
||||||
//{ path: 'create', component: PostCreateComponent, canActivate: [AuthGuardService]},
|
//{ path: 'create', component: PostCreateComponent, canActivate: [AuthGuardService]},
|
||||||
{ path: 'view', component: ViewerComponent, canActivate: [AuthGuardService]},
|
{ path: 'shop', component: ViewerComponent, canActivate: [AuthGuardService]},
|
||||||
{ path: 'login', component: LoginComponent}
|
{ path: 'login', component: LoginComponent}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -52,12 +52,12 @@ export class LoginComponent implements OnInit {
|
||||||
subscribe((userAddr: string) => {
|
subscribe((userAddr: string) => {
|
||||||
if (userAddr.length != 0) {
|
if (userAddr.length != 0) {
|
||||||
console.log('Log in found!');
|
console.log('Log in found!');
|
||||||
this.router.navigate(['/view']);
|
this.router.navigate(['/shop']);
|
||||||
} else {
|
} else {
|
||||||
console.log('No login for existing token found');
|
console.log('No login for existing token found');
|
||||||
console.log('Showing QR code for login');
|
console.log('Showing QR code for login');
|
||||||
//console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken))));
|
//console.log(URLSafeBase64.encode(Buffer.from('S4ZEC::'.concat(localToken))));
|
||||||
var codeString = `zcash:${this.nodeAddress}?amount=0.001&memo=${URLSafeBase64.encode(Buffer.from('ZGO::'.concat(localToken!)))}`;
|
var codeString = `zcash:${this.nodeAddress}?amount=0.005&memo=${URLSafeBase64.encode(Buffer.from('ZGO::'.concat(localToken!)))}`;
|
||||||
console.log(codeString);
|
console.log(codeString);
|
||||||
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||||
text: codeString,
|
text: codeString,
|
||||||
|
@ -81,7 +81,7 @@ export class LoginComponent implements OnInit {
|
||||||
this.uZaddrUpdate.subscribe((userAddr: string) => {
|
this.uZaddrUpdate.subscribe((userAddr: string) => {
|
||||||
if (userAddr.length != 0) {
|
if (userAddr.length != 0) {
|
||||||
console.log('Log in found in blockchain!');
|
console.log('Log in found in blockchain!');
|
||||||
this.router.navigate(['/view']);
|
this.router.navigate(['/shop']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue