Renamed components for clarity
test-lbry-log-in -> log-in-wallet log-in -> log-in-app
This commit is contained in:
parent
65d675041a
commit
439ce26e0f
11 changed files with 34 additions and 40 deletions
|
@ -73,7 +73,7 @@ export class GlobalVarsService {
|
|||
|
||||
testLoginLBRY() : Observable<string[]> {
|
||||
return new Observable(subscriber => {
|
||||
this.identityService.launch("/test-lbry-log-in", {}).subscribe((res) => {
|
||||
this.identityService.launch("/log-in-wallet", {}).subscribe((res) => {
|
||||
// TODO - maybe we want public key instead of address? we should, as DeSo did, have a list of users with everything we need from them.
|
||||
subscriber.next(res.addresses)
|
||||
subscriber.complete()
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import {TestSignComponent} from './test-sign/test-sign.component';
|
||||
import {TestLbryLogInComponent} from './test-lbry-log-in/test-lbry-log-in.component';
|
||||
import {LogInWalletComponent} from './log-in-wallet/log-in-wallet.component';
|
||||
import {TestSignTransactionComponent} from './test-sign-transaction/test-sign-transaction.component';
|
||||
import {EmbedComponent} from './embed/embed.component';
|
||||
import {HomeComponent} from './home/home.component';
|
||||
import {LogoutComponent} from './logout/logout.component';
|
||||
import {SignUpComponent} from './sign-up/sign-up.component';
|
||||
import {LogInComponent} from './log-in/log-in.component';
|
||||
import {LogInAppComponent} from './log-in-app/log-in-app.component';
|
||||
import {ApproveComponent} from './approve/approve.component';
|
||||
|
||||
export class RouteNames {
|
||||
public static TEST_SIGN = 'test-sign';
|
||||
public static TEST_LBRY_LOG_IN = 'test-lbry-log-in';
|
||||
public static LOG_IN_WALLET = 'log-in-wallet';
|
||||
public static TEST_SIGN_TRANSACTION = 'test-sign-transaction';
|
||||
public static EMBED = 'embed';
|
||||
public static LOGOUT = 'logout';
|
||||
public static SIGN_UP = 'sign-up';
|
||||
public static LOG_IN = 'log-in';
|
||||
public static LOG_IN_APP = 'log-in-app';
|
||||
public static APPROVE = 'approve';
|
||||
}
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', component: HomeComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.TEST_SIGN, component: TestSignComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.TEST_LBRY_LOG_IN, component: TestLbryLogInComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.LOG_IN_WALLET, component: LogInWalletComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.TEST_SIGN_TRANSACTION, component: TestSignTransactionComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.EMBED, component: EmbedComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.LOGOUT, component: LogoutComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.SIGN_UP, component: SignUpComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.LOG_IN, component: LogInComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.LOG_IN_APP, component: LogInAppComponent, pathMatch: 'full' },
|
||||
{ path: RouteNames.APPROVE, component: ApproveComponent, pathMatch: 'full' },
|
||||
];
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import { BannerComponent } from './banner/banner.component';
|
|||
import { SignUpComponent } from './sign-up/sign-up.component';
|
||||
import {AccountService} from './account.service';
|
||||
import {EntropyService} from './entropy.service';
|
||||
import { LogInComponent } from './log-in/log-in.component';
|
||||
import { LogInAppComponent } from './log-in-app/log-in-app.component';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import { ApproveComponent } from './approve/approve.component';
|
||||
import { ErrorCallbackComponent } from './error-callback/error-callback.component';
|
||||
|
@ -23,7 +23,7 @@ import { NgxIntlTelInputModule } from 'ngx-intl-tel-input';
|
|||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { TestSignComponent } from './test-sign/test-sign.component';
|
||||
import { TestSignTransactionComponent } from './test-sign-transaction/test-sign-transaction.component';
|
||||
import { TestLbryLogInComponent } from './test-lbry-log-in/test-lbry-log-in.component'
|
||||
import { LogInWalletComponent } from './log-in-wallet/log-in-wallet.component'
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -33,12 +33,12 @@ import { TestLbryLogInComponent } from './test-lbry-log-in/test-lbry-log-in.comp
|
|||
LogoutComponent,
|
||||
BannerComponent,
|
||||
SignUpComponent,
|
||||
LogInComponent,
|
||||
LogInAppComponent,
|
||||
ApproveComponent,
|
||||
ErrorCallbackComponent,
|
||||
TestSignComponent,
|
||||
TestSignTransactionComponent,
|
||||
TestLbryLogInComponent,
|
||||
LogInWalletComponent,
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
|
|
@ -39,7 +39,7 @@ TODO - Unused for now. Revamp this page to be a channel picker for logging in
|
|||
<!--
|
||||
Go back to Wallet Sync Login page
|
||||
-->
|
||||
<a class="link" [routerLink]="['/test-lbry-log-in']"><u>Wallet Sync Log In</u></a>
|
||||
<a class="link" [routerLink]="['/log-in-wallet']"><u>Wallet Sync Log In</u></a>
|
||||
</div>
|
||||
|
||||
<div>
|
|
@ -1,20 +1,20 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LogInComponent } from './log-in.component';
|
||||
import { LogInAppComponent } from './log-in-app.component';
|
||||
|
||||
describe('LogInComponent', () => {
|
||||
let component: LogInComponent;
|
||||
let fixture: ComponentFixture<LogInComponent>;
|
||||
describe('LogInAppComponent', () => {
|
||||
let component: LogInAppComponent;
|
||||
let fixture: ComponentFixture<LogInAppComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ LogInComponent ]
|
||||
declarations: [ LogInAppComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LogInComponent);
|
||||
fixture = TestBed.createComponent(LogInAppComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
|
@ -3,15 +3,12 @@ import {AccountService} from '../account.service';
|
|||
import {IdentityService} from '../identity.service';
|
||||
import {GlobalVarsService} from '../global-vars.service';
|
||||
|
||||
// This is logging into the app, not the wallet sync
|
||||
// TODO rename this component to app-log-in
|
||||
|
||||
@Component({
|
||||
selector: 'app-log-in',
|
||||
templateUrl: './log-in.component.html',
|
||||
styleUrls: ['./log-in.component.scss']
|
||||
selector: 'app-log-in-app',
|
||||
templateUrl: './log-in-app.component.html',
|
||||
styleUrls: ['./log-in-app.component.scss']
|
||||
})
|
||||
export class LogInComponent implements OnInit {
|
||||
export class LogInAppComponent implements OnInit {
|
||||
allAccountNames: {[key: string]: string} = {};
|
||||
|
||||
constructor(
|
|
@ -1,20 +1,20 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TestLbryLogInComponent } from './test-lbry-log-in.component';
|
||||
import { LogInWalletComponent } from './log-in-wallet.component';
|
||||
|
||||
describe('TestLbryLogInComponent', () => {
|
||||
let component: TestLbryLogInComponent;
|
||||
let fixture: ComponentFixture<TestLbryLogInComponent>;
|
||||
describe('LogInWalletComponent', () => {
|
||||
let component: LogInWalletComponent;
|
||||
let fixture: ComponentFixture<LogInWalletComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TestLbryLogInComponent ]
|
||||
declarations: [ LogInWalletComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TestLbryLogInComponent);
|
||||
fixture = TestBed.createComponent(LogInWalletComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
|
@ -6,19 +6,16 @@ import {Router} from '@angular/router';
|
|||
import {RouteNames} from '../app-routing.module';
|
||||
import {of} from 'rxjs';
|
||||
|
||||
// This is logging into the wallet sync, not the app
|
||||
// TODO rename this component to wallet-sync-log-in
|
||||
|
||||
// This component handles two ways of logging in:
|
||||
// * Wallet Sync (currently commented out)
|
||||
// * Paste Wallet (temporary measure for initial version)
|
||||
|
||||
@Component({
|
||||
selector: 'app-test-lbry-log-in',
|
||||
templateUrl: './test-lbry-log-in.component.html',
|
||||
styleUrls: ['./test-lbry-log-in.component.scss']
|
||||
selector: 'app-log-in-wallet',
|
||||
templateUrl: './log-in-wallet.component.html',
|
||||
styleUrls: ['./log-in-wallet.component.scss']
|
||||
})
|
||||
export class TestLbryLogInComponent implements OnInit {
|
||||
export class LogInWalletComponent implements OnInit {
|
||||
walletDumpInitial = this.getWalletDumpInitial();
|
||||
|
||||
loginError = '';
|
||||
|
@ -82,7 +79,7 @@ export class TestLbryLogInComponent implements OnInit {
|
|||
this.loginUsername = '';
|
||||
this.loginPassword = '';
|
||||
|
||||
this.router.navigate(['/', RouteNames.LOG_IN], {queryParamsHandling: 'merge'});
|
||||
this.router.navigate(['/', RouteNames.LOG_IN_APP], {queryParamsHandling: 'merge'});
|
||||
}),
|
||||
(() => {
|
||||
this.loginError = "Login Error. Try again?"
|
||||
|
@ -104,7 +101,7 @@ export class TestLbryLogInComponent implements OnInit {
|
|||
|
||||
throw "fix me"
|
||||
// For now, we'll just pick the first channel in the wallet and log right in
|
||||
// this.router.navigate(['/', RouteNames.LOG_IN], {queryParamsHandling: 'merge'});
|
||||
// this.router.navigate(['/', RouteNames.LOG_IN_APP], {queryParamsHandling: 'merge'});
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue