add local copy of w3.css fallback,

change how the dashboard and api is proxied
This commit is contained in:
2023-10-12 17:27:37 +00:00
parent 9705470798
commit 72db810ef0
10 changed files with 246 additions and 15 deletions

View File

@@ -7,6 +7,7 @@ class InstanceCard extends HTMLElement {
super();
this.attachShadow({ mode: "open" });
this.shadowRoot.innerHTML = `
<link rel="stylesheet" href="w3.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="css/style.css">
<style>

View File

@@ -231,18 +231,9 @@ async function request (url, content) {
}
}
export function goToPage (page, data = {}, newwindow = false) {
const url = new URL(`https://${window.location.host}/${page}`);
for (const k in data) {
url.searchParams.append(k, data[k]);
}
if (newwindow) {
window.open(url, `${organization} - dashboard`, "height=480,width=848");
}
else {
window.location.assign(url.toString());
}
export function goToPage (page, data = null) {
const params = data ? (new URLSearchParams(data)).toString() : "";
window.location.href = `${page}${data ? "?" : ""}${params}`;
}
export function goToURL (href, data = {}, newwindow = false) {