feat: highlight search matches and document the working UI
Core CI / core (ubuntu-latest) (push) Failing after 3m29s
Core CI / core (macos-latest) (push) Canceled after 0s
Core CI / core (windows-latest) (push) Canceled after 0s
Core CI / desktop (ubuntu-latest) (push) Successful in 7m23s
Core CI / desktop (macos-latest) (push) Canceled after 0s
Core CI / desktop (windows-latest) (push) Canceled after 0s
Core CI / core (ubuntu-latest) (push) Failing after 3m29s
Core CI / core (macos-latest) (push) Canceled after 0s
Core CI / core (windows-latest) (push) Canceled after 0s
Core CI / desktop (ubuntu-latest) (push) Successful in 7m23s
Core CI / desktop (macos-latest) (push) Canceled after 0s
Core CI / desktop (windows-latest) (push) Canceled after 0s
This commit is contained in:
1 parent
b8400c4fbf
commit
79553ce921
26 files changed
+4124
-50
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
invoke as nativeInvoke,
|
||||
isTauri,
|
||||
convertFileSrc,
|
||||
} from "@tauri-apps/api/core";
|
||||
import { CaptureBridge } from "./capture-bridge";
|
||||
|
||||
const capture = new CaptureBridge();
|
||||
export const isNativeDesktop = () => isTauri();
|
||||
export const isCaptureSurface = () => capture.active;
|
||||
export const isDesktopSurface = () => isTauri() || capture.active;
|
||||
|
||||
export async function initializeDesktopSurface() {
|
||||
if (isTauri()) return;
|
||||
await capture.initialize(window.location.href);
|
||||
}
|
||||
|
||||
export function invoke<T>(
|
||||
command: string,
|
||||
args?: Record<string, unknown>,
|
||||
): Promise<T> {
|
||||
return isTauri()
|
||||
? nativeInvoke<T>(command, args)
|
||||
: capture.invoke<T>(command, args);
|
||||
}
|
||||
|
||||
export function prepareMediaURL(path: string) {
|
||||
if (isTauri()) return convertFileSrc(path);
|
||||
return capture.mediaURL(path);
|
||||
}
|
||||
Reference in new issue
Block a user