Add ts to link setting dependance

Also make store each setting as classes in a settings object, to make it
easier to serialize on submitting. Also, added
"substitute_jellyfin_strings", "no_username" and welcome_email.
This commit is contained in:
Harvey Tindall
2021-01-26 22:57:29 +00:00
parent bf1e6230dc
commit 8c871bc5fa
9 changed files with 380 additions and 306 deletions
+2 -1
View File
@@ -51,7 +51,8 @@ export const rmAttr = (el: HTMLElement, attr: string): void => {
export const addAttr = (el: HTMLElement, attr: string): void => el.classList.add(attr);
export const _get = (url: string, data: Object, onreadystatechange: (req: XMLHttpRequest) => void): void => {
let req = new XMLHttpRequest();
req.open("GET", window.URLBase + url, true);
if (window.URLBase) { url = window.URLBase + url; }
req.open("GET", url, true);
req.responseType = 'json';
req.setRequestHeader("Authorization", "Bearer " + window.token);
req.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');