Skip to content

Commit f14a06a

Browse files
Hide dock icon on macOS
1 parent 6851fbb commit f14a06a

File tree

5 files changed

+80
-15
lines changed

5 files changed

+80
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bewcloud-sync",
33
"private": true,
4-
"version": "0.0.3",
4+
"version": "0.0.4",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src-tauri/Cargo.lock

Lines changed: 69 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bewcloud-sync"
3-
version = "0.0.3"
3+
version = "0.0.4"
44
description = "Desktop Sync Client for bewCloud"
55
authors = ["Bruno Bernardino"]
66
edition = "2021"
@@ -16,6 +16,7 @@ serde = { version = "1", features = ["derive"] }
1616
serde_json = "1"
1717
async-std = "1.12.0"
1818
chrono = "0.4.19"
19+
cocoa = "0.25.0"
1920

2021
[features]
2122
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!

src-tauri/src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,13 @@ fn main() {
512512
// Keeps app running when regularly "closed"
513513
tauri::RunEvent::ExitRequested { api, .. } => {
514514
api.prevent_exit();
515+
516+
use cocoa::appkit::{NSApp, NSApplication, NSApplicationActivationPolicy::*};
517+
518+
unsafe {
519+
let app = NSApp();
520+
app.setActivationPolicy_(NSApplicationActivationPolicyAccessory);
521+
}
515522
}
516523

517524
_ => {}

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"package": {
99
"productName": "bewCloud Desktop Sync",
10-
"version": "0.0.3"
10+
"version": "0.0.4"
1111
},
1212
"tauri": {
1313
"allowlist": {

0 commit comments

Comments
 (0)