diff --git a/crates/tauri-app/src/App.svelte b/crates/tauri-app/src/App.svelte index d07e71a..e3e9c96 100644 --- a/crates/tauri-app/src/App.svelte +++ b/crates/tauri-app/src/App.svelte @@ -135,6 +135,25 @@ } } + async function copyToClipboard(text: string) { + try { + await navigator.clipboard.writeText(text); + // Surface a tiny inline confirmation by reusing the toast stack. + // We dispatch the toast event (not pushToast directly) so the + // notification toast gets the close-on-click behavior. + const ev = new CustomEvent("maarcadetweet:notification", { + detail: { + title: "clipboard", + body: `copied: ${text.length > 40 ? text.slice(0, 37) + "…" : text}`, + url: null, + }, + }); + window.dispatchEvent(ev); + } catch (e) { + pushToast("error", `> clipboard failed: ${String(e)}`); + } + } + // We need to hoist these into the onMount closure (which is below) // so the addEventListener / removeEventListener pair stays paired. // (`_toastHandler` is the function below; the other two are @@ -425,6 +444,21 @@ {displayHandle(profile.handle)} {profile.did} +
+ + +
followers
@@ -540,6 +574,12 @@ overflow: auto; padding: var(--s-3); } + + .profile__actions { + display: flex; + gap: var(--s-2); + margin: var(--s-3) 0; + } .head { font-family: var(--font-mono); font-size: var(--fs-50);