#84 - Add login page as part of SPA instead of relying on external page
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
2021-02-15 11:45:04 -06:00
parent aad0aea79a
commit 0fecb8a4ba
18 changed files with 518 additions and 172 deletions

View File

@@ -34,6 +34,7 @@ import {MarkdownModule} from 'ngx-markdown';
import {VersionModalComponent} from './version-modal/version-modal.component';
import {EditorPageRoutingModule} from '../pages/editor/editor-routing.module';
import {EditorPage} from '../pages/editor/editor.page';
import {LoginPage} from '../pages/login/login.page';
import {WysiwygComponent} from './wysiwyg/wysiwyg.component';
import {WysiwygEditorComponent} from './editor/database/editors/wysiwyg/wysiwyg-editor.component';
import {WysiwygModalComponent} from './editor/database/editors/wysiwyg/wysiwyg-modal.component';
@@ -76,6 +77,7 @@ import {FileBoxPageComponent} from './nodes/file-box/file-box-page.component';
MarkdownEditorComponent,
VersionModalComponent,
EditorPage,
LoginPage,
WysiwygComponent,
WysiwygEditorComponent,
WysiwygModalComponent,
@@ -130,6 +132,7 @@ import {FileBoxPageComponent} from './nodes/file-box/file-box-page.component';
MarkdownEditorComponent,
VersionModalComponent,
EditorPage,
LoginPage,
WysiwygComponent,
WysiwygEditorComponent,
WysiwygModalComponent,
@@ -170,6 +173,7 @@ import {FileBoxPageComponent} from './nodes/file-box/file-box-page.component';
MarkdownEditorComponent,
VersionModalComponent,
EditorPage,
LoginPage,
WysiwygComponent,
WysiwygEditorComponent,
WysiwygModalComponent,

View File

@@ -33,7 +33,6 @@ export class BooleanRendererComponent implements ICellRendererAngularComp {
) { }
agInit(params: ICellRendererParams): void {
console.log('bool renderer', this);
this.params = params;
// @ts-ignore

View File

@@ -3,6 +3,7 @@ import {Router} from '@angular/router';
import {ApiService} from '../../service/api.service';
import {PopoverController} from '@ionic/angular';
import {DatabaseService} from '../../service/db/database.service';
import {AuthService} from '../../service/auth.service';
@Component({
selector: 'app-option-picker',
@@ -22,6 +23,7 @@ export class OptionPickerComponent implements OnInit {
protected router: Router,
protected popover: PopoverController,
protected db: DatabaseService,
protected auth: AuthService,
) { }
ngOnInit() {}
@@ -30,8 +32,8 @@ export class OptionPickerComponent implements OnInit {
if ( key === 'html_export' ) {
window.open(this.api._build_url('/data/export/html'), '_blank');
} else if ( key === 'logout' ) {
await this.db.purge();
window.location.href = '/auth/logout';
await this.popover.dismiss();
await this.auth.endSession();
} else if ( key === 'toggle_darkmode' ) {
this.toggleDark();
} else if ( key === 'search_everywhere' ) {