diff --git a/src/interface/pages/settings/general.svelte b/src/interface/pages/settings/general.svelte
index da8ccd76..e16c793d 100644
--- a/src/interface/pages/settings/general.svelte
+++ b/src/interface/pages/settings/general.svelte
@@ -115,7 +115,7 @@
{#each [
{
title: "Connect Mobile App",
- description: "Link your SEQTA session to DesQTA — the modern desktop and mobile app for SEQTA Learn. Scan the QR code with DesQTA to sign in instantly.",
+ description: "Link your SEQTA session to DesQTA — the modern desktop and mobile app for SEQTA Learn.",
id: 0,
Component: ConnectMobileApp,
props: {}
@@ -225,7 +225,7 @@
{@render Setting(option)}
{/each}
-
+
Adaptive Theme Colour
diff --git a/src/interface/utils/portal.ts b/src/interface/utils/portal.ts
new file mode 100644
index 00000000..d634d3be
--- /dev/null
+++ b/src/interface/utils/portal.ts
@@ -0,0 +1,22 @@
+import type { Action } from "svelte/action";
+
+/**
+ * Svelte action that moves the element to a different DOM target.
+ * Defaults to the nearest ShadowRoot so styles remain intact when the app
+ * is rendered inside a shadow DOM. Falls back to document.body otherwise.
+ * Keeps all Svelte reactivity/events intact while escaping ancestor stacking contexts.
+ */
+export const portal: Action = (node, target) => {
+ const root = node.getRootNode();
+ const dest = target ?? (root instanceof ShadowRoot ? root : document.body);
+ dest.appendChild(node);
+
+ return {
+ update(newTarget) {
+ (newTarget ?? dest).appendChild(node);
+ },
+ destroy() {
+ node.remove();
+ },
+ };
+};