Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Allow opening the app in a browser
Rūdolfs Ošiņš committed 1 year ago
commit 3d9e614ea39b82c18dfd5ca46051b0df9fe731f5
parent b6711a569820ff2bdb3f2d746d7885937842cf8a
2 files changed +14 -1
modified src/App.svelte
@@ -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) {
added src/global.d.ts
@@ -0,0 +1,8 @@
+
declare global {
+
  interface Window {
+
    // eslint-disable-next-line @typescript-eslint/naming-convention
+
    __TAURI_INTERNALS__: Record<string, unknown>;
+
  }
+
}
+

+
export {};