feat(kon): replace browser clipboard with arboard

- New copy_to_clipboard Tauri command using arboard 3.6
- Replaced all 5 navigator.clipboard.writeText() calls across
  DictationPage, HistoryPage, FilesPage, and viewer with invoke()
- Native clipboard access independent of WebView permissions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jake
2026-03-16 21:48:19 +00:00
parent 292f9716ff
commit 0bbdbc0591
8 changed files with 22 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
<script>
import { onMount, onDestroy } from "svelte";
import { getCurrentWindow } from "@tauri-apps/api/window";
import { convertFileSrc } from "@tauri-apps/api/core";
import { convertFileSrc, invoke } from "@tauri-apps/api/core";
import { formatTime, formatDuration } from "$lib/utils/time.js";
import { PLAYBACK_SPEEDS } from "$lib/utils/constants.js";
@@ -193,7 +193,7 @@
function copySegment(idx) {
if (item?.segments?.[idx]) {
navigator.clipboard.writeText(item.segments[idx].text.trim()).catch(() => {});
invoke("copy_to_clipboard", { text: item.segments[idx].text.trim() }).catch(() => {});
}
}