diff --git a/examples/api/src-tauri/capabilities/base.json b/examples/api/src-tauri/capabilities/base.json
index f5286a4ac..91b2d6b45 100644
--- a/examples/api/src-tauri/capabilities/base.json
+++ b/examples/api/src-tauri/capabilities/base.json
@@ -15,6 +15,7 @@
]
},
"core:default",
+ "core:app:allow-set-app-theme",
"fs:default",
"core:window:allow-minimize",
"core:window:allow-toggle-maximize",
diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte
index b9b0fb8ea..3d9f4987a 100644
--- a/examples/api/src/App.svelte
+++ b/examples/api/src/App.svelte
@@ -1,8 +1,16 @@
-
+
+
{#if isWindows}
-
+
{/if}
@@ -413,9 +433,10 @@
id="console"
class="select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"
>
-
@@ -426,7 +447,7 @@
hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay
active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25
"
- on:click={clear}
+ onclick={clear}
>
@@ -435,8 +456,8 @@
bind:this={consoleTextEl}
class="px-2 overflow-y-auto all:font-mono code-block all:text-xs select-text mr-2"
>
- {#each $messages as r}
- {@html r.html}
+ {#each $messages as messageHtml}
+ {@html messageHtml}
{/each}
diff --git a/examples/api/src/app.css b/examples/api/src/app.css
index bbf0fdd9a..20df36aa1 100644
--- a/examples/api/src/app.css
+++ b/examples/api/src/app.css
@@ -1,3 +1,7 @@
+:root {
+ line-height: 1.5;
+}
+
*:not(h1, h2, h3, h4, h5, h6) {
margin: 0;
padding: 0;
diff --git a/examples/api/src/lib/TitleBar.svelte b/examples/api/src/lib/TitleBar.svelte
index ec927d12b..c1e425316 100644
--- a/examples/api/src/lib/TitleBar.svelte
+++ b/examples/api/src/lib/TitleBar.svelte
@@ -1,13 +1,14 @@
@@ -173,15 +180,16 @@
-
-
+
-
-
+
-
-
-
+
+
diff --git a/examples/api/src/views/FileSystem.svelte b/examples/api/src/views/FileSystem.svelte
index fbec86282..bc35547ec 100644
--- a/examples/api/src/views/FileSystem.svelte
+++ b/examples/api/src/views/FileSystem.svelte
@@ -5,7 +5,7 @@
import { arrayBufferToBase64 } from '../lib/utils'
import { onDestroy, onMount } from 'svelte'
- const { onMessage, insecureRenderHtml } = $props()
+ const { onMessage } = $props()
let path = $state('')
let img
@@ -118,12 +118,12 @@
new Uint8Array(response),
function (base64) {
const src = 'data:image/png;base64,' + base64
- insecureRenderHtml('
')
+ onMessage('
')
}
)
} else {
const value = String.fromCharCode.apply(null, response)
- insecureRenderHtml(
+ onMessage(
''
)
setTimeout(() => {