Add offline cachine for file group elements and contents (not files, though)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-10-21 23:12:57 -05:00
parent 02d8505b05
commit 294b312641
9 changed files with 265 additions and 47 deletions

View File

@@ -2,6 +2,7 @@ import {Component, Input, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {ApiService} from '../../service/api.service';
import {PopoverController} from '@ionic/angular';
import {DatabaseService} from "../../service/db/database.service";
@Component({
selector: 'app-option-picker',
@@ -17,14 +18,16 @@ export class OptionPickerComponent implements OnInit {
protected api: ApiService,
protected router: Router,
protected popover: PopoverController,
protected db: DatabaseService,
) { }
ngOnInit() {}
onSelect(key) {
async onSelect(key) {
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';
} else if ( key === 'toggle_darkmode' ) {
this.toggleDark();