Add test-http-api crate to make app work in browser

A new `invoke` function calls either the tauri backend or the
`test-http-api` function if ran in a browser.
This commit is contained in:
Sebastian Martinez
2024-10-28 13:56:23 +01:00
parent e0323e34bc
commit d90dc0735c
45 changed files with 4617 additions and 814 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
import { Renderer, markdownWithExtensions } from "@app/lib/markdown";
import { highlight } from "@app/lib/syntax";
import { twemoji, scrollIntoView, isCommit } from "@app/lib/utils";
import { invoke } from "@tauri-apps/api/core";
import { invoke } from "@app/lib/invoke";
export let rid: string;
export let content: string;
+1 -1
View File
@@ -8,7 +8,7 @@
patchStatusBackgroundColor,
patchStatusColor,
} from "@app/lib/utils";
import { invoke } from "@tauri-apps/api/core";
import { invoke } from "@app/lib/invoke";
import { onMount } from "svelte";
import { push } from "@app/lib/router";