aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/FaunerieAI.ts (renamed from src/PrisbeamAI.ts)14
-rwxr-xr-xsrc/FaunerieActions.ts13
-rwxr-xr-xsrc/FaunerieApp.ts (renamed from src/PrisbeamApp.ts)60
-rwxr-xr-xsrc/FaunerieAppDisplay.ts (renamed from src/PrisbeamAppDisplay.ts)40
-rwxr-xr-xsrc/FaunerieDataStore.ts (renamed from src/PrisbeamDataStore.ts)10
-rwxr-xr-xsrc/FaunerieDerpibooru.ts (renamed from src/PrisbeamDerpibooru.ts)10
-rwxr-xr-xsrc/FaunerieLoader.ts (renamed from src/PrisbeamLoader.ts)26
-rwxr-xr-xsrc/FaunerieSearch.ts (renamed from src/PrisbeamSearch.ts)16
-rwxr-xr-xsrc/FaunerieSettings.ts (renamed from src/PrisbeamSettings.ts)16
-rwxr-xr-xsrc/FaunerieUtilities.ts (renamed from src/PrisbeamUtilities.ts)2
-rwxr-xr-xsrc/PrisbeamActions.ts13
-rwxr-xr-xsrc/index.ts4
12 files changed, 112 insertions, 112 deletions
diff --git a/src/PrisbeamAI.ts b/src/FaunerieAI.ts
index a9fc4d4..aa93cbb 100755
--- a/src/PrisbeamAI.ts
+++ b/src/FaunerieAI.ts
@@ -1,15 +1,15 @@
-import {PrisbeamApp} from "./PrisbeamApp";
+import {FaunerieApp} from "./FaunerieApp";
import {ChildProcess} from "node:child_process";
-import {PrisbeamImageType} from "libprisbeam";
+import {FaunerieImageType} from "libfaunerie";
import * as fs from "node:fs";
import * as cp from "node:child_process";
-export class PrisbeamAI {
- instance: PrisbeamApp;
+export class FaunerieAI {
+ instance: FaunerieApp;
aiProcess: ChildProcess;
aiStarting: boolean;
- constructor(instance: PrisbeamApp) {
+ constructor(instance: FaunerieApp) {
this.instance = instance;
}
@@ -125,11 +125,11 @@ export class PrisbeamAI {
}
await this.startAI();
- let url = _dataStore.database.frontend.getImageFile(_dataStore.currentImage, PrisbeamImageType.ViewURL);
+ let url = _dataStore.database.frontend.getImageFile(_dataStore.currentImage, FaunerieImageType.ViewURL);
let data: any;
if (url.startsWith("blob:") || url.startsWith("pbip:")) {
- fs.writeFileSync(_dataStore.appData + "/.temp", protectedDecode(fs.readFileSync(_dataStore.database.frontend.getImageFile(_dataStore.currentImage, PrisbeamImageType.ViewFile))));
+ fs.writeFileSync(_dataStore.appData + "/.temp", protectedDecode(fs.readFileSync(_dataStore.database.frontend.getImageFile(_dataStore.currentImage, FaunerieImageType.ViewFile))));
url = "file://" + (_dataStore.appData + "/.temp").replaceAll("\\", "/");
}
diff --git a/src/FaunerieActions.ts b/src/FaunerieActions.ts
new file mode 100755
index 0000000..853ac12
--- /dev/null
+++ b/src/FaunerieActions.ts
@@ -0,0 +1,13 @@
+import {FaunerieApp} from "./FaunerieApp";
+
+export class FaunerieActions {
+ instance: FaunerieApp;
+
+ constructor(instance: FaunerieApp) {
+ this.instance = instance;
+ }
+
+ goHome() {
+ this.instance.search.startTagSearch("");
+ }
+}
diff --git a/src/PrisbeamApp.ts b/src/FaunerieApp.ts
index a44e1e4..6614d07 100755
--- a/src/PrisbeamApp.ts
+++ b/src/FaunerieApp.ts
@@ -1,36 +1,36 @@
-import {PrisbeamDataStore} from "./PrisbeamDataStore";
-import {PrisbeamListType} from "libprisbeam";
-import {PrisbeamAppDisplay} from "./PrisbeamAppDisplay";
-import {PrisbeamSettings} from "./PrisbeamSettings";
-import {PrisbeamSearch} from "./PrisbeamSearch";
-import {PrisbeamActions} from "./PrisbeamActions";
-import {PrisbeamAI} from "./PrisbeamAI";
-import {PrisbeamLoader} from "./PrisbeamLoader";
-import {PrisbeamPropertyStore} from "libprisbeam/src/PrisbeamPropertyStore";
-import {PrisbeamDerpibooru} from "./PrisbeamDerpibooru";
-
-export class PrisbeamApp {
- dataStore: PrisbeamDataStore;
+import {FaunerieDataStore} from "./FaunerieDataStore";
+import {FaunerieListType} from "libfaunerie";
+import {FaunerieAppDisplay} from "./FaunerieAppDisplay";
+import {FaunerieSettings} from "./FaunerieSettings";
+import {FaunerieSearch} from "./FaunerieSearch";
+import {FaunerieActions} from "./FaunerieActions";
+import {FaunerieAI} from "./FaunerieAI";
+import {FaunerieLoader} from "./FaunerieLoader";
+import {FauneriePropertyStore} from "libfaunerie/src/FauneriePropertyStore";
+import {FaunerieDerpibooru} from "./FaunerieDerpibooru";
+
+export class FaunerieApp {
+ dataStore: FaunerieDataStore;
bootstrap: any;
- display: PrisbeamAppDisplay;
- settings: PrisbeamSettings;
- search: PrisbeamSearch;
- actions: PrisbeamActions;
- ai: PrisbeamAI;
- loader: PrisbeamLoader;
- propertyStore: PrisbeamPropertyStore;
- derpibooru: PrisbeamDerpibooru;
+ display: FaunerieAppDisplay;
+ settings: FaunerieSettings;
+ search: FaunerieSearch;
+ actions: FaunerieActions;
+ ai: FaunerieAI;
+ loader: FaunerieLoader;
+ propertyStore: FauneriePropertyStore;
+ derpibooru: FaunerieDerpibooru;
constructor(bootstrap: any) {
this.bootstrap = bootstrap;
- this.dataStore = new PrisbeamDataStore(this);
- this.display = new PrisbeamAppDisplay(this);
- this.settings = new PrisbeamSettings(this);
- this.search = new PrisbeamSearch(this);
- this.actions = new PrisbeamActions(this);
- this.ai = new PrisbeamAI(this);
- this.loader = new PrisbeamLoader(this);
- this.derpibooru = new PrisbeamDerpibooru(this);
+ this.dataStore = new FaunerieDataStore(this);
+ this.display = new FaunerieAppDisplay(this);
+ this.settings = new FaunerieSettings(this);
+ this.search = new FaunerieSearch(this);
+ this.actions = new FaunerieActions(this);
+ this.ai = new FaunerieAI(this);
+ this.loader = new FaunerieLoader(this);
+ this.derpibooru = new FaunerieDerpibooru(this);
this.search.loadSearchModule();
}
@@ -48,7 +48,7 @@ export class PrisbeamApp {
this.dataStore.loaded = true;
this.dataStore.page = 1;
- this.dataStore.currentView = await this.dataStore.database.frontend.getAllImages(PrisbeamListType.Array) as any[];
+ this.dataStore.currentView = await this.dataStore.database.frontend.getAllImages(FaunerieListType.Array) as any[];
this.display.updateDisplay();
this.dataStore.loader.hide();
diff --git a/src/PrisbeamAppDisplay.ts b/src/FaunerieAppDisplay.ts
index e3a9ee6..66f592b 100755
--- a/src/PrisbeamAppDisplay.ts
+++ b/src/FaunerieAppDisplay.ts
@@ -1,13 +1,13 @@
-import {PrisbeamApp} from "./PrisbeamApp";
-import {PrisbeamImageType} from "libprisbeam";
+import {FaunerieApp} from "./FaunerieApp";
+import {FaunerieImageType} from "libfaunerie";
import * as fs from "node:fs";
-import {PrisbeamUtilities} from "./PrisbeamUtilities";
+import {FaunerieUtilities} from "./FaunerieUtilities";
import {shell} from "@electron/remote";
-export class PrisbeamAppDisplay {
- private instance: PrisbeamApp;
+export class FaunerieAppDisplay {
+ private instance: FaunerieApp;
- constructor(app: PrisbeamApp) {
+ constructor(app: FaunerieApp) {
this.instance = app;
}
@@ -37,7 +37,7 @@ export class PrisbeamAppDisplay {
getThumbnailHTML(i: any) {
if (i['representations']['thumb'].endsWith(".webm")) i['representations']['thumb'] = i['representations']['thumb'].substring(0, i['representations']['thumb'].length - 5) + ".gif";
- let thumbnail = this.instance.dataStore.database.frontend.getImageFile(i, PrisbeamImageType.ThumbnailURL);
+ let thumbnail = this.instance.dataStore.database.frontend.getImageFile(i, FaunerieImageType.ThumbnailURL);
// noinspection CssUnknownTarget
return `
@@ -174,15 +174,15 @@ export class PrisbeamAppDisplay {
if (_dataStore.searching) {
if (_dataStore.loadedFromCache) {
- document.title = "Searching for " + (document.getElementById("search") as HTMLInputElement).value.trim() + " (page " + _dataStore.page + "/" + totalPages + ") — Prisbeam (Cached)";
+ document.title = "Searching for " + (document.getElementById("search") as HTMLInputElement).value.trim() + " (page " + _dataStore.page + "/" + totalPages + ") — Faunerie (Cached)";
} else {
- document.title = "Searching for " + (document.getElementById("search") as HTMLInputElement).value.trim() + " (page " + _dataStore.page + "/" + totalPages + ") — Prisbeam";
+ document.title = "Searching for " + (document.getElementById("search") as HTMLInputElement).value.trim() + " (page " + _dataStore.page + "/" + totalPages + ") — Faunerie";
}
} else {
if (_dataStore.loadedFromCache) {
- document.title = "All images (page " + _dataStore.page + "/" + totalPages + ") — Prisbeam (Cached)";
+ document.title = "All images (page " + _dataStore.page + "/" + totalPages + ") — Faunerie (Cached)";
} else {
- document.title = "All images (page " + _dataStore.page + "/" + totalPages + ") — Prisbeam";
+ document.title = "All images (page " + _dataStore.page + "/" + totalPages + ") — Faunerie";
}
}
}
@@ -229,7 +229,7 @@ export class PrisbeamAppDisplay {
? "</span> (<span class='selectable'>" + _dataStore.currentImage.source_name + "</span>)"
: "") +
"" +
- PrisbeamUtilities.getMimeBadge(_dataStore.currentImage.mime_type)
+ FaunerieUtilities.getMimeBadge(_dataStore.currentImage.mime_type)
}
displayImageSize() {
@@ -237,28 +237,28 @@ export class PrisbeamAppDisplay {
let size = 0;
let sizeExplanation = [];
- let file = _dataStore.database.frontend.getImageFile(_dataStore.currentImage, PrisbeamImageType.ViewFile);
- let thumb = _dataStore.database.frontend.getImageFile(_dataStore.currentImage, PrisbeamImageType.ThumbnailFile);
+ let file = _dataStore.database.frontend.getImageFile(_dataStore.currentImage, FaunerieImageType.ViewFile);
+ let thumb = _dataStore.database.frontend.getImageFile(_dataStore.currentImage, FaunerieImageType.ThumbnailFile);
if (file) {
let cSize = fs.lstatSync(file).size;
size += cSize;
- sizeExplanation.push("Image: " + PrisbeamUtilities.formatSize(cSize));
+ sizeExplanation.push("Image: " + FaunerieUtilities.formatSize(cSize));
}
if (thumb) {
let cSize = fs.lstatSync(thumb).size;
size += cSize;
- sizeExplanation.push("Thumbnail: " + PrisbeamUtilities.formatSize(cSize));
+ sizeExplanation.push("Thumbnail: " + FaunerieUtilities.formatSize(cSize));
}
let cSize = JSON.stringify(_dataStore.currentImage).length;
size += cSize;
- sizeExplanation.push("Metadata: " + PrisbeamUtilities.formatSize(cSize));
+ sizeExplanation.push("Metadata: " + FaunerieUtilities.formatSize(cSize));
document.getElementById("preview-size").innerHTML =
"<span data-bs-toggle='tooltip' data-bs-html='true' title='" + sizeExplanation.join("<br>") + "'>" +
- PrisbeamUtilities.formatSize(size) + "</span>";
+ FaunerieUtilities.formatSize(size) + "</span>";
}
categorySortingNumber(cat: string) {
@@ -352,7 +352,7 @@ export class PrisbeamAppDisplay {
document.getElementById("preview-parts-list").style.display = "none";
document.title = "Viewing image #" + (_dataStore.currentImage.source_id ?? id) + " — " + document.title;
document.getElementById("preview-title").innerHTML = this.buildImageTitle();
- document.getElementById("preview-date").innerHTML = "Uploaded <span data-bs-toggle='tooltip' title='" + new Date(_dataStore.currentImage.created_at * 1000).toString() + "'>" + PrisbeamUtilities.timeAgo(_dataStore.currentImage.created_at * 1000) + "</span>";
+ document.getElementById("preview-date").innerHTML = "Uploaded <span data-bs-toggle='tooltip' title='" + new Date(_dataStore.currentImage.created_at * 1000).toString() + "'>" + FaunerieUtilities.timeAgo(_dataStore.currentImage.created_at * 1000) + "</span>";
document.getElementById("preview-resolution").innerText = _dataStore.currentImage.width + " × " + _dataStore.currentImage.height;
document.getElementById("preview-source-cta").innerText = "View on " + _dataStore.currentImage.source_name ?? "Derpibooru";
}
@@ -424,7 +424,7 @@ export class PrisbeamAppDisplay {
displayViewer() {
let _dataStore = this.instance.dataStore;
- let url = _dataStore.database.frontend.getImageFile(_dataStore.currentImage, PrisbeamImageType.ViewURL)
+ let url = _dataStore.database.frontend.getImageFile(_dataStore.currentImage, FaunerieImageType.ViewURL)
if (_dataStore.currentImage.mime_type.startsWith("video/")) {
document.getElementById("preview-content").innerHTML = `
diff --git a/src/PrisbeamDataStore.ts b/src/FaunerieDataStore.ts
index cf910f0..3506841 100755
--- a/src/PrisbeamDataStore.ts
+++ b/src/FaunerieDataStore.ts
@@ -1,14 +1,14 @@
-import {PrisbeamApp} from "./PrisbeamApp";
-import {Prisbeam} from "libprisbeam";
+import {FaunerieApp} from "./FaunerieApp";
+import {Faunerie} from "libfaunerie";
-export class PrisbeamDataStore {
+export class FaunerieDataStore {
public loaded: boolean;
public loadedFromCache: boolean;
public hadErrorsLoading: boolean;
public searching: boolean;
public source: string;
public appData: string;
- public database: Prisbeam;
+ public database: Faunerie;
public db: object;
public tags: any[][];
public tagsHashed: object;
@@ -26,7 +26,7 @@ export class PrisbeamDataStore {
public lastPress: number;
public close: boolean;
- constructor(instance: PrisbeamApp) {
+ constructor(instance: FaunerieApp) {
let bootstrap = instance.bootstrap;
this.page = 1;
diff --git a/src/PrisbeamDerpibooru.ts b/src/FaunerieDerpibooru.ts
index 0680f13..84252f9 100755
--- a/src/PrisbeamDerpibooru.ts
+++ b/src/FaunerieDerpibooru.ts
@@ -1,4 +1,4 @@
-import {PrisbeamApp} from "./PrisbeamApp";
+import {FaunerieApp} from "./FaunerieApp";
import {BrowserWindow, shell} from "@electron/remote";
import {BrowserWindow as TBrowserWindow, SafeStorage} from "electron";
@@ -18,13 +18,13 @@ interface DerpibooruJSDataStore {
watchedTagList: number[];
}
-export class PrisbeamDerpibooru {
- instance: PrisbeamApp;
+export class FaunerieDerpibooru {
+ instance: FaunerieApp;
enabled: boolean;
window: TBrowserWindow;
dataStore: DerpibooruJSDataStore;
- constructor(instance: PrisbeamApp) {
+ constructor(instance: FaunerieApp) {
this.instance = instance;
this.enabled = null;
}
@@ -186,7 +186,7 @@ export class PrisbeamDerpibooru {
}
async logOut() {
- if (confirm("Are you sure you want to log out from Derpibooru? Any features using Derpibooru will stop working and your Derpibooru user data will be removed from Prisbeam.")) {
+ if (confirm("Are you sure you want to log out from Derpibooru? Any features using Derpibooru will stop working and your Derpibooru user data will be removed from Faunerie.")) {
await this.instance.propertyStore.removeItem("pba_derpibooru_user_name");
await this.instance.propertyStore.removeItem("pba_derpibooru_key_encrypted");
await this.instance.propertyStore.removeItem("pba_derpibooru_avatar");
diff --git a/src/PrisbeamLoader.ts b/src/FaunerieLoader.ts
index 935b003..926ece6 100755
--- a/src/PrisbeamLoader.ts
+++ b/src/FaunerieLoader.ts
@@ -1,14 +1,14 @@
-import {PrisbeamApp} from "./PrisbeamApp";
+import {FaunerieApp} from "./FaunerieApp";
import {ipcRenderer} from "electron";
import * as si from "systeminformation";
import fs from "fs";
-import {Prisbeam, PrisbeamListType} from "libprisbeam";
+import {Faunerie, FaunerieListType} from "libfaunerie";
-export class PrisbeamLoader {
- instance: PrisbeamApp;
+export class FaunerieLoader {
+ instance: FaunerieApp;
dataPath: string;
- constructor(instance: PrisbeamApp) {
+ constructor(instance: FaunerieApp) {
this.instance = instance;
}
@@ -142,7 +142,7 @@ export class PrisbeamLoader {
let valid = false;
try {
- valid = (await fs.promises.lstat(_dataStore.appData + "/PrisbeamCache/current.pbdb")).isFile();
+ valid = (await fs.promises.lstat(_dataStore.appData + "/FaunerieCache/current.pbdb")).isFile();
} catch (e) {
valid = false;
}
@@ -150,7 +150,7 @@ export class PrisbeamLoader {
if (valid) {
this.instance.loadingError("No valid image source found, images will be downloaded from their source");
_dataStore.loadedFromCache = true;
- return _dataStore.appData + "/PrisbeamCache";
+ return _dataStore.appData + "/FaunerieCache";
} else {
alert("Unable to load images from cache as the cache is empty or corrupted.");
this.instance.dataStore.unloaded = true;
@@ -169,7 +169,7 @@ export class PrisbeamLoader {
if (validSources.length > 0) {
return this.openFirstSource(validSources);
} else {
- if (fs.existsSync(_dataStore.appData + "/PrisbeamCache")) {
+ if (fs.existsSync(_dataStore.appData + "/FaunerieCache")) {
return await this.loadFromCache();
} else {
await this.triggerInvalidSource(list);
@@ -205,7 +205,7 @@ export class PrisbeamLoader {
}
if (isUpdating) {
- alert("This database is locked because an external Prisbeam Updater is updating its content. Please try again later.");
+ alert("This database is locked because an external Faunerie Updater is updating its content. Please try again later.");
this.instance.dataStore.unloaded = true;
window.close();
}
@@ -215,7 +215,7 @@ export class PrisbeamLoader {
async initializeDatabase() {
let _dataStore = this.instance.dataStore;
- _dataStore.database = new Prisbeam({
+ _dataStore.database = new Faunerie({
database: this.dataPath,
cachePath: _dataStore.appData,
sqlitePath: process.platform === "darwin" ? "../../../sql/mac" : "../../../sql/win",
@@ -235,8 +235,8 @@ export class PrisbeamLoader {
document.getElementById("progress").classList.remove("progress-bar-striped");
document.getElementById("progress").style.width = "0%";
- if (!fs.existsSync(_dataStore.appData + "/PrisbeamCache")) await fs.promises.mkdir(_dataStore.appData + "/PrisbeamCache");
- await fs.promises.copyFile(this.dataPath + "/current.pbdb", _dataStore.appData + "/PrisbeamCache/current.pbdb");
+ if (!fs.existsSync(_dataStore.appData + "/FaunerieCache")) await fs.promises.mkdir(_dataStore.appData + "/FaunerieCache");
+ await fs.promises.copyFile(this.dataPath + "/current.pbdb", _dataStore.appData + "/FaunerieCache/current.pbdb");
document.getElementById("progress").style.width = "100%";
}
@@ -245,7 +245,7 @@ export class PrisbeamLoader {
async completeLoading() {
let _dataStore = this.instance.dataStore;
- _dataStore.db = await _dataStore.database.frontend.getAllImages(PrisbeamListType.Object);
+ _dataStore.db = await _dataStore.database.frontend.getAllImages(FaunerieListType.Object);
_dataStore.tags = _dataStore.database.frontend.tags;
_dataStore.tagsHashed = _dataStore.database.frontend.tagsHashed;
diff --git a/src/PrisbeamSearch.ts b/src/FaunerieSearch.ts
index 5e352d8..eb4db33 100755
--- a/src/PrisbeamSearch.ts
+++ b/src/FaunerieSearch.ts
@@ -1,10 +1,10 @@
-import {PrisbeamApp} from "./PrisbeamApp";
-import {PrisbeamListType} from "libprisbeam";
+import {FaunerieApp} from "./FaunerieApp";
+import {FaunerieListType} from "libfaunerie";
-export class PrisbeamSearch {
- instance: PrisbeamApp;
+export class FaunerieSearch {
+ instance: FaunerieApp;
- constructor(instance: PrisbeamApp) {
+ constructor(instance: FaunerieApp) {
this.instance = instance;
}
@@ -22,8 +22,8 @@ export class PrisbeamSearch {
document.getElementById("pages").style.display = "none";
document.getElementById("search-error").innerHTML = `
<p><b>${this.resolveError(e)}</b></p>
- <p>Prisbeam uses the same search query format as Derpibooru/Philomena. To make sure you make correct use of the search syntax, you can try to search for the same query on Derpibooru directly (if possible). Please keep in mind that fuzzy matching, boosting, escaping, the <code>faved_by</code> and <code>uploader</code> fields as well as the <code>my:hidden</code> are not supported.</code></p>
- <p>If you think something is wrong with Prisbeam, please send a bug report, so we can fix it.</p>
+ <p>Faunerie uses the same search query format as Derpibooru/Philomena. To make sure you make correct use of the search syntax, you can try to search for the same query on Derpibooru directly (if possible). Please keep in mind that fuzzy matching, boosting, escaping, the <code>faved_by</code> and <code>uploader</code> fields as well as the <code>my:hidden</code> are not supported.</code></p>
+ <p>If you think something is wrong with Faunerie, please send a bug report, so we can fix it.</p>
<hr>
<details>
<summary>Show technical information</summary>
@@ -38,7 +38,7 @@ export class PrisbeamSearch {
async displayAll() {
this.instance.dataStore.page = 1;
this.instance.dataStore.searching = false;
- this.instance.dataStore.currentView = await this.instance.dataStore.database.frontend.getAllImages(PrisbeamListType.Array) as any[];
+ this.instance.dataStore.currentView = await this.instance.dataStore.database.frontend.getAllImages(FaunerieListType.Array) as any[];
this.instance.display.updateDisplay();
}
diff --git a/src/PrisbeamSettings.ts b/src/FaunerieSettings.ts
index 7ec0b2b..74919ae 100755
--- a/src/PrisbeamSettings.ts
+++ b/src/FaunerieSettings.ts
@@ -1,12 +1,12 @@
-import {PrisbeamApp} from "./PrisbeamApp";
+import {FaunerieApp} from "./FaunerieApp";
import * as fs from "node:fs";
import * as path from "node:path";
-import {PrisbeamImageType, PrisbeamListType} from "libprisbeam";
+import {FaunerieImageType, FaunerieListType} from "libfaunerie";
-export class PrisbeamSettings {
- instance: PrisbeamApp;
+export class FaunerieSettings {
+ instance: FaunerieApp;
- constructor(instance: PrisbeamApp) {
+ constructor(instance: FaunerieApp) {
this.instance = instance;
}
@@ -176,7 +176,7 @@ export class PrisbeamSettings {
instance.loadingError("Image " + i.id + " is corrupted");
res(true);
}
- img.src = _dataStore.database.frontend.getImageFile(i, PrisbeamImageType.ViewURL);
+ img.src = _dataStore.database.frontend.getImageFile(i, FaunerieImageType.ViewURL);
}
let imageIsCorrupted: Function;
@@ -192,7 +192,7 @@ export class PrisbeamSettings {
instance.loadingError("Image " + i.id + " is corrupted");
res(true);
}
- img.src = _dataStore.database.frontend.getImageFile(i, PrisbeamImageType.ThumbnailURL);
+ img.src = _dataStore.database.frontend.getImageFile(i, FaunerieImageType.ThumbnailURL);
});
}
@@ -246,7 +246,7 @@ export class PrisbeamSettings {
document.getElementById("progress").style.width = "0%";
- for (let image of await _dataStore.database.frontend.getAllImages(PrisbeamListType.Array) as any[]) {
+ for (let image of await _dataStore.database.frontend.getAllImages(FaunerieListType.Array) as any[]) {
document.getElementById("load").innerText = "Checking for corrupted images... " + Math.round(((index / total) * 100)) + "% (" + image.id + ")";
if (await this.checkImageForCorruptions(image)) {
corrupted.push(image);
diff --git a/src/PrisbeamUtilities.ts b/src/FaunerieUtilities.ts
index 455a4d7..1c84300 100755
--- a/src/PrisbeamUtilities.ts
+++ b/src/FaunerieUtilities.ts
@@ -1,4 +1,4 @@
-export class PrisbeamUtilities {
+export class FaunerieUtilities {
static timeAgo(time: number | Date | string) {
if (!isNaN(parseInt(time as string))) {
time = new Date(time).getTime();
diff --git a/src/PrisbeamActions.ts b/src/PrisbeamActions.ts
deleted file mode 100755
index 06e69fe..0000000
--- a/src/PrisbeamActions.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import {PrisbeamApp} from "./PrisbeamApp";
-
-export class PrisbeamActions {
- instance: PrisbeamApp;
-
- constructor(instance: PrisbeamApp) {
- this.instance = instance;
- }
-
- goHome() {
- this.instance.search.startTagSearch("");
- }
-}
diff --git a/src/index.ts b/src/index.ts
index f6d526f..5413d83 100755
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,5 +1,5 @@
import {ipcRenderer} from "electron";
-import {PrisbeamApp} from "./PrisbeamApp";
+import {FaunerieApp} from "./FaunerieApp";
let loaded = false;
@@ -10,7 +10,7 @@ window.onload = () => {
// noinspection JSUnusedGlobalSymbols
export function runApp(bootstrap: any) {
ipcRenderer.on('path', (_, appDataPath) => {
- let instance = window['instance'] = new PrisbeamApp(bootstrap);
+ let instance = window['instance'] = new FaunerieApp(bootstrap);
instance.dataStore.appData = appDataPath;
let loadInterval = setInterval(() => {