diff --git a/public/marketplace/atom-one-dark/logo.png b/public/marketplace/atom-one-dark/logo.png new file mode 100644 index 0000000..63a589c Binary files /dev/null and b/public/marketplace/atom-one-dark/logo.png differ diff --git a/public/marketplace/atom-one-dark/theme.css b/public/marketplace/atom-one-dark/theme.css new file mode 100644 index 0000000..34bfa53 --- /dev/null +++ b/public/marketplace/atom-one-dark/theme.css @@ -0,0 +1,9 @@ +[data-theme="atom-one-dark"] { + --background-color: #1e2127; + --background-highlight: #434952; + --accent-color: #3a3f4b; + --accent-color-brighter: #4b515f; + --text-color: #abb2bf; + --text-color-accent: #989eaa; + --dropdown-background-color: #30353f; +} \ No newline at end of file diff --git a/public/marketplace/synthwave84/logo.png b/public/marketplace/synthwave84/logo.png new file mode 100644 index 0000000..f4cd631 Binary files /dev/null and b/public/marketplace/synthwave84/logo.png differ diff --git a/public/marketplace/synthwave84/theme.css b/public/marketplace/synthwave84/theme.css new file mode 100644 index 0000000..8607d03 --- /dev/null +++ b/public/marketplace/synthwave84/theme.css @@ -0,0 +1,9 @@ +[data-theme="synthwave84"] { + --background-color: #2a203a; + --background-highlight: #2e2342; + --accent-color: #1e1629; + --accent-color-brighter: #3e2e53; + --text-color: #c0bdc4; + --text-color-accent: #dddddd; + --dropdown-background-color: #231a30; +} \ No newline at end of file diff --git a/src/components/ProxyRegistrar.astro b/src/components/ProxyRegistrar.astro index 53e5b9d..0f0da1b 100644 --- a/src/components/ProxyRegistrar.astro +++ b/src/components/ProxyRegistrar.astro @@ -2,7 +2,6 @@ import { TransportMgr, initTransport } from "./ts/TransportManager"; import "notyf/notyf.min.css"; import { Notyf } from "notyf"; - import { loadIDB, GetStore, ValidateStoreExists, CreateStore } from "./ts/IDBManager"; const form = document.querySelector("form"); let input = document.querySelector("input"); @@ -52,46 +51,8 @@ return window.__uv$config.decodeUrl(frame.contentWindow!.location.href.split("/service/")[1]); } - async function loadPageExtensions() { - try { - const iframe = document.getElementById("proxy-frame") as HTMLIFrameElement; - if (!ValidateStoreExists("InstalledExtensions")) { - CreateStore("InstalledExtensions", { keyPath: "slug" }); - } - const db = loadIDB("AluDB", 1); - db.onsuccess = () => { - const store = GetStore("InstalledExtensions", "readonly"); - const request = store.getAll(); - request.onsuccess = () => { - const extensions = request.result; - extensions.forEach((extension: IExtensionMetadata) => { - // Eval the extension script inside of the iframe - if (!(extension.type == "page")) return; - if (extension.pages && extension.pages.length > 0) { - // Check if the current URL matches the extension's URL - extension.pages.forEach((url) => { - console.log(url); - console.log(iframe.contentWindow!.__uv$location.host); - if (iframe.contentWindow!.__uv$location.host.includes(url)) { - const script = extension.script; - const scriptElement = document.createElement("script"); - scriptElement.src = script; - scriptElement.type = "module"; - iframe.contentDocument!.head.appendChild(scriptElement); - } - }); - } - }); - }; - }; - } catch (err) { - console.error(`Failed load extension scripts: ${err}`); - } - } - async function loadContent(): Promise { await initTransport(); - await loadPageExtensions(); // The setTimeout is because service workers are a little silly and can take a while longer to register despite .then being called, which causes a bug on the first load. setTimeout(async () => { const openWith = Alu.store.get("openpage"); @@ -285,7 +246,6 @@ const UVURL = getUVProxyURL(iframe); if (proxiedFavicon.src == `${window.location.origin}/custom-favicon?url=${UVURL}`) return; proxiedFavicon.src = `/custom-favicon?url=${UVURL}`; - loadPageExtensions(); } } } diff --git a/src/json/marketplace.json b/src/json/marketplace.json index 628f77e..1e7d630 100644 --- a/src/json/marketplace.json +++ b/src/json/marketplace.json @@ -12,7 +12,7 @@ "dev.wearr.oled-theme": { "title": "OLED Theme", "description": "A beautiful OLED theme for Alu.", - "version": "0.0.1", + "version": "0.1.0", "image": "/marketplace/oled-theme/theme.png", "script": "/marketplace/oled-theme/theme.css", "type": "theme", @@ -21,7 +21,7 @@ "dev.wearr.dracula-theme": { "title": "Dracula Theme", "description": "A port of the Dracula theme for Alu.", - "version": "0.0.1", + "version": "1.0.0", "image": "/marketplace/dracula-theme/logo.svg", "script": "/marketplace/dracula-theme/theme.css", "type": "theme", @@ -30,10 +30,28 @@ "dev.wearr.nord-theme": { "title": "Nord Theme", "description": "A port of the Nord theme for Alu.", - "version": "0.0.1", + "version": "1.0.0", "image": "/marketplace/nord-theme/logo.png", "script": "/marketplace/nord-theme/theme.css", "type": "theme", "themeName": "nord" + }, + "dev.wearr.synthwave84": { + "title": "Synthwave '84", + "description": "A port of the Synthwave '84 theme for Alu.", + "version": "1.0.0", + "image": "/marketplace/synthwave84/logo.png", + "script": "/marketplace/synthwave84/theme.css", + "type": "theme", + "themeName": "synthwave84" + }, + "dev.wearr.atom-one-dark": { + "title": "Atom One Dark", + "description": "A port of the Atom One Dark theme for Alu.", + "version": "1.0.0", + "image": "/marketplace/atom-one-dark/logo.png", + "script": "/marketplace/atom-one-dark/theme.css", + "type": "theme", + "themeName": "atom-one-dark" } }