Add offline cachine for file group elements and contents (not files, though)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user