mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-18 06:49:50 +02:00
Integrated titlebar windows
This commit is contained in:
108
package-lock.json
generated
108
package-lock.json
generated
@@ -24,7 +24,7 @@
|
|||||||
"@tanstack/react-query": "^4.28.0",
|
"@tanstack/react-query": "^4.28.0",
|
||||||
"@tanstack/react-query-devtools": "^4.28.0",
|
"@tanstack/react-query-devtools": "^4.28.0",
|
||||||
"@tanstack/react-query-persist-client": "^4.28.0",
|
"@tanstack/react-query-persist-client": "^4.28.0",
|
||||||
"@tauri-apps/api": "^1.5.1",
|
"@tauri-apps/api": "^1.5.3",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
"cm6-graphql": "^0.0.9",
|
"cm6-graphql": "^0.0.9",
|
||||||
@@ -1934,9 +1934,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/api": {
|
"node_modules/@tauri-apps/api": {
|
||||||
"version": "1.5.1",
|
"version": "1.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.5.3.tgz",
|
||||||
"integrity": "sha512-6unsZDOdlXTmauU3NhWhn+Cx0rODV+rvNvTdvolE5Kls5ybA6cqndQENDt1+FS0tF7ozCP66jwWoH6a5h90BrA==",
|
"integrity": "sha512-zxnDjHHKjOsrIzZm6nO5Xapb/BxqUq1tc7cGkFXsFkGTsSWgCPH1D8mm0XS9weJY2OaR73I3k3S+b7eSzJDfqA==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14.6.0",
|
"node": ">= 14.6.0",
|
||||||
"npm": ">= 6.6.0",
|
"npm": ">= 6.6.0",
|
||||||
@@ -1948,9 +1948,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli": {
|
"node_modules/@tauri-apps/cli": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.5.9.tgz",
|
||||||
"integrity": "sha512-k4Y19oVCnt7WZb2TnDzLqfs7o98Jq0tUoVMv+JQSzuRDJqaVu2xMBZ8dYplEn+EccdR5SOMyzaLBJWu38TVK1A==",
|
"integrity": "sha512-knSt/9AvCTeyfC6wkyeouF9hBW/0Mzuw+5vBKEvzaGPQsfFJo1ZCp5FkdiZpGBBfnm09BhugasGRTGofzatfqQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tauri": "tauri.js"
|
"tauri": "tauri.js"
|
||||||
@@ -1963,22 +1963,22 @@
|
|||||||
"url": "https://opencollective.com/tauri"
|
"url": "https://opencollective.com/tauri"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@tauri-apps/cli-darwin-arm64": "1.5.6",
|
"@tauri-apps/cli-darwin-arm64": "1.5.9",
|
||||||
"@tauri-apps/cli-darwin-x64": "1.5.6",
|
"@tauri-apps/cli-darwin-x64": "1.5.9",
|
||||||
"@tauri-apps/cli-linux-arm-gnueabihf": "1.5.6",
|
"@tauri-apps/cli-linux-arm-gnueabihf": "1.5.9",
|
||||||
"@tauri-apps/cli-linux-arm64-gnu": "1.5.6",
|
"@tauri-apps/cli-linux-arm64-gnu": "1.5.9",
|
||||||
"@tauri-apps/cli-linux-arm64-musl": "1.5.6",
|
"@tauri-apps/cli-linux-arm64-musl": "1.5.9",
|
||||||
"@tauri-apps/cli-linux-x64-gnu": "1.5.6",
|
"@tauri-apps/cli-linux-x64-gnu": "1.5.9",
|
||||||
"@tauri-apps/cli-linux-x64-musl": "1.5.6",
|
"@tauri-apps/cli-linux-x64-musl": "1.5.9",
|
||||||
"@tauri-apps/cli-win32-arm64-msvc": "1.5.6",
|
"@tauri-apps/cli-win32-arm64-msvc": "1.5.9",
|
||||||
"@tauri-apps/cli-win32-ia32-msvc": "1.5.6",
|
"@tauri-apps/cli-win32-ia32-msvc": "1.5.9",
|
||||||
"@tauri-apps/cli-win32-x64-msvc": "1.5.6"
|
"@tauri-apps/cli-win32-x64-msvc": "1.5.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-darwin-arm64": {
|
"node_modules/@tauri-apps/cli-darwin-arm64": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.9.tgz",
|
||||||
"integrity": "sha512-NNvG3XLtciCMsBahbDNUEvq184VZmOveTGOuy0So2R33b/6FDkuWaSgWZsR1mISpOuP034htQYW0VITCLelfqg==",
|
"integrity": "sha512-7C2Jf8f0gzv778mLYb7Eszqqv1bm9Wzews81MRTqKrUIcC+eZEtDXLex+JaEkEzFEUrgIafdOvMBVEavF030IA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1992,9 +1992,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-darwin-x64": {
|
"node_modules/@tauri-apps/cli-darwin-x64": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.5.9.tgz",
|
||||||
"integrity": "sha512-nkiqmtUQw3N1j4WoVjv81q6zWuZFhBLya/RNGUL94oafORloOZoSY0uTZJAoeieb3Y1YK0rCHSDl02MyV2Fi4A==",
|
"integrity": "sha512-LHKytpkofPYgH8RShWvwDa3hD1ws131x7g7zNasJPfOiCWLqYVQFUuQVmjEUt8+dpHe/P/err5h4z+YZru2d0A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2008,9 +2008,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
|
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.5.9.tgz",
|
||||||
"integrity": "sha512-z6SPx+axZexmWXTIVPNs4Tg7FtvdJl9EKxYN6JPjOmDZcqA13iyqWBQal2DA/GMZ1Xqo3vyJf6EoEaKaliymPQ==",
|
"integrity": "sha512-teGK20IYKx+dVn8wFq/Lg57Q9ce7foq1KHSfyHi464LVt1T0V1rsmULSgZpQPPj/NYPF5BG78PcWYv64yH86jw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -2024,9 +2024,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-linux-arm64-gnu": {
|
"node_modules/@tauri-apps/cli-linux-arm64-gnu": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.5.9.tgz",
|
||||||
"integrity": "sha512-QuQjMQmpsCbzBrmtQiG4uhnfAbdFx3nzm+9LtqjuZlurc12+Mj5MTgqQ3AOwQedH3f7C+KlvbqD2AdXpwTg7VA==",
|
"integrity": "sha512-onJ/DW5Crw38qVx+wquY4uBbfCxVhzhdJmlCYqnYyXsZZmSiPUfSyhV58y+5TYB0q1hG8eYdB5x8VAwzByhGzw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -2040,9 +2040,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-linux-arm64-musl": {
|
"node_modules/@tauri-apps/cli-linux-arm64-musl": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.9.tgz",
|
||||||
"integrity": "sha512-8j5dH3odweFeom7bRGlfzDApWVOT4jIq8/214Wl+JeiNVehouIBo9lZGeghZBH3XKFRwEvU23i7sRVjuh2s8mg==",
|
"integrity": "sha512-23AYoLD3acakLp9NtheKQDJl8F66eTOflxoPzdJNRy13hUSxb+W9qpz4rRA+CIzkjICFvO2i3UWjeV9QwDVpsQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -2056,9 +2056,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-linux-x64-gnu": {
|
"node_modules/@tauri-apps/cli-linux-x64-gnu": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.5.9.tgz",
|
||||||
"integrity": "sha512-gbFHYHfdEGW0ffk8SigDsoXks6USpilF6wR0nqB/JbWzbzFR/sBuLVNQlJl1RKNakyJHu+lsFxGy0fcTdoX8xA==",
|
"integrity": "sha512-9PQA1rE7gh41W2ylyKd5qOGOds55ymaYPml9KOpM0g+cxmCXa+8Wf9K5NKvACnJldJJ6cekWzIyB4eN6o5T+yQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2072,9 +2072,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-linux-x64-musl": {
|
"node_modules/@tauri-apps/cli-linux-x64-musl": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.9.tgz",
|
||||||
"integrity": "sha512-9v688ogoLkeFYQNgqiSErfhTreLUd8B3prIBSYUt+x4+5Kcw91zWvIh+VSxL1n3KCGGsM7cuXhkGPaxwlEh1ug==",
|
"integrity": "sha512-5hdbNFeDsrJ/pXZ4cSQV4bJwUXPPxXxN3/pAtNUqIph7q+vLcBXOXIMoS64iuyaluJC59lhEwlWZFz+EPv0Hqg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2088,9 +2088,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-win32-arm64-msvc": {
|
"node_modules/@tauri-apps/cli-win32-arm64-msvc": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.5.9.tgz",
|
||||||
"integrity": "sha512-DRNDXFNZb6y5IZrw+lhTTA9l4wbzO4TNRBAlHAiXUrH+pRFZ/ZJtv5WEuAj9ocVSahVw2NaK5Yaold4NPAxHog==",
|
"integrity": "sha512-O18JufjSB3hSJYu5WWByONouGeX7DraLAtXLErsG1r/VS3zHd/zyuzycrVUaObNXk5bfGlIP0Ypt+RvZJILN2w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -2104,9 +2104,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-win32-ia32-msvc": {
|
"node_modules/@tauri-apps/cli-win32-ia32-msvc": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.5.9.tgz",
|
||||||
"integrity": "sha512-oUYKNR/IZjF4fsOzRpw0xesl2lOjhsQEyWlgbpT25T83EU113Xgck9UjtI7xemNI/OPCv1tPiaM1e7/ABdg5iA==",
|
"integrity": "sha512-FQxtxTZu0JVBihfd/lmpxo7jyMOesjWQehfyVUqtgMfm5+Pvvw0Y+ZioeDi1TZkFVrT3QDYy8R4LqDLSZVMQRA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -2120,9 +2120,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tauri-apps/cli-win32-x64-msvc": {
|
"node_modules/@tauri-apps/cli-win32-x64-msvc": {
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.5.9.tgz",
|
||||||
"integrity": "sha512-RmEf1os9C8//uq2hbjXi7Vgz9ne7798ZxqemAZdUwo1pv3oLVZSz1/IvZmUHPdy2e6zSeySqWu1D0Y3QRNN+dg==",
|
"integrity": "sha512-EeI1+L518cIBLKw0qUFwnLIySBeSmPQjPLIlNwSukHSro4tAQPHycEVGgKrdToiCWgaZJBA0e5aRSds0Du2TWg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -9013,6 +9013,20 @@
|
|||||||
"@tauri-apps/api": "1.5.1"
|
"@tauri-apps/api": "1.5.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tauri-plugin-log-api/node_modules/@tauri-apps/api": {
|
||||||
|
"version": "1.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.5.1.tgz",
|
||||||
|
"integrity": "sha512-6unsZDOdlXTmauU3NhWhn+Cx0rODV+rvNvTdvolE5Kls5ybA6cqndQENDt1+FS0tF7ozCP66jwWoH6a5h90BrA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 14.6.0",
|
||||||
|
"npm": ">= 6.6.0",
|
||||||
|
"yarn": ">= 1.19.1"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/tauri"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/term-size": {
|
"node_modules/term-size": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz",
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
"@tanstack/react-query": "^4.28.0",
|
"@tanstack/react-query": "^4.28.0",
|
||||||
"@tanstack/react-query-devtools": "^4.28.0",
|
"@tanstack/react-query-devtools": "^4.28.0",
|
||||||
"@tanstack/react-query-persist-client": "^4.28.0",
|
"@tanstack/react-query-persist-client": "^4.28.0",
|
||||||
"@tauri-apps/api": "^1.5.1",
|
"@tauri-apps/api": "^1.5.3",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
"cm6-graphql": "^0.0.9",
|
"cm6-graphql": "^0.0.9",
|
||||||
|
|||||||
13
src-tauri/Cargo.lock
generated
13
src-tauri/Cargo.lock
generated
@@ -5328,6 +5328,18 @@ version = "0.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "window-shadows"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "67ff424735b1ac21293b0492b069394b0a189c8a463fb015a16dea7c2e221c08"
|
||||||
|
dependencies = [
|
||||||
|
"cocoa 0.25.0",
|
||||||
|
"objc",
|
||||||
|
"raw-window-handle",
|
||||||
|
"windows-sys 0.48.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows"
|
name = "windows"
|
||||||
version = "0.37.0"
|
version = "0.37.0"
|
||||||
@@ -5813,6 +5825,7 @@ dependencies = [
|
|||||||
"tauri-plugin-window-state",
|
"tauri-plugin-window-state",
|
||||||
"tokio",
|
"tokio",
|
||||||
"uuid",
|
"uuid",
|
||||||
|
"window-shadows",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ tauri-build = { version = "1.2", features = [] }
|
|||||||
objc = "0.2.7"
|
objc = "0.2.7"
|
||||||
cocoa = "0.25.0"
|
cocoa = "0.25.0"
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "linux")'.dependencies]
|
||||||
|
openssl-sys = {version = "0.9", features = ["vendored"] } # For Ubuntu installation to work
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.21.0"
|
base64 = "0.21.0"
|
||||||
boa_engine = "0.17.3"
|
boa_engine = "0.17.3"
|
||||||
@@ -29,7 +32,7 @@ reqwest = { version = "0.11.14", features = ["json", "multipart", "gzip", "brotl
|
|||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = { version = "1.0", features = ["raw_value"] }
|
serde_json = { version = "1.0", features = ["raw_value"] }
|
||||||
sqlx = { version = "0.7.2", features = ["sqlite", "runtime-tokio-rustls", "json", "chrono", "time"] }
|
sqlx = { version = "0.7.2", features = ["sqlite", "runtime-tokio-rustls", "json", "chrono", "time"] }
|
||||||
tauri = { version = "1.3", features = [
|
tauri = { version = "1.5.2", features = [
|
||||||
"config-toml",
|
"config-toml",
|
||||||
"devtools",
|
"devtools",
|
||||||
"dialog-open",
|
"dialog-open",
|
||||||
@@ -42,6 +45,7 @@ tauri = { version = "1.3", features = [
|
|||||||
"window-close",
|
"window-close",
|
||||||
"window-maximize",
|
"window-maximize",
|
||||||
"window-minimize",
|
"window-minimize",
|
||||||
|
"window-set-decorations",
|
||||||
"window-set-title",
|
"window-set-title",
|
||||||
"window-start-dragging",
|
"window-start-dragging",
|
||||||
"window-unmaximize",
|
"window-unmaximize",
|
||||||
@@ -52,7 +56,7 @@ tokio = { version = "1.25.0", features = ["sync"] }
|
|||||||
uuid = "1.3.0"
|
uuid = "1.3.0"
|
||||||
log = "0.4.20"
|
log = "0.4.20"
|
||||||
datetime = "0.5.2"
|
datetime = "0.5.2"
|
||||||
openssl-sys = {version = "0.9", features = ["vendored"] } # For Ubuntu installation to work
|
window-shadows = "0.2.2"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# by default Tauri runs in production mode
|
# by default Tauri runs in production mode
|
||||||
|
|||||||
@@ -17,16 +17,17 @@ use log::{debug, info, warn};
|
|||||||
use rand::random;
|
use rand::random;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use sqlx::{Pool, Sqlite, SqlitePool};
|
|
||||||
use sqlx::migrate::Migrator;
|
use sqlx::migrate::Migrator;
|
||||||
use sqlx::types::Json;
|
use sqlx::types::Json;
|
||||||
use tauri::{AppHandle, RunEvent, State, Window, WindowUrl, Wry};
|
use sqlx::{Pool, Sqlite, SqlitePool};
|
||||||
use tauri::{Manager, WindowEvent};
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
use tauri::TitleBarStyle;
|
use tauri::TitleBarStyle;
|
||||||
|
use tauri::{AppHandle, RunEvent, State, Window, WindowUrl, Wry};
|
||||||
|
use tauri::{Manager, WindowEvent};
|
||||||
use tauri_plugin_log::{fern, LogTarget};
|
use tauri_plugin_log::{fern, LogTarget};
|
||||||
use tauri_plugin_window_state::{StateFlags, WindowExt};
|
use tauri_plugin_window_state::{StateFlags, WindowExt};
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
|
use window_shadows::set_shadow;
|
||||||
|
|
||||||
use window_ext::TrafficLightWindowExt;
|
use window_ext::TrafficLightWindowExt;
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ async fn migrate_db(
|
|||||||
info!("Running migrations at {}", p.to_string_lossy());
|
info!("Running migrations at {}", p.to_string_lossy());
|
||||||
let m = Migrator::new(p).await.expect("Failed to load migrations");
|
let m = Migrator::new(p).await.expect("Failed to load migrations");
|
||||||
m.run(pool).await.expect("Failed to run migrations");
|
m.run(pool).await.expect("Failed to run migrations");
|
||||||
info!("Migrations complete");
|
info!("Migrations complete!");
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,12 +233,7 @@ async fn track_event(
|
|||||||
action: AnalyticsAction,
|
action: AnalyticsAction,
|
||||||
attributes: Option<Value>,
|
attributes: Option<Value>,
|
||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
analytics::track_event(
|
analytics::track_event(&window.app_handle(), resource, action, attributes).await;
|
||||||
&window.app_handle(),
|
|
||||||
resource,
|
|
||||||
action,
|
|
||||||
attributes,
|
|
||||||
).await;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -701,9 +697,16 @@ fn main() {
|
|||||||
)
|
)
|
||||||
.plugin(tauri_plugin_window_state::Builder::default().build())
|
.plugin(tauri_plugin_window_state::Builder::default().build())
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
|
let app_data_dir = app.path_resolver().app_data_dir().unwrap();
|
||||||
|
let app_config_dir = app.path_resolver().app_config_dir().unwrap();
|
||||||
|
info!(
|
||||||
|
"App Config Dir: {}",
|
||||||
|
app_config_dir.as_path().to_string_lossy(),
|
||||||
|
);
|
||||||
|
info!("App Data Dir: {}", app_data_dir.as_path().to_string_lossy(),);
|
||||||
let dir = match is_dev() {
|
let dir = match is_dev() {
|
||||||
true => current_dir().unwrap(),
|
true => current_dir().unwrap(),
|
||||||
false => app.path_resolver().app_data_dir().unwrap(),
|
false => app_data_dir,
|
||||||
};
|
};
|
||||||
|
|
||||||
create_dir_all(dir.clone()).expect("Problem creating App directory!");
|
create_dir_all(dir.clone()).expect("Problem creating App directory!");
|
||||||
@@ -835,10 +838,12 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn is_dev() -> bool {
|
fn is_dev() -> bool {
|
||||||
#[cfg(dev)] {
|
#[cfg(dev)]
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#[cfg(not(dev))] {
|
#[cfg(not(dev))]
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -860,7 +865,7 @@ fn create_window(handle: &AppHandle<Wry>, url: Option<&str>) -> Window<Wry> {
|
|||||||
100.0 + random::<f64>() * 30.0,
|
100.0 + random::<f64>() * 30.0,
|
||||||
100.0 + random::<f64>() * 30.0,
|
100.0 + random::<f64>() * 30.0,
|
||||||
)
|
)
|
||||||
.decorations(false)
|
.decorations(false) // Doesn't seem to work from Rust, here, so we do it in JS
|
||||||
.title(handle.package_info().name.to_string());
|
.title(handle.package_info().name.to_string());
|
||||||
|
|
||||||
// Add macOS-only things
|
// Add macOS-only things
|
||||||
@@ -870,11 +875,16 @@ fn create_window(handle: &AppHandle<Wry>, url: Option<&str>) -> Window<Wry> {
|
|||||||
.menu(app_menu)
|
.menu(app_menu)
|
||||||
.hidden_title(true)
|
.hidden_title(true)
|
||||||
.decoratons(true)
|
.decoratons(true)
|
||||||
|
.transparent(false)
|
||||||
.title_bar_style(TitleBarStyle::Overlay);
|
.title_bar_style(TitleBarStyle::Overlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
let win = win_builder.build().expect("failed to build window");
|
let win = win_builder.build().expect("failed to build window");
|
||||||
|
|
||||||
|
// Tauri doesn't support shadows when hiding decorations, so we add our own
|
||||||
|
#[cfg(any(windows, target_os = "macos"))]
|
||||||
|
set_shadow(&win, true).unwrap();
|
||||||
|
|
||||||
let win2 = win.clone();
|
let win2 = win.clone();
|
||||||
let handle2 = handle.clone();
|
let handle2 = handle.clone();
|
||||||
win.on_menu_event(move |event| match event.menu_item_id() {
|
win.on_menu_event(move |event| match event.menu_item_id() {
|
||||||
|
|||||||
@@ -53,8 +53,9 @@ pub async fn actually_send_request(
|
|||||||
.tls_info(true);
|
.tls_info(true);
|
||||||
|
|
||||||
if settings.request_timeout > 0 {
|
if settings.request_timeout > 0 {
|
||||||
client_builder =
|
client_builder = client_builder.timeout(Duration::from_millis(
|
||||||
client_builder.timeout(Duration::from_millis(settings.request_timeout.unsigned_abs()));
|
settings.request_timeout.unsigned_abs(),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// .use_rustls_tls() // TODO: Make this configurable (maybe)
|
// .use_rustls_tls() // TODO: Make this configurable (maybe)
|
||||||
|
|||||||
@@ -35,12 +35,13 @@
|
|||||||
"open": true
|
"open": true
|
||||||
},
|
},
|
||||||
"window": {
|
"window": {
|
||||||
"startDragging": true,
|
"close": true,
|
||||||
"setTitle": true,
|
|
||||||
"minimize": true,
|
|
||||||
"maximize": true,
|
"maximize": true,
|
||||||
"unmaximize": true,
|
"minimize": true,
|
||||||
"close": true
|
"setDecorations": true,
|
||||||
|
"setTitle": true,
|
||||||
|
"startDragging": true,
|
||||||
|
"unmaximize": true
|
||||||
},
|
},
|
||||||
"dialog": {
|
"dialog": {
|
||||||
"all": false,
|
"all": false,
|
||||||
|
|||||||
@@ -6,16 +6,13 @@ import { ReactComponent as LeftPanelHiddenIcon } from '../../assets/icons/LeftPa
|
|||||||
import { ReactComponent as LeftPanelVisibleIcon } from '../../assets/icons/LeftPanelVisibleIcon.svg';
|
import { ReactComponent as LeftPanelVisibleIcon } from '../../assets/icons/LeftPanelVisibleIcon.svg';
|
||||||
|
|
||||||
const icons = {
|
const icons = {
|
||||||
square: I.SquareIcon,
|
|
||||||
minus: I.MinusIcon,
|
|
||||||
hamburger: I.HamburgerMenuIcon,
|
|
||||||
archive: I.ArchiveIcon,
|
archive: I.ArchiveIcon,
|
||||||
chat: I.ChatBubbleIcon,
|
chat: I.ChatBubbleIcon,
|
||||||
check: I.CheckIcon,
|
check: I.CheckIcon,
|
||||||
checkbox: I.CheckboxIcon,
|
checkbox: I.CheckboxIcon,
|
||||||
clock: I.ClockIcon,
|
|
||||||
chevronDown: I.ChevronDownIcon,
|
chevronDown: I.ChevronDownIcon,
|
||||||
chevronRight: I.ChevronRightIcon,
|
chevronRight: I.ChevronRightIcon,
|
||||||
|
clock: I.ClockIcon,
|
||||||
code: I.CodeIcon,
|
code: I.CodeIcon,
|
||||||
colorWheel: I.ColorWheelIcon,
|
colorWheel: I.ColorWheelIcon,
|
||||||
copy: I.CopyIcon,
|
copy: I.CopyIcon,
|
||||||
@@ -33,6 +30,7 @@ const icons = {
|
|||||||
listBullet: I.ListBulletIcon,
|
listBullet: I.ListBulletIcon,
|
||||||
magicWand: I.MagicWandIcon,
|
magicWand: I.MagicWandIcon,
|
||||||
magnifyingGlass: I.MagnifyingGlassIcon,
|
magnifyingGlass: I.MagnifyingGlassIcon,
|
||||||
|
minus: I.MinusIcon,
|
||||||
moon: I.MoonIcon,
|
moon: I.MoonIcon,
|
||||||
openNewWindow: I.OpenInNewWindowIcon,
|
openNewWindow: I.OpenInNewWindowIcon,
|
||||||
paperPlane: I.PaperPlaneIcon,
|
paperPlane: I.PaperPlaneIcon,
|
||||||
@@ -42,6 +40,7 @@ const icons = {
|
|||||||
question: I.QuestionMarkIcon,
|
question: I.QuestionMarkIcon,
|
||||||
rocket: I.RocketIcon,
|
rocket: I.RocketIcon,
|
||||||
rows: I.RowsIcon,
|
rows: I.RowsIcon,
|
||||||
|
square: I.SquareIcon,
|
||||||
sun: I.SunIcon,
|
sun: I.SunIcon,
|
||||||
trash: I.TrashIcon,
|
trash: I.TrashIcon,
|
||||||
triangleDown: I.TriangleDownIcon,
|
triangleDown: I.TriangleDownIcon,
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
html,
|
html,
|
||||||
body,
|
body,
|
||||||
#root {
|
#root {
|
||||||
@apply w-full h-full;
|
@apply w-full h-full overflow-hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#root {
|
#root {
|
||||||
@apply bg-gray-50 text-gray-900 overflow-hidden;
|
@apply bg-gray-50 text-gray-900;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup default transitions for elements */
|
/* Setup default transitions for elements */
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
import { StrictMode } from 'react';
|
import {StrictMode} from 'react';
|
||||||
import { createRoot } from 'react-dom/client';
|
import {createRoot} from 'react-dom/client';
|
||||||
import { attachConsole } from 'tauri-plugin-log-api';
|
import {attachConsole} from 'tauri-plugin-log-api';
|
||||||
import { App } from './components/App';
|
import {App} from './components/App';
|
||||||
import { maybeRestorePathname } from './lib/persistPathname';
|
import {maybeRestorePathname} from './lib/persistPathname';
|
||||||
import './main.css';
|
import './main.css';
|
||||||
import { getSettings } from './lib/store';
|
import {getSettings} from './lib/store';
|
||||||
import type { Appearance } from './lib/theme/window';
|
import type {Appearance} from './lib/theme/window';
|
||||||
import { setAppearanceOnDocument } from './lib/theme/window';
|
import {setAppearanceOnDocument} from './lib/theme/window';
|
||||||
|
import {appWindow} from "@tauri-apps/api/window";
|
||||||
|
|
||||||
|
// Hide decorations here because it doesn't work in Rust for some reason (bug?)
|
||||||
|
await appWindow.setDecorations(false);
|
||||||
|
|
||||||
await attachConsole();
|
await attachConsole();
|
||||||
await maybeRestorePathname();
|
await maybeRestorePathname();
|
||||||
@@ -15,12 +19,12 @@ const settings = await getSettings();
|
|||||||
setAppearanceOnDocument(settings.appearance as Appearance);
|
setAppearanceOnDocument(settings.appearance as Appearance);
|
||||||
|
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
// Don't go back in history on backspace
|
// Don't go back in history on backspace
|
||||||
if (e.key === 'Backspace') e.preventDefault();
|
if (e.key === 'Backspace') e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
createRoot(document.getElementById('root') as HTMLElement).render(
|
createRoot(document.getElementById('root') as HTMLElement).render(
|
||||||
<StrictMode>
|
<StrictMode>
|
||||||
<App />
|
<App/>
|
||||||
</StrictMode>,
|
</StrictMode>,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user