mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-27 07:30:34 +08:00
Allow opening the app in a browser
For development purposes it's convenient to be able to open the app in Chrome. To do this we skip invoking internal Tauri commands.
This commit is contained in:
committed by
Sebastian Martinez
parent
b6711a5698
commit
3d9e614ea3
+6
-1
@@ -16,7 +16,12 @@
|
||||
|
||||
onMount(async () => {
|
||||
try {
|
||||
await invoke("authenticate");
|
||||
// For development purposes don't run tauri commands when viewing from
|
||||
// a browser.
|
||||
if (window.__TAURI_INTERNALS__) {
|
||||
await invoke("authenticate");
|
||||
}
|
||||
|
||||
void router.push({ resource: "home" });
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} catch (e: any) {
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
__TAURI_INTERNALS__: Record<string, unknown>;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user