Renamed components for clarity

test-lbry-log-in -> log-in-wallet
log-in -> log-in-app
This commit is contained in:
Daniel Krol 2022-05-05 16:55:00 -04:00
parent 65d675041a
commit 439ce26e0f
11 changed files with 34 additions and 40 deletions

View file

@ -73,7 +73,7 @@ export class GlobalVarsService {
testLoginLBRY() : Observable<string[]> { testLoginLBRY() : Observable<string[]> {
return new Observable(subscriber => { 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. // 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.next(res.addresses)
subscriber.complete() subscriber.complete()

View file

@ -1,35 +1,35 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import {TestSignComponent} from './test-sign/test-sign.component'; 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 {TestSignTransactionComponent} from './test-sign-transaction/test-sign-transaction.component';
import {EmbedComponent} from './embed/embed.component'; import {EmbedComponent} from './embed/embed.component';
import {HomeComponent} from './home/home.component'; import {HomeComponent} from './home/home.component';
import {LogoutComponent} from './logout/logout.component'; import {LogoutComponent} from './logout/logout.component';
import {SignUpComponent} from './sign-up/sign-up.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'; import {ApproveComponent} from './approve/approve.component';
export class RouteNames { export class RouteNames {
public static TEST_SIGN = 'test-sign'; 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 TEST_SIGN_TRANSACTION = 'test-sign-transaction';
public static EMBED = 'embed'; public static EMBED = 'embed';
public static LOGOUT = 'logout'; public static LOGOUT = 'logout';
public static SIGN_UP = 'sign-up'; public static SIGN_UP = 'sign-up';
public static LOG_IN = 'log-in'; public static LOG_IN_APP = 'log-in-app';
public static APPROVE = 'approve'; public static APPROVE = 'approve';
} }
const routes: Routes = [ const routes: Routes = [
{ path: '', component: HomeComponent, pathMatch: 'full' }, { path: '', component: HomeComponent, pathMatch: 'full' },
{ path: RouteNames.TEST_SIGN, component: TestSignComponent, 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.TEST_SIGN_TRANSACTION, component: TestSignTransactionComponent, pathMatch: 'full' },
{ path: RouteNames.EMBED, component: EmbedComponent, pathMatch: 'full' }, { path: RouteNames.EMBED, component: EmbedComponent, pathMatch: 'full' },
{ path: RouteNames.LOGOUT, component: LogoutComponent, pathMatch: 'full' }, { path: RouteNames.LOGOUT, component: LogoutComponent, pathMatch: 'full' },
{ path: RouteNames.SIGN_UP, component: SignUpComponent, 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' }, { path: RouteNames.APPROVE, component: ApproveComponent, pathMatch: 'full' },
]; ];

View file

@ -15,7 +15,7 @@ import { BannerComponent } from './banner/banner.component';
import { SignUpComponent } from './sign-up/sign-up.component'; import { SignUpComponent } from './sign-up/sign-up.component';
import {AccountService} from './account.service'; import {AccountService} from './account.service';
import {EntropyService} from './entropy.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 {HttpClientModule} from '@angular/common/http';
import { ApproveComponent } from './approve/approve.component'; import { ApproveComponent } from './approve/approve.component';
import { ErrorCallbackComponent } from './error-callback/error-callback.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 { MatTooltipModule } from '@angular/material/tooltip';
import { TestSignComponent } from './test-sign/test-sign.component'; import { TestSignComponent } from './test-sign/test-sign.component';
import { TestSignTransactionComponent } from './test-sign-transaction/test-sign-transaction.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({ @NgModule({
declarations: [ declarations: [
@ -33,12 +33,12 @@ import { TestLbryLogInComponent } from './test-lbry-log-in/test-lbry-log-in.comp
LogoutComponent, LogoutComponent,
BannerComponent, BannerComponent,
SignUpComponent, SignUpComponent,
LogInComponent, LogInAppComponent,
ApproveComponent, ApproveComponent,
ErrorCallbackComponent, ErrorCallbackComponent,
TestSignComponent, TestSignComponent,
TestSignTransactionComponent, TestSignTransactionComponent,
TestLbryLogInComponent, LogInWalletComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,

View file

@ -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 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>
<div> <div>

View file

@ -1,20 +1,20 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LogInComponent } from './log-in.component'; import { LogInAppComponent } from './log-in-app.component';
describe('LogInComponent', () => { describe('LogInAppComponent', () => {
let component: LogInComponent; let component: LogInAppComponent;
let fixture: ComponentFixture<LogInComponent>; let fixture: ComponentFixture<LogInAppComponent>;
beforeEach(async () => { beforeEach(async () => {
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [ LogInComponent ] declarations: [ LogInAppComponent ]
}) })
.compileComponents(); .compileComponents();
}); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(LogInComponent); fixture = TestBed.createComponent(LogInAppComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });

View file

@ -3,15 +3,12 @@ import {AccountService} from '../account.service';
import {IdentityService} from '../identity.service'; import {IdentityService} from '../identity.service';
import {GlobalVarsService} from '../global-vars.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({ @Component({
selector: 'app-log-in', selector: 'app-log-in-app',
templateUrl: './log-in.component.html', templateUrl: './log-in-app.component.html',
styleUrls: ['./log-in.component.scss'] styleUrls: ['./log-in-app.component.scss']
}) })
export class LogInComponent implements OnInit { export class LogInAppComponent implements OnInit {
allAccountNames: {[key: string]: string} = {}; allAccountNames: {[key: string]: string} = {};
constructor( constructor(

View file

@ -1,20 +1,20 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TestLbryLogInComponent } from './test-lbry-log-in.component'; import { LogInWalletComponent } from './log-in-wallet.component';
describe('TestLbryLogInComponent', () => { describe('LogInWalletComponent', () => {
let component: TestLbryLogInComponent; let component: LogInWalletComponent;
let fixture: ComponentFixture<TestLbryLogInComponent>; let fixture: ComponentFixture<LogInWalletComponent>;
beforeEach(async () => { beforeEach(async () => {
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [ TestLbryLogInComponent ] declarations: [ LogInWalletComponent ]
}) })
.compileComponents(); .compileComponents();
}); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(TestLbryLogInComponent); fixture = TestBed.createComponent(LogInWalletComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });

View file

@ -6,19 +6,16 @@ import {Router} from '@angular/router';
import {RouteNames} from '../app-routing.module'; import {RouteNames} from '../app-routing.module';
import {of} from 'rxjs'; 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: // This component handles two ways of logging in:
// * Wallet Sync (currently commented out) // * Wallet Sync (currently commented out)
// * Paste Wallet (temporary measure for initial version) // * Paste Wallet (temporary measure for initial version)
@Component({ @Component({
selector: 'app-test-lbry-log-in', selector: 'app-log-in-wallet',
templateUrl: './test-lbry-log-in.component.html', templateUrl: './log-in-wallet.component.html',
styleUrls: ['./test-lbry-log-in.component.scss'] styleUrls: ['./log-in-wallet.component.scss']
}) })
export class TestLbryLogInComponent implements OnInit { export class LogInWalletComponent implements OnInit {
walletDumpInitial = this.getWalletDumpInitial(); walletDumpInitial = this.getWalletDumpInitial();
loginError = ''; loginError = '';
@ -82,7 +79,7 @@ export class TestLbryLogInComponent implements OnInit {
this.loginUsername = ''; this.loginUsername = '';
this.loginPassword = ''; 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?" this.loginError = "Login Error. Try again?"
@ -104,7 +101,7 @@ export class TestLbryLogInComponent implements OnInit {
throw "fix me" throw "fix me"
// For now, we'll just pick the first channel in the wallet and log right in // 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'});
} }
} }