From 914bcbb474f6f186c212b2da0d9d864b5e75d8e4 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 29 Jun 2024 20:59:16 +0200 Subject: Rename to Faunerie --- src/FaunerieDataStore.ts | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 src/FaunerieDataStore.ts (limited to 'src/FaunerieDataStore.ts') diff --git a/src/FaunerieDataStore.ts b/src/FaunerieDataStore.ts new file mode 100755 index 0000000..3506841 --- /dev/null +++ b/src/FaunerieDataStore.ts @@ -0,0 +1,47 @@ +import {FaunerieApp} from "./FaunerieApp"; +import {Faunerie} from "libfaunerie"; + +export class FaunerieDataStore { + public loaded: boolean; + public loadedFromCache: boolean; + public hadErrorsLoading: boolean; + public searching: boolean; + public source: string; + public appData: string; + public database: Faunerie; + public db: object; + public tags: any[][]; + public tagsHashed: object; + public currentView: any[]; + public currentViewItems: any[]; + public page: number; + public modal: any; + public loader: any; + public login: any; + public unloaded: boolean; + public currentImage: any; + public currentImageClasses: any[]; + public needUpdate: boolean; + public lastQuery: string; + public lastPress: number; + public close: boolean; + + constructor(instance: FaunerieApp) { + let bootstrap = instance.bootstrap; + + this.page = 1; + this.searching = false; + this.unloaded = false; + // @ts-ignore + this.modal = new bootstrap.Modal(document.getElementById("preview")); + // @ts-ignore + this.loader = new bootstrap.Modal(document.getElementById("loader")); + this.login = new bootstrap.Modal(document.getElementById("login")); + this.loader.show(); + this.currentImage = null; + this.currentImageClasses = []; + this.hadErrorsLoading = false; + this.lastQuery = ""; + this.loaded = false; + } +} -- cgit