refactor: remove legacy Tauri desktop support
Electron updater now uses Electron release metadata only Removed legacy Tauri package and migration workflow Replaced Tauri shim usage with the desktop bridge
This commit is contained in:
@@ -56,17 +56,13 @@ const copyCurrentSelectionFallback = async (): Promise<boolean> => {
|
||||
const MENU_ACTION_EVENT = 'openchamber:menu-action';
|
||||
const CHECK_FOR_UPDATES_EVENT = 'openchamber:check-for-updates';
|
||||
|
||||
type TauriEventApi = {
|
||||
type DesktopBridgeGlobal = {
|
||||
listen?: (
|
||||
event: string,
|
||||
handler: (evt: { payload?: unknown }) => void
|
||||
) => Promise<() => void>;
|
||||
};
|
||||
|
||||
type TauriGlobal = {
|
||||
event?: TauriEventApi;
|
||||
};
|
||||
|
||||
type MenuAction =
|
||||
| 'about'
|
||||
| 'settings'
|
||||
@@ -344,8 +340,8 @@ export const useMenuActions = (
|
||||
|
||||
React.useEffect(() => {
|
||||
if (typeof window === 'undefined') return;
|
||||
const tauri = (window as unknown as { __TAURI__?: TauriGlobal }).__TAURI__;
|
||||
const listen = tauri?.event?.listen;
|
||||
const desktop = (window as unknown as { __OPENCHAMBER_DESKTOP__?: DesktopBridgeGlobal }).__OPENCHAMBER_DESKTOP__;
|
||||
const listen = desktop?.listen;
|
||||
if (typeof listen !== 'function') return;
|
||||
|
||||
let unlistenMenu: null | (() => void | Promise<void>) = null;
|
||||
|
||||
@@ -27,7 +27,7 @@ function isVSCodeContext(): boolean {
|
||||
*
|
||||
* Works in:
|
||||
* - Web: Full bidirectional sync
|
||||
* - Desktop (Tauri): Full bidirectional sync
|
||||
* - Desktop: Full bidirectional sync
|
||||
* - VS Code: State-only (no URL updates, reads initial params)
|
||||
*/
|
||||
export function useRouter(): void {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { useProjectsStore } from '@/stores/useProjectsStore';
|
||||
import { isDesktopLocalOriginActive, isDesktopShell, isTauriShell } from '@/lib/desktop';
|
||||
import { isDesktopLocalOriginActive, isDesktopShell } from '@/lib/desktop';
|
||||
import { desktopHostsGet, getDesktopHostApiUrl, locationMatchesHost, redactSensitiveUrl } from '@/lib/desktopHosts';
|
||||
import { setDesktopWindowTitle } from '@/lib/desktopNative';
|
||||
import { getRuntimeApiBaseUrl } from '@/lib/runtime-switch';
|
||||
@@ -110,7 +110,7 @@ export const useWindowTitle = () => {
|
||||
document.title = title;
|
||||
}
|
||||
|
||||
if (!isTauriShell()) {
|
||||
if (!isDesktopShell()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user