show existing image on update playlist modal

+ some modal cleanup
This commit is contained in:
geoffrey45
2022-09-15 17:09:20 +03:00
parent 94eb198e47
commit 65cd2213fa
7 changed files with 22 additions and 20 deletions
+6 -7
View File
@@ -1,3 +1,6 @@
// "local" | "remote"
let mode = "remote";
export interface D<T = string> {
[key: string]: T;
}
@@ -19,19 +22,15 @@ const imageRoutes = {
raw: "/raw/",
};
let mode: string = "remote";
function toggleMode() {
mode = mode === "local" ? "remote" : "local";
}
function getDomain() {
return domains[mode];
}
const domain = () => domains[mode];
const baseImgUrl = getDomain() + ports.images;
const baseImgUrl = domain() + ports.images;
const baseApiUrl = getDomain() + ports.api;
const baseApiUrl = domain() + ports.api;
const paths = {
api: {