Add native self-hosted instance connection to fluxer_desktop
Trimmed monorepo checkout (fluxer_desktop + packages/voice_engine_v2 + tools/ci) with a "Connect to a Different Server" menu item and popout that lets the desktop app switch to any self-hosted Fluxer instance, plus fixes for well-known discovery on single-domain self-hosted deployments and a false-positive ERR_ABORTED on same-origin client redirects during the switch. Defaults to chat.fluxr.chat and uses an isolated userData directory from the official build.
This commit is contained in:
+58
@@ -0,0 +1,58 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
export interface ToastAction {
|
||||
label: string;
|
||||
args: string;
|
||||
activationType?: 'foreground' | 'background' | 'protocol';
|
||||
imageUri?: string;
|
||||
hintInputId?: string;
|
||||
}
|
||||
|
||||
export interface ToastBindingText {
|
||||
text: string;
|
||||
hintMaxLines?: number;
|
||||
hint?: 'attribution';
|
||||
}
|
||||
|
||||
export interface ToastInputBox {
|
||||
id: string;
|
||||
type: 'text' | 'selection';
|
||||
placeholder?: string;
|
||||
title?: string;
|
||||
options?: ReadonlyArray<{id: string; content: string}>;
|
||||
}
|
||||
|
||||
export interface ToastImage {
|
||||
uri: string;
|
||||
placement?: 'hero' | 'appLogoOverride';
|
||||
hintCrop?: 'circle' | 'none';
|
||||
alt?: string;
|
||||
}
|
||||
|
||||
export interface ToastNotifyOptions {
|
||||
aumid: string;
|
||||
tag?: string;
|
||||
group?: string;
|
||||
expirationTime?: string;
|
||||
scenario?: 'default' | 'urgent' | 'reminder' | 'incomingCall' | 'alarm';
|
||||
audio?: 'default' | 'silent' | {silent?: boolean; loop?: boolean; src?: string};
|
||||
lines: ReadonlyArray<ToastBindingText>;
|
||||
images?: ReadonlyArray<ToastImage>;
|
||||
inputs?: ReadonlyArray<ToastInputBox>;
|
||||
actions?: ReadonlyArray<ToastAction>;
|
||||
}
|
||||
|
||||
export interface ToastSupport {
|
||||
supported: boolean;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export declare function isSupported(): ToastSupport;
|
||||
|
||||
export declare function notify(opts: ToastNotifyOptions): Promise<void>;
|
||||
|
||||
export declare function dismiss(opts: {aumid: string; tag: string; group?: string}): Promise<void>;
|
||||
|
||||
export declare function clear(opts: {aumid: string}): Promise<void>;
|
||||
|
||||
export declare const loadError: Error | null;
|
||||
Reference in New Issue
Block a user