diff --git a/package.json b/package.json index 68c820a12..a9e2ac4c2 100755 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "@types/node": "^22.10.5", "@types/sql.js": "^1.4.9", "@types/string-width": "^4.0.1", + "@types/ua-parser-js": "^0.7.39", "@types/validator": "^13.12.2", "@xterm/addon-clipboard": "^0.1.0", "@xterm/addon-fit": "^0.10.0", @@ -84,7 +85,7 @@ "svelte-image-viewer": "^7.1.0", "svelte-markdown": "^0.4.1", "svelte-splitpanes": "^8.0.9", - "ua-parser-js": "^2.0.3", + "ua-parser-js": "1.0.41", "validator": "^13.12.0", "vite-plugin-no-bundle": "^4.0.0", "xterm": "^5.3.0", diff --git a/src/apps/admin/mailbrokermanagerapp/Pages/Sent.svelte b/src/apps/admin/mailbrokermanagerapp/Pages/Sent.svelte index 42606a4d9..ac4dc1763 100644 --- a/src/apps/admin/mailbrokermanagerapp/Pages/Sent.svelte +++ b/src/apps/admin/mailbrokermanagerapp/Pages/Sent.svelte @@ -49,7 +49,7 @@
- {#each filteredSent as sentRecord (sentRecord._id)} + {#each filteredSent.toReversed() as sentRecord (sentRecord._id)} {/each} diff --git a/src/apps/components/messagecomposer/MessageComposer.svelte b/src/apps/components/messagecomposer/MessageComposer.svelte index 13c5b6764..ef1cbdc16 100755 --- a/src/apps/components/messagecomposer/MessageComposer.svelte +++ b/src/apps/components/messagecomposer/MessageComposer.svelte @@ -1,20 +1,29 @@ +
- + {#if $showPreview} +
+ +
+ {:else} + + {/if}
- + diff --git a/src/apps/components/messagecomposer/MessageComposer.ts b/src/apps/components/messagecomposer/MessageComposer.ts index a4b8d29db..9109b8013 100644 --- a/src/apps/components/messagecomposer/MessageComposer.ts +++ b/src/apps/components/messagecomposer/MessageComposer.ts @@ -12,8 +12,8 @@ export const MessageComposerApp: App = { appGroup: "multimedia", }, position: { centered: true }, - size: { w: 550, h: 450 }, - minSize: { w: 550, h: 450 }, + size: { w: 800, h: 650 }, + minSize: { w: 800, h: 650 }, maxSize: { w: NaN, h: NaN }, state: { maximized: false, diff --git a/src/apps/components/messagecomposer/MessageComposer/MessageActions.svelte b/src/apps/components/messagecomposer/MessageComposer/MessageActions.svelte new file mode 100755 index 000000000..3016607df --- /dev/null +++ b/src/apps/components/messagecomposer/MessageComposer/MessageActions.svelte @@ -0,0 +1,27 @@ + + + + {#snippet leftContent()} + process.addAttachment()}> + Attach... + + + {/snippet} + {#snippet rightContent()} + + ($showPreview = true)} icon="eye"> + ($showPreview = false)} icon="code-xml"> + + {/snippet} + diff --git a/src/apps/components/messagecomposer/MessageComposer/ActionBar.svelte b/src/apps/components/messagecomposer/MessageComposer/StatusBar.svelte old mode 100755 new mode 100644 similarity index 58% rename from src/apps/components/messagecomposer/MessageComposer/ActionBar.svelte rename to src/apps/components/messagecomposer/MessageComposer/StatusBar.svelte index 6beb47617..bb6b0b511 --- a/src/apps/components/messagecomposer/MessageComposer/ActionBar.svelte +++ b/src/apps/components/messagecomposer/MessageComposer/StatusBar.svelte @@ -3,22 +3,19 @@ import ActionBar from "$lib/Window/ActionBar.svelte"; import ActionButton from "$lib/Window/ActionBar/ActionButton.svelte"; import IconActionButton from "$lib/Window/ActionBar/ActionIconButton.svelte"; - import Pill from "$lib/Window/ActionBar/ActionPill.svelte"; - import Separator from "$lib/Window/ActionBar/ActionSeparator.svelte"; + import ActionPill from "$lib/Window/ActionBar/ActionPill.svelte"; import { formatBytes } from "$ts/util/fs"; - const { process }: { process: IMessageComposerRuntime } = $props(); - const { title, body, recipients, sending, attachments } = process; + let { process }: { process: IMessageComposerRuntime } = $props(); + const { body, attachments, sending, title, recipients } = process; {#snippet leftContent()} - {formatBytes($body.length)} - {formatBytes($attachments.map((a) => a.data.size).reduce((a, b) => a + b, 0))} + {formatBytes($body.length)} + {formatBytes($attachments.map((a) => a.data.size).reduce((a, b) => a + b, 0))} {/snippet} {#snippet rightContent()} - process.addAttachment()} /> - (false); recipients = Store([]); attachments = Store([]); + showPreview = Store(false); title = Store(""); body = Store(""); replyId: string | undefined; @@ -201,6 +202,13 @@ export class MessageComposerRuntime extends AppProcess implements IMessageCompos this.attachments.update((v) => v.filter((a) => a.uuid !== uuid)); } + //#endregion + //#region SIGNATURES + + addSignature() { + // stub + } + //#endregion //#region MISC diff --git a/src/apps/components/processinfo/ProcessInfo.svelte b/src/apps/components/processinfo/ProcessInfo.svelte index f02359eb6..d670014db 100644 --- a/src/apps/components/processinfo/ProcessInfo.svelte +++ b/src/apps/components/processinfo/ProcessInfo.svelte @@ -59,6 +59,9 @@ {proc.sourceUrl || import.meta.url} {proc.sourceUrl ? "Original" : "Interpreted"} + {#if !ProcessesHelper.IsAnyAppProcess(proc)} + {proc.constructor.name || "-"} + {/if} {#if ProcessesHelper.IsAnyAppProcess(proc)} @@ -66,7 +69,7 @@ {proc.app.id} {proc.app.data.originId} - {proc.app.desktop || "-"} + {proc.constructor.name || "-"} {/if} diff --git a/src/apps/components/shell/Shell/Taskbar/ActionCenterButton.svelte b/src/apps/components/shell/Shell/Taskbar/ActionCenterButton.svelte index ceacb54bb..badc90d85 100755 --- a/src/apps/components/shell/Shell/Taskbar/ActionCenterButton.svelte +++ b/src/apps/components/shell/Shell/Taskbar/ActionCenterButton.svelte @@ -10,7 +10,7 @@ -
- {#if syntaxError} - - Syntax error in query! - {:else} - - Query is valid. - {/if} -
-
- - - -
- -
- {#if $currentTab === "result"} - - {:else if $currentTab === "errors"} - - {:else if $currentTab === "history"} - - {/if} -
-
-
- +
+ +
+ +
+ +
+ {#if syntaxError} + + Syntax error in query! + {:else} + + Query is valid. + {/if} +
+
+ + +
+ +
+ {#if $currentTab === "result"} + + {:else if $currentTab === "errors"} + + {:else if $currentTab === "history"} + + {/if}
- - +
+
{:else} diff --git a/src/apps/user/sqeleton/Sqeleton/Intro.svelte b/src/apps/user/sqeleton/Sqeleton/Intro.svelte index fed299556..fc15d1351 100644 --- a/src/apps/user/sqeleton/Sqeleton/Intro.svelte +++ b/src/apps/user/sqeleton/Sqeleton/Intro.svelte @@ -18,11 +18,11 @@

SQLite editor for ArcOS

- - diff --git a/src/apps/user/sqeleton/Sqeleton/OpenedEditors.svelte b/src/apps/user/sqeleton/Sqeleton/OpenedEditors.svelte new file mode 100644 index 000000000..bb19fe3fc --- /dev/null +++ b/src/apps/user/sqeleton/Sqeleton/OpenedEditors.svelte @@ -0,0 +1,13 @@ + + +
+ {#each $queries as query, i (query.id)} + + {/each} +
diff --git a/src/apps/user/sqeleton/Sqeleton/OpenedEditors/Query.svelte b/src/apps/user/sqeleton/Sqeleton/OpenedEditors/Query.svelte new file mode 100644 index 000000000..20118a3b0 --- /dev/null +++ b/src/apps/user/sqeleton/Sqeleton/OpenedEditors/Query.svelte @@ -0,0 +1,36 @@ + + + diff --git a/src/apps/user/sqeleton/Sqeleton/Sidebar.svelte b/src/apps/user/sqeleton/Sqeleton/Sidebar.svelte index 47f85d194..a8513f6c5 100644 --- a/src/apps/user/sqeleton/Sqeleton/Sidebar.svelte +++ b/src/apps/user/sqeleton/Sqeleton/Sidebar.svelte @@ -1,6 +1,5 @@ - -{#if $queries.length} -
- - -

- Queries - -

-
- {#each $queries as query, i (`${i}-${query}-${UUID()}`)} -
- - -
- {/each} -
-{/if} diff --git a/src/apps/user/sqeleton/Sqeleton/Sidebar/Tables.svelte b/src/apps/user/sqeleton/Sqeleton/Sidebar/Tables.svelte index fd04d39f4..45016c1b3 100644 --- a/src/apps/user/sqeleton/Sqeleton/Sidebar/Tables.svelte +++ b/src/apps/user/sqeleton/Sqeleton/Sidebar/Tables.svelte @@ -15,7 +15,7 @@ class="lucide icon-rotate-cw" aria-label="Refresh tables" title="Refresh tables" - onclick={() => process.updateTables()} + onclick={() => process.updateTableList()} > diff --git a/src/apps/user/sqeleton/Sqeleton/Sidebar/Tables/Table.svelte b/src/apps/user/sqeleton/Sqeleton/Sidebar/Tables/Table.svelte index cb19b54bd..c3c989fa1 100644 --- a/src/apps/user/sqeleton/Sqeleton/Sidebar/Tables/Table.svelte +++ b/src/apps/user/sqeleton/Sqeleton/Sidebar/Tables/Table.svelte @@ -8,20 +8,20 @@ - {/if} -

+

{title}

{@render children()}

diff --git a/src/lib/Window/ActionBar.svelte b/src/lib/Window/ActionBar.svelte index 359bcb36f..3014e5dfe 100644 --- a/src/lib/Window/ActionBar.svelte +++ b/src/lib/Window/ActionBar.svelte @@ -1,15 +1,18 @@ -
+
{#if leftContent} {@render leftContent()} diff --git a/src/ts/apps/process.ts b/src/ts/apps/process.ts index 7fb75a15d..373f2fdda 100755 --- a/src/ts/apps/process.ts +++ b/src/ts/apps/process.ts @@ -25,7 +25,8 @@ import { import { Sleep } from "../sleep"; import { Store } from "../writable"; import { AppRuntimeError } from "./error"; -export const bannedKeys = ["tab", "pagedown", "pageup"]; + +export const KEY_IGNORE_LIST = ["tab", "pagedown", "pageup"]; export class AppProcess extends Process implements IAppProcess { crashReason = ""; @@ -89,9 +90,7 @@ export class AppProcess extends Process implements IAppProcess { if (this.pid === pid) this.windowFullscreen.set(true); }); - const preferences = this.userPreferences(); - - if (!preferences.appPreferences[app.id]) { + if (!this.userPreferences().appPreferences[app.id]) { this.userPreferences.update((v) => { v.appPreferences[app.id] = {}; @@ -123,8 +122,6 @@ export class AppProcess extends Process implements IAppProcess { async closeWindow(kill = true) { this.Log(`Closing window ${this.pid}`); - // Stack.renderer?.focusedPid.set(this.pid); - const canClose = this._disposed || (this.onClose ? await this.onClose() : true); if (!canClose) { @@ -169,7 +166,7 @@ export class AppProcess extends Process implements IAppProcess { async __render__(body: HTMLDivElement) { this.STATE = "rendering"; - this.startAcceleratorListener(); + this.startKeyboardShortcutListener(); if (this.userPreferences().disabledApps.includes(this.app.id)) { if (this.safeMode) { @@ -219,22 +216,15 @@ export class AppProcess extends Process implements IAppProcess { async CrashDetection() { while (true) { - if (this.crashReason) { - throw new AppRuntimeError(this.crashReason); - } - - if (this._disposed) { - break; - } + if (this.crashReason) throw new AppRuntimeError(this.crashReason); + if (this._disposed) break; await Sleep(1); // prevent hanging bleh } } getSingleton(): this[] { - const { renderer } = Stack; - - return (renderer?.getAppInstances(this.app.data.id, this.pid) || []) as this[]; + return (Stack.renderer?.getAppInstances(this.app.data.id, this.pid) || []) as this[]; } async closeIfSecondInstance(): Promise { @@ -243,19 +233,18 @@ export class AppProcess extends Process implements IAppProcess { "Violation: only call closeIfSecondInstance in IAppProcess.render so that it doesn't hang the stack." ); } + this.Log("Closing if second instance"); const instances = this.getSingleton(); + if (!instances.length) return undefined; - if (instances.length) { - await this.killSelf(); - - if (!this.app.data.core) Stack.renderer?.focusPid(instances[0].pid); + await this.killSelf(); - if (instances[0].app.desktop) Daemon?.workspaces?.switchToDesktopByUuid(instances[0].app.desktop); - } + if (!this.app.data.core) Stack.renderer?.focusPid(instances[0].pid); + if (instances[0].app.desktop) Daemon?.workspaces?.switchToDesktopByUuid(instances[0].app.desktop); - return instances.length ? instances[0] : undefined; + return instances[0]; } getWindow() { @@ -263,9 +252,7 @@ export class AppProcess extends Process implements IAppProcess { throw new AppRuntimeError("Violation: Called getWindow during process startup: there's no window at this point."); } - const window = document.querySelector(`div.window[data-pid="${this.pid}"]`); - - return (window as HTMLDivElement) || undefined; + return document.querySelector(`div.window[data-pid="${this.pid}"]`)!; } getBody() { @@ -273,52 +260,41 @@ export class AppProcess extends Process implements IAppProcess { throw new AppRuntimeError("Violation: Called getBody during process startup: there's no window body at this point."); } - const body = document.querySelector(`div.window[data-pid="${this.pid}"] > div.body`); - - return (body as HTMLDivElement) || undefined; + return document.querySelector(`div.window[data-pid="${this.pid}"] > div.body`)!; } hasOverlays(): boolean { - const window = this.getWindow(); - - if (!window) return false; - - return window.querySelectorAll("div.window-overlay-wrapper").length > 0; + return !!this.getWindow()?.querySelectorAll("div.window-overlay-wrapper")?.length; } - public startAcceleratorListener() { - this.Log("Starting listener!"); + public startKeyboardShortcutListener() { + this.Log("Starting keyboard shortcut listener!"); - document.addEventListener("keydown", (e) => this.processor(e)); + document.addEventListener("keydown", (e) => this.processKeyboardEvent(e)); } - public stopAcceleratorListener() { - this.Log("Stopping listener!", LogLevel.warning); + public stopKeyboardShortcutListener() { + this.Log("Stopping keyboard shortcut listener!", LogLevel.warning); - document.removeEventListener("keydown", (e) => this.processor(e)); + document.removeEventListener("keydown", (e) => this.processKeyboardEvent(e)); } public async __stop(): Promise { this.Log(`STOPPING PROCESS`); - this.stopAcceleratorListener(); + this.stopKeyboardShortcutListener(); this.shell?.trayHost?.disposeProcessTrayIcons(this.pid); return await this.stop(); } - private async processor(e: KeyboardEvent) { + private async processKeyboardEvent(e: KeyboardEvent) { if (!e.key || this.hasOverlays() || this._disposed) return; - let focusingTextArea = false; - - const textareas = this.getWindow()?.querySelectorAll("textarea, [contenteditable]"); - - for (const textarea of textareas || []) { - if (document.activeElement === textarea) focusingTextArea = true; - } + const textareas = [...(this.getWindow()?.querySelectorAll("textarea, [contenteditable]") ?? [])]; + const focusingTextArea = !!textareas.find((element) => document.activeElement === element); - if (!focusingTextArea && bannedKeys.includes(e.key.toLowerCase()) && State?.currentState === "desktop") { + if (!focusingTextArea && KEY_IGNORE_LIST.includes(e.key.toLowerCase()) && State?.currentState === "desktop") { e.preventDefault(); return false; @@ -326,33 +302,32 @@ export class AppProcess extends Process implements IAppProcess { this.unfocusActiveElement(); - const state = State?.currentState; - - if (state != "desktop" || this._disposed) return; + if (State?.currentState != "desktop" || this._disposed) return; const combo = this.acceleratorStore.find((combo) => { - const ctrl = combo.ctrl ? e.ctrlKey : e.ctrlKey === false; - const shift = combo.shift ? e.shiftKey : e.shiftKey === false; - const alt = combo.alt ? e.altKey : e.altKey === false; + const ctrlKey = combo.ctrl ? e.ctrlKey : true; + const shiftKey = combo.shift ? e.shiftKey : true; + const altKey = combo.alt ? e.altKey : true; + const modifiersConditionMet = altKey && ctrlKey && shiftKey; + const focusConditionMet = Stack.renderer?.focusedPid() === this.pid || combo.global; const comboKey = combo.key?.trim().toLowerCase(); - const pressedKey = e.key.toLowerCase().trim(); - const codedKey = e.code.toLowerCase(); + const pressedKey = String.fromCharCode(e.keyCode).toLowerCase().trim(); - if (!ctrl || !shift || !alt || (pressedKey != comboKey && codedKey != comboKey)) return false; - return true; + return modifiersConditionMet && comboKey === pressedKey && focusConditionMet; }); - const isFocused = Stack.renderer?.focusedPid() == this.pid || combo?.global; - - if (!combo || !isFocused) return; + if (combo && !Daemon.elevation?._elevating) { + e.preventDefault(); + e.stopImmediatePropagation(); + e.stopPropagation(); - if (!Daemon?.elevation!._elevating) await combo.action(this, e); + await combo.action(this, e); + } } public unfocusActiveElement() { const el = document.activeElement as HTMLButtonElement; - if (!el || el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement || el.isContentEditable) return; el.blur(); diff --git a/src/ts/apps/store.ts b/src/ts/apps/store.ts index e34d77b4c..a2f9870d9 100755 --- a/src/ts/apps/store.ts +++ b/src/ts/apps/store.ts @@ -42,7 +42,6 @@ export const BuiltinAppImportPathAbsolutes = import.meta.glob([ "$apps/components/arctermcolors/ArcTermColors", "$apps/components/masteroptions/MasterOptions", "$apps/components/sendbetafeedback/SendBetaFeedbackApp", - "$apps/components/pswdresetwizard/PswdResetWizardApp", "$apps/user/advsystemsettings/AdvSystemSettings", "$apps/user/appstore/AppStore", "$apps/user/arcterm/ArcTerm", diff --git a/src/ts/kernel/init.ts b/src/ts/kernel/init.ts index df61a1021..51c46c683 100755 --- a/src/ts/kernel/init.ts +++ b/src/ts/kernel/init.ts @@ -7,6 +7,7 @@ import { ArcBuild } from "$ts/metadata/build"; import { ArcMode } from "$ts/metadata/mode"; import { States } from "$ts/state/store"; import { textToBlob } from "$ts/util/convert"; +import { UAParser } from "ua-parser-js"; import { StateHandler } from "../state"; import { Process } from "./mods/stack/process/instance"; @@ -26,6 +27,7 @@ export class InitProcess extends Process { async jumpstart() { __Console__.time("** Init jumpstart"); this.Log("Jumpstarting init process!"); + this.parseBrowserInfo(); await Stack.startRenderer(this.pid); @@ -72,4 +74,13 @@ export class InitProcess extends Process { document.title = `NIGHTLY - ArcOS v${ArcOSVersion}-${ArcMode()}_${ArcBuild()}`; Env.set(`NIGHTLY_WHODIS_${ArcBuild()}`, 1); } + + parseBrowserInfo() { + const ua = UAParser(navigator.userAgent); + + document.body.classList.add( + `browser-${ua.browser?.name ?? "unknown"}`.toLowerCase().replaceAll(/[ _\+()]/g,"-"), + `host-${ua.os?.name ?? "unknown"}`.toLowerCase().replaceAll(/[ _\+()]/g,"-") + ); + } } diff --git a/src/ts/servicehost/services/GlobalDispatch/index.ts b/src/ts/servicehost/services/GlobalDispatch/index.ts index d89e45ea1..89e21895e 100644 --- a/src/ts/servicehost/services/GlobalDispatch/index.ts +++ b/src/ts/servicehost/services/GlobalDispatch/index.ts @@ -6,9 +6,10 @@ import type { IGlobalDispatch } from "$interfaces/services/IGlobalDispatch"; import { Daemon, Env, getKMod, Stack } from "$ts/env"; import { BaseService } from "$ts/servicehost/base"; import { Sleep } from "$ts/sleep"; +import { Store } from "$ts/writable"; import type { Service } from "$types/services/service"; import type { Unsubscriber } from "$types/shared/writable"; -import type { GlobalDispatchClient } from "$types/system/dispatch"; +import type { GlobalDispatchClient, GlobalDispatchState } from "$types/system/dispatch"; import type { UserPreferences } from "$types/user"; import io, { Socket } from "socket.io-client"; @@ -17,6 +18,7 @@ export class GlobalDispatch extends BaseService implements IGlobalDispatch { client: Socket | undefined; server: IServerManager; authorized = false; + public ConnectionState = Store("connecting"); //#region LIFECYCLE @@ -34,24 +36,32 @@ export class GlobalDispatch extends BaseService implements IGlobalDispatch { async start() { this.initBroadcast?.("Connecting global dispatch"); - return new Promise((resolve) => { - this.client = io(this.server.url, { transports: ["websocket"] }); - this.client.on("connect", async () => { - await this.connected(); - resolve(); - }); + this.client = io(this.server.url, { transports: ["websocket"] }); + this.client.on("connect", () => { + this.ConnectionState.set("connecting"); + this.connected(); + }); - this.client.on("kicked", () => { - const daemon = Stack.getProcess(+Env.get("userdaemon_pid")); - daemon?.power?.logoff(); - }); + this.client.on("kicked", () => { + const daemon = Stack.getProcess(+Env.get("userdaemon_pid")); + daemon?.power?.logoff(); + }); + + this.client.on("disconnect", (reason) => { + if (reason === "transport error" || reason === "transport close" || reason === "ping timeout") { + this.ConnectionState.set("disconnected"); + } }); } async stop(broadcast?: (m: string) => void) { broadcast?.("Stopping development environment"); - this.client?.disconnect(); - this.stackUnsubscribe?.(); + + return new Promise((resolve) => { + this.client?.once("disconnect", () => resolve()); + this.client?.disconnect(); + this.stackUnsubscribe?.(); + }); } //#endregion @@ -67,6 +77,7 @@ export class GlobalDispatch extends BaseService implements IGlobalDispatch { Env.set("dispatch_sock_id", this.client?.id); this.authorized = true; this.enableListener(); + this.ConnectionState.set("connected"); resolve(); }); diff --git a/src/ts/servicehost/services/SystemShortcutsSvc/index.ts b/src/ts/servicehost/services/SystemShortcutsSvc/index.ts index b86afc754..8ece077fc 100644 --- a/src/ts/servicehost/services/SystemShortcutsSvc/index.ts +++ b/src/ts/servicehost/services/SystemShortcutsSvc/index.ts @@ -1,5 +1,5 @@ import type { IBaseService, IServiceHost } from "$interfaces/IServiceHost"; -import { AppProcess, bannedKeys } from "$ts/apps/process"; +import { AppProcess, KEY_IGNORE_LIST } from "$ts/apps/process"; import { Daemon, Env, Stack, State } from "$ts/env"; import { BaseService } from "$ts/servicehost/base"; import type { AppKeyCombinations } from "$types/apps/accelerator"; @@ -68,7 +68,7 @@ export class SystemShortcutsService extends BaseService implements IBaseService private async processor(e: KeyboardEvent) { if (!e.key || this._disposed) return; - if (bannedKeys.includes(e.key.toLowerCase()) && State?.currentState === "desktop") { + if (KEY_IGNORE_LIST.includes(e.key.toLowerCase()) && State?.currentState === "desktop") { e.preventDefault(); return false; diff --git a/src/types/apps/accelerator.ts b/src/types/apps/accelerator.ts index 1375e2333..d0ea5609a 100644 --- a/src/types/apps/accelerator.ts +++ b/src/types/apps/accelerator.ts @@ -1,10 +1,12 @@ +import type { MaybePromise } from "$types/shared/common"; + // !tpa export interface AppKeyCombination { alt?: boolean; ctrl?: boolean; shift?: boolean; key?: string; - action(proc: any, event: KeyboardEvent): void; + action(proc: any, event: KeyboardEvent): MaybePromise; global?: boolean; } diff --git a/src/types/system/dispatch.ts b/src/types/system/dispatch.ts index 2a8d5396d..f6f2e1aac 100644 --- a/src/types/system/dispatch.ts +++ b/src/types/system/dispatch.ts @@ -8,4 +8,7 @@ export interface GlobalDispatchClient { authorized: boolean; ip?: string; } + +export type GlobalDispatchState = "connected" | "connecting" | "disconnected"; + // !endtpa diff --git a/yarn.lock b/yarn.lock index 792cd61f9..c88e229f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -705,14 +705,6 @@ dependencies: mime "*" -"@types/node-fetch@^2.6.12": - version "2.6.13" - resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz" - integrity sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw== - dependencies: - "@types/node" "*" - form-data "^4.0.4" - "@types/node@*": version "24.3.0" resolved "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz" @@ -742,6 +734,11 @@ dependencies: string-width "*" +"@types/ua-parser-js@^0.7.39": + version "0.7.39" + resolved "https://registry.yarnpkg.com/@types/ua-parser-js/-/ua-parser-js-0.7.39.tgz#832c58e460c9435e4e34bb866e85e9146e12cdbb" + integrity sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg== + "@types/validator@^13.12.2": version "13.15.3" resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.15.3.tgz#67e8aeacbace03517f9bd3f99e750bb666207ff4" @@ -1449,11 +1446,6 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -detect-europe-js@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/detect-europe-js/-/detect-europe-js-0.1.2.tgz" - integrity sha512-lgdERlL3u0aUdHocoouzT10d9I89VVhk0qNRmll7mXdGfJT1/wqZ2ZLA4oJAjeACPY5fT1wsbq2AT+GkuInsow== - detective-amd@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/detective-amd/-/detective-amd-6.0.1.tgz#71eb13b5d9b17222d7b4de3fb89a8e684d8b9a23" @@ -2229,11 +2221,6 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA== -is-standalone-pwa@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/is-standalone-pwa/-/is-standalone-pwa-0.1.1.tgz" - integrity sha512-9Cbovsa52vNQCjdXOzeQq5CnCbAcRk05aU62K20WO372NrTv0NxibLFCK6lQ4/iZEFdEA3p3t2VNOn8AJ53F5g== - is-typed-array@^1.1.14, is-typed-array@^1.1.3: version "1.1.15" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" @@ -2622,13 +2609,6 @@ nanoid@^3.3.11: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b" integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== -node-fetch@^2.7.0: - version "2.7.0" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" - integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== - dependencies: - whatwg-url "^5.0.0" - node-source-walk@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/node-source-walk/-/node-source-walk-7.0.1.tgz#3e4ab8d065377228fd038af7b2d4fb58f61defd3" @@ -3574,11 +3554,6 @@ token-types@^6.1.1: "@tokenizer/token" "^0.3.0" ieee754 "^1.2.1" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - ts-api-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91" @@ -3637,21 +3612,10 @@ typescript@^5.7.3, typescript@^5.8.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== -ua-is-frozen@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/ua-is-frozen/-/ua-is-frozen-0.1.2.tgz" - integrity sha512-RwKDW2p3iyWn4UbaxpP2+VxwqXh0jpvdxsYpZ5j/MLLiQOfbsV5shpgQiw93+KMYQPcteeMQ289MaAFzs3G9pw== - -ua-parser-js@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-2.0.4.tgz#ea6698b055af2a61661d8793f069452cf456c0df" - integrity sha512-XiBOnM/UpUq21ZZ91q2AVDOnGROE6UQd37WrO9WBgw4u2eGvUCNOheMmZ3EfEUj7DLHr8tre+Um/436Of/Vwzg== - dependencies: - "@types/node-fetch" "^2.6.12" - detect-europe-js "^0.1.2" - is-standalone-pwa "^0.1.1" - node-fetch "^2.7.0" - ua-is-frozen "^0.1.2" +ua-parser-js@1.0.41: + version "1.0.41" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.41.tgz#bd04dc9ec830fcf9e4fad35cf22dcedd2e3b4e9c" + integrity sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug== uint8array-extras@^1.4.0, uint8array-extras@^1.5.0: version "1.5.0" @@ -3749,19 +3713,6 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - which-typed-array@^1.1.16, which-typed-array@^1.1.2: version "1.1.20" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.20.tgz#3fdb7adfafe0ea69157b1509f3a1cd892bd1d122"