Skip to content

Commit

Permalink
feat: Get user attention when finished
Browse files Browse the repository at this point in the history
fixes #65
  • Loading branch information
vgskye committed Sep 15, 2024
1 parent 90c68d9 commit 7116579
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tauri-build = { version = "1.3.0", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.3.0", features = [ "shell-open", "dialog-confirm", "http-api", "window-close", "process-command-api"] }
tauri = { version = "1.3.0", features = [ "window-request-user-attention", "shell-open", "dialog-confirm", "http-api", "window-close", "process-command-api"] }
zip = { version = "2.2.0", default-features = false, features = ["aes-crypto", "deflate", "deflate64", "lzma", "bzip2", "zstd", "time"] }
tokio = { version = "1", features = [ "fs" ] }
sha2 = "0.10.8"
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"all": false,
"window": {
"all": false,
"close": true
"close": true,
"requestUserAttention": true
},
"dialog": {
"all": false,
Expand Down
3 changes: 2 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { get_project, list_versions, type Version } from '$lib/modrinth';
import { trans, locale, langIds, langName, dir, getDir } from '$lib/i18n';
import { listen } from '@tauri-apps/api/event';
import { appWindow } from '@tauri-apps/api/window';
import { UserAttentionType, appWindow } from '@tauri-apps/api/window';
import { confirm } from '@tauri-apps/api/dialog';
import { open } from '@tauri-apps/api/shell';
import flexver_compare from '$lib/flexver';
Expand Down Expand Up @@ -132,6 +132,7 @@
cosign_bundle_url
);
state = 'postInstall';
await appWindow.requestUserAttention(UserAttentionType.Informational);
} catch (e) {
state = 'error';
errorMessage = String(e);
Expand Down

0 comments on commit 7116579

Please sign in to comment.