Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Request user attention when update is done

Ilya95953a7673d5
diff --git a/apps/desktop/src/routes/(window-chrome)/update.tsx b/apps/desktop/src/routes/(window-chrome)/update.tsx
index c5e90ca34..5833b736e 100644
--- a/apps/desktop/src/routes/(window-chrome)/update.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/update.tsx
@@ -1,8 +1,9 @@
import { useNavigate } from "@solidjs/router";
import { check } from "@tauri-apps/plugin-updater";
-import { createResource, Match, Show, Switch } from "solid-js";
+import { createEffect, createResource, Match, Show, Switch } from "solid-js";
import { relaunch } from "@tauri-apps/plugin-process";
import { Button } from "@cap/ui-solid";
+import { getCurrentWindow, UserAttentionType } from "@tauri-apps/api/window";
export default function () {
const navigate = useNavigate();
@@ -50,6 +51,7 @@ export default function () {
})
.then(async () => {
updateStatusActions.mutate({ type: "done" });
+ getCurrentWindow().requestUserAttention(UserAttentionType.Informational);
})
.catch(() => navigate("/"));
})