Upgrade tauri to v2

This commit is contained in:
Krishan
2025-09-07 13:11:25 +00:00
parent 9560e17823
commit 943e569193
15 changed files with 16970 additions and 1420 deletions

208
package-lock.json generated
View File

@@ -9,11 +9,21 @@
"version": "4.8.1",
"license": "AGPL-3.0-only",
"dependencies": {
"@tauri-apps/api": "1.6.0"
"@tauri-apps/api": "2.7.0",
"@tauri-apps/plugin-clipboard-manager": "2.3.0",
"@tauri-apps/plugin-dialog": "2.3.2",
"@tauri-apps/plugin-fs": "2.4.1",
"@tauri-apps/plugin-global-shortcut": "2.3.0",
"@tauri-apps/plugin-http": "2.5.1",
"@tauri-apps/plugin-notification": "2.3.0",
"@tauri-apps/plugin-os": "2.3.0",
"@tauri-apps/plugin-process": "2.3.0",
"@tauri-apps/plugin-shell": "2.3.0",
"@tauri-apps/plugin-updater": "2.9.0"
},
"devDependencies": {
"@actions/github": "6.0.0",
"@tauri-apps/cli": "1.6.2",
"@tauri-apps/cli": "2.7.1",
"node-fetch": "3.3.2"
},
"engines": {
@@ -182,23 +192,18 @@
}
},
"node_modules/@tauri-apps/api": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.6.0.tgz",
"integrity": "sha512-rqI++FWClU5I2UBp4HXFvl+sBWkdigBkxnpJDQUWttNyG7IZP4FwQGhTNL5EOw0vI8i6eSAJ5frLqO7n7jbJdg==",
"engines": {
"node": ">= 14.6.0",
"npm": ">= 6.6.0",
"yarn": ">= 1.19.1"
},
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.7.0.tgz",
"integrity": "sha512-v7fVE8jqBl8xJFOcBafDzXFc8FnicoH3j8o8DNNs0tHuEBmXUDqrCOAzMRX0UkfpwqZLqvrvK0GNQ45DfnoVDg==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/tauri"
}
},
"node_modules/@tauri-apps/cli": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.6.2.tgz",
"integrity": "sha512-zpfZdxhm20s7d/Uejpg/T3a9sqLVe3Ih2ztINfy8v6iLw9Ohowkb9g+agZffYKlEWfOSpmCy69NFyBLj7OZL0A==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.7.1.tgz",
"integrity": "sha512-RcGWR4jOUEl92w3uvI0h61Llkfj9lwGD1iwvDRD2isMrDhOzjeeeVn9aGzeW1jubQ/kAbMYfydcA4BA0Cy733Q==",
"dev": true,
"bin": {
"tauri": "tauri.js"
@@ -211,22 +216,23 @@
"url": "https://opencollective.com/tauri"
},
"optionalDependencies": {
"@tauri-apps/cli-darwin-arm64": "1.6.2",
"@tauri-apps/cli-darwin-x64": "1.6.2",
"@tauri-apps/cli-linux-arm-gnueabihf": "1.6.2",
"@tauri-apps/cli-linux-arm64-gnu": "1.6.2",
"@tauri-apps/cli-linux-arm64-musl": "1.6.2",
"@tauri-apps/cli-linux-x64-gnu": "1.6.2",
"@tauri-apps/cli-linux-x64-musl": "1.6.2",
"@tauri-apps/cli-win32-arm64-msvc": "1.6.2",
"@tauri-apps/cli-win32-ia32-msvc": "1.6.2",
"@tauri-apps/cli-win32-x64-msvc": "1.6.2"
"@tauri-apps/cli-darwin-arm64": "2.7.1",
"@tauri-apps/cli-darwin-x64": "2.7.1",
"@tauri-apps/cli-linux-arm-gnueabihf": "2.7.1",
"@tauri-apps/cli-linux-arm64-gnu": "2.7.1",
"@tauri-apps/cli-linux-arm64-musl": "2.7.1",
"@tauri-apps/cli-linux-riscv64-gnu": "2.7.1",
"@tauri-apps/cli-linux-x64-gnu": "2.7.1",
"@tauri-apps/cli-linux-x64-musl": "2.7.1",
"@tauri-apps/cli-win32-arm64-msvc": "2.7.1",
"@tauri-apps/cli-win32-ia32-msvc": "2.7.1",
"@tauri-apps/cli-win32-x64-msvc": "2.7.1"
}
},
"node_modules/@tauri-apps/cli-darwin-arm64": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.6.2.tgz",
"integrity": "sha512-6mdRyf9DaLqlZvj8kZB09U3rwY+dOHSGzTZ7+GDg665GJb17f4cb30e8dExj6/aghcsOie9EGpgiURcDUvLNSQ==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.7.1.tgz",
"integrity": "sha512-j2NXQN6+08G03xYiyKDKqbCV2Txt+hUKg0a8hYr92AmoCU8fgCjHyva/p16lGFGUG3P2Yu0xiNe1hXL9ZuRMzA==",
"cpu": [
"arm64"
],
@@ -240,9 +246,9 @@
}
},
"node_modules/@tauri-apps/cli-darwin-x64": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.6.2.tgz",
"integrity": "sha512-PLxZY5dn38H3R9VRmBN/l0ZDB5JFanCwlK4rmpzDQPPg3tQmbu5vjSCP6TVj5U6aLKsj79kFyULblPr5Dn9+vw==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.7.1.tgz",
"integrity": "sha512-CdYAefeM35zKsc91qIyKzbaO7FhzTyWKsE8hj7tEJ1INYpoh1NeNNyL/NSEA3Nebi5ilugioJ5tRK8ZXG8y3gw==",
"cpu": [
"x64"
],
@@ -256,9 +262,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.6.2.tgz",
"integrity": "sha512-xnpj4BLeeGOh5I/ewCQlYJZwHH0CBNBN+4q8BNWNQ9MKkjN9ST366RmHRzl2ANNgWwijOPxyce7GiUmvuH8Atw==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.7.1.tgz",
"integrity": "sha512-dnvyJrTA1UJxJjQ8q1N/gWomjP8Twij1BUQu2fdcT3OPpqlrbOk5R1yT0oD/721xoKNjroB5BXCsmmlykllxNg==",
"cpu": [
"arm"
],
@@ -272,9 +278,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-arm64-gnu": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.6.2.tgz",
"integrity": "sha512-uaiRE0vE2P+tdsCngfKt+7yKr3VZXIq/t3w01DzSdnBgHSp0zmRsRR4AhZt7ibvoEgA8GzBP+eSHJdFNZsTU9w==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.7.1.tgz",
"integrity": "sha512-FtBW6LJPNRTws3qyUc294AqCWU91l/H0SsFKq6q4Q45MSS4x6wxLxou8zB53tLDGEPx3JSoPLcDaSfPlSbyujQ==",
"cpu": [
"arm64"
],
@@ -288,9 +294,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-arm64-musl": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.6.2.tgz",
"integrity": "sha512-o9JunVrMrhqTBLrdvEbS64W0bo1dPm0lxX51Mx+6x9SmbDjlEWGgaAHC3iKLK9khd5Yu1uO1e+8TJltAcScvmw==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.7.1.tgz",
"integrity": "sha512-/HXY0t4FHkpFzjeYS5c16mlA6z0kzn5uKLWptTLTdFSnYpr8FCnOP4Sdkvm2TDQPF2ERxXtNCd+WR/jQugbGnA==",
"cpu": [
"arm64"
],
@@ -303,10 +309,26 @@
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-linux-riscv64-gnu": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.7.1.tgz",
"integrity": "sha512-GeW5lVI2GhhnaYckiDzstG2j2Jwlud5d2XefRGwlOK+C/bVGLT1le8MNPYK8wgRlpeK8fG1WnJJYD6Ke7YQ8bg==",
"cpu": [
"riscv64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@tauri-apps/cli-linux-x64-gnu": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.6.2.tgz",
"integrity": "sha512-jL9f+o61DdQmNYKIt2Q3BA8YJ+hyC5+GdNxqDf7j5SoQ85j//YfUWbmp9ZgsPHVBxgSGZVvgGMNvf64Ykp0buQ==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.7.1.tgz",
"integrity": "sha512-DprxKQkPxIPYwUgg+cscpv2lcIUhn2nxEPlk0UeaiV9vATxCXyytxr1gLcj3xgjGyNPlM0MlJyYaPy1JmRg1cA==",
"cpu": [
"x64"
],
@@ -320,9 +342,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-x64-musl": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.6.2.tgz",
"integrity": "sha512-xsa4Pu9YMHKAX0J8pIoXfN/uhvAAAoECZDixDhWw8zi57VZ4QX28ycqolS+NscdD9NAGSgHk45MpBZWdvRtvjQ==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.7.1.tgz",
"integrity": "sha512-KLlq3kOK7OUyDR757c0zQjPULpGZpLhNB0lZmZpHXvoOUcqZoCXJHh4dT/mryWZJp5ilrem5l8o9ngrDo0X1AA==",
"cpu": [
"x64"
],
@@ -336,9 +358,9 @@
}
},
"node_modules/@tauri-apps/cli-win32-arm64-msvc": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.6.2.tgz",
"integrity": "sha512-eJtUOx2UFhJpCCkm5M5+4Co9JbjvgIHTdyS/hTSZfOEdT58CNEGVJXMA39FsSZXYoxYPE+9K7Km6haMozSmlxw==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.7.1.tgz",
"integrity": "sha512-dH7KUjKkSypCeWPiainHyXoES3obS+JIZVoSwSZfKq2gWgs48FY3oT0hQNYrWveE+VR4VoR3b/F3CPGbgFvksA==",
"cpu": [
"arm64"
],
@@ -352,9 +374,9 @@
}
},
"node_modules/@tauri-apps/cli-win32-ia32-msvc": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.6.2.tgz",
"integrity": "sha512-9Jwx3PrhNw3VKOgPISRRXPkvoEAZP+7rFRHXIo49dvlHy2E/o9qpWi1IntE33HWeazP6KhvsCjvXB2Ai4eGooA==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.7.1.tgz",
"integrity": "sha512-1oeibfyWQPVcijOrTg709qhbXArjX3x1MPjrmA5anlygwrbByxLBcLXvotcOeULFcnH2FYUMMLLant8kgvwE5A==",
"cpu": [
"ia32"
],
@@ -368,9 +390,9 @@
}
},
"node_modules/@tauri-apps/cli-win32-x64-msvc": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.6.2.tgz",
"integrity": "sha512-5Z+ZjRFJE8MXghJe1UXvGephY5ZcgVhiTI9yuMi9xgX3CEaAXASatyXllzsvGJ9EDaWMEpa0PHjAzi7LBAWROw==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.7.1.tgz",
"integrity": "sha512-D7Q9kDObutuirCNLxYQ7KAg2Xxg99AjcdYz/KuMw5HvyEPbkC9Q7JL0vOrQOrHEHxIQ2lYzFOZvKKoC2yyqXcg==",
"cpu": [
"x64"
],
@@ -383,6 +405,86 @@
"node": ">= 10"
}
},
"node_modules/@tauri-apps/plugin-clipboard-manager": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-clipboard-manager/-/plugin-clipboard-manager-2.3.0.tgz",
"integrity": "sha512-81NOBA2P+OTY8RLkBwyl9ZR/0CeggLub4F6zxcxUIfFOAqtky7J61+K/MkH2SC1FMxNBxrX0swDuKvkjkHadlA==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-dialog": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.3.2.tgz",
"integrity": "sha512-cNLo9YeQSC0MF4IgXnotHsqEgJk72MBZLXmQPrLA95qTaaWiiaFQ38hIMdZ6YbGUNkr3oni3EhU+AD5jLHcdUA==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-fs": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-fs/-/plugin-fs-2.4.1.tgz",
"integrity": "sha512-vJlKZVGF3UAFGoIEVT6Oq5L4HGDCD78WmA4uhzitToqYiBKWAvZR61M6zAyQzHqLs0ADemkE4RSy/5sCmZm6ZQ==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-global-shortcut": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-global-shortcut/-/plugin-global-shortcut-2.3.0.tgz",
"integrity": "sha512-WbAz0ElhpP+0kzQZRScdCC7UQ7OPH8PAn//fsBNu7+ywihsnVSVOg1L9YhieAtLNtAlnmFI69Yl5AGaA3ge5IQ==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-http": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-http/-/plugin-http-2.5.1.tgz",
"integrity": "sha512-SpQ1azXEdQI0UB2NZTIPljJTDEe0bIaKzHYR/k4UQp6yzRYGLC/ktmIgEfQ2RvKAWus8GcYgGr5K6LJPbo/NZw==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-notification": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-notification/-/plugin-notification-2.3.0.tgz",
"integrity": "sha512-QDwXo9VzAlH97c0veuf19TZI6cRBPfJDl2O6hNEDvI66j60lOO9z+PL6MJrj8A6Y+t55r7mGhe3rQWLmOre2HA==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-os": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-os/-/plugin-os-2.3.0.tgz",
"integrity": "sha512-dm3bDsMuUngpIQdJ1jaMkMfyQpHyDcaTIKTFaAMHoKeUd+Is3UHO2uzhElr6ZZkfytIIyQtSVnCWdW2Kc58f3g==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-process": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-process/-/plugin-process-2.3.0.tgz",
"integrity": "sha512-0DNj6u+9csODiV4seSxxRbnLpeGYdojlcctCuLOCgpH9X3+ckVZIEj6H7tRQ7zqWr7kSTEWnrxtAdBb0FbtrmQ==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-shell": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.3.0.tgz",
"integrity": "sha512-6GIRxO2z64uxPX4CCTuhQzefvCC0ew7HjdBhMALiGw74vFBDY95VWueAHOHgNOMV4UOUAFupyidN9YulTe5xlA==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/@tauri-apps/plugin-updater": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-updater/-/plugin-updater-2.9.0.tgz",
"integrity": "sha512-j++sgY8XpeDvzImTrzWA08OqqGqgkNyxczLD7FjNJJx/uXxMZFz5nDcfkyoI/rCjYuj2101Tci/r/HFmOmoxCg==",
"dependencies": {
"@tauri-apps/api": "^2.6.0"
}
},
"node_modules/before-after-hook": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",

View File

@@ -14,11 +14,21 @@
"author": "Ajay Bura",
"license": "AGPL-3.0-only",
"dependencies": {
"@tauri-apps/api": "1.6.0"
"@tauri-apps/api": "2.7.0",
"@tauri-apps/plugin-clipboard-manager": "2.3.0",
"@tauri-apps/plugin-dialog": "2.3.2",
"@tauri-apps/plugin-fs": "2.4.1",
"@tauri-apps/plugin-global-shortcut": "2.3.0",
"@tauri-apps/plugin-http": "2.5.1",
"@tauri-apps/plugin-notification": "2.3.0",
"@tauri-apps/plugin-os": "2.3.0",
"@tauri-apps/plugin-process": "2.3.0",
"@tauri-apps/plugin-shell": "2.3.0",
"@tauri-apps/plugin-updater": "2.9.0"
},
"devDependencies": {
"@actions/github": "6.0.0",
"@tauri-apps/cli": "1.6.2",
"@tauri-apps/cli": "2.7.1",
"node-fetch": "3.3.2"
}
}

4097
src-tauri/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,14 +12,22 @@ edition = "2021"
rust-version = "1.61"
[build-dependencies]
tauri-build = { version = "1.5.5", features = [] }
tauri-build = { version = "2", features = [] }
[dependencies]
serde_json = "1.0.109"
serde = { version = "1.0.193", features = ["derive"] }
tauri = { version = "1.8.0", features = ["api-all", "devtools", "updater"] }
tauri-plugin-localhost = "0.1.0"
tauri-plugin-window-state = "0.1.1"
tauri = { version = "2", features = [ "devtools"] }
tauri-plugin-localhost = "2"
tauri-plugin-window-state = "2"
tauri-plugin-clipboard-manager = "2"
tauri-plugin-notification = "2"
tauri-plugin-fs = "2"
tauri-plugin-shell = "2"
tauri-plugin-http = "2"
tauri-plugin-process = "2"
tauri-plugin-os = "2"
tauri-plugin-dialog = "2"
[features]
# by default Tauri runs in production mode
@@ -28,3 +36,11 @@ default = [ "custom-protocol" ]
# this feature is used used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = [ "tauri/custom-protocol" ]
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-global-shortcut = "2"
tauri-plugin-updater = "2"
[lib]
name = "app_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

View File

@@ -0,0 +1,15 @@
{
"identifier": "desktop-capability",
"platforms": [
"macOS",
"windows",
"linux"
],
"windows": [
"main"
],
"permissions": [
"updater:default",
"global-shortcut:default"
]
}

View File

@@ -0,0 +1,82 @@
{
"identifier": "migrated",
"description": "permissions that were migrated from v1",
"local": true,
"windows": [
"main"
],
"permissions": [
"core:default",
"fs:allow-read-file",
"fs:allow-write-file",
"fs:allow-read-dir",
"fs:allow-copy-file",
"fs:allow-mkdir",
"fs:allow-remove",
"fs:allow-remove",
"fs:allow-rename",
"fs:allow-exists",
"core:window:allow-create",
"core:window:allow-center",
"core:window:allow-request-user-attention",
"core:window:allow-set-resizable",
"core:window:allow-set-maximizable",
"core:window:allow-set-minimizable",
"core:window:allow-set-closable",
"core:window:allow-set-title",
"core:window:allow-maximize",
"core:window:allow-unmaximize",
"core:window:allow-minimize",
"core:window:allow-unminimize",
"core:window:allow-show",
"core:window:allow-hide",
"core:window:allow-close",
"core:window:allow-set-decorations",
"core:window:allow-set-always-on-top",
"core:window:allow-set-content-protected",
"core:window:allow-set-size",
"core:window:allow-set-min-size",
"core:window:allow-set-max-size",
"core:window:allow-set-position",
"core:window:allow-set-fullscreen",
"core:window:allow-set-focus",
"core:window:allow-set-icon",
"core:window:allow-set-skip-taskbar",
"core:window:allow-set-cursor-grab",
"core:window:allow-set-cursor-visible",
"core:window:allow-set-cursor-icon",
"core:window:allow-set-cursor-position",
"core:window:allow-set-ignore-cursor-events",
"core:window:allow-start-dragging",
"core:webview:allow-print",
"shell:allow-execute",
"shell:allow-open",
"dialog:allow-open",
"dialog:allow-save",
"dialog:allow-message",
"dialog:allow-ask",
"dialog:allow-confirm",
"http:default",
"notification:default",
"global-shortcut:allow-is-registered",
"global-shortcut:allow-register",
"global-shortcut:allow-register-all",
"global-shortcut:allow-unregister",
"global-shortcut:allow-unregister-all",
"os:allow-platform",
"os:allow-version",
"os:allow-os-type",
"os:allow-family",
"os:allow-arch",
"os:allow-exe-extension",
"os:allow-locale",
"os:allow-hostname",
"process:allow-restart",
"process:allow-exit",
"clipboard-manager:allow-read-text",
"clipboard-manager:allow-write-text",
"core:app:allow-app-show",
"core:app:allow-app-hide",
"clipboard-manager:default"
]
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"desktop-capability":{"identifier":"desktop-capability","description":"","local":true,"windows":["main"],"permissions":["updater:default","global-shortcut:default"],"platforms":["macOS","windows","linux"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:default","fs:allow-read-file","fs:allow-write-file","fs:allow-read-dir","fs:allow-copy-file","fs:allow-mkdir","fs:allow-remove","fs:allow-remove","fs:allow-rename","fs:allow-exists","core:window:allow-create","core:window:allow-center","core:window:allow-request-user-attention","core:window:allow-set-resizable","core:window:allow-set-maximizable","core:window:allow-set-minimizable","core:window:allow-set-closable","core:window:allow-set-title","core:window:allow-maximize","core:window:allow-unmaximize","core:window:allow-minimize","core:window:allow-unminimize","core:window:allow-show","core:window:allow-hide","core:window:allow-close","core:window:allow-set-decorations","core:window:allow-set-always-on-top","core:window:allow-set-content-protected","core:window:allow-set-size","core:window:allow-set-min-size","core:window:allow-set-max-size","core:window:allow-set-position","core:window:allow-set-fullscreen","core:window:allow-set-focus","core:window:allow-set-icon","core:window:allow-set-skip-taskbar","core:window:allow-set-cursor-grab","core:window:allow-set-cursor-visible","core:window:allow-set-cursor-icon","core:window:allow-set-cursor-position","core:window:allow-set-ignore-cursor-events","core:window:allow-start-dragging","core:webview:allow-print","shell:allow-execute","shell:allow-open","dialog:allow-open","dialog:allow-save","dialog:allow-message","dialog:allow-ask","dialog:allow-confirm","http:default","notification:default","global-shortcut:allow-is-registered","global-shortcut:allow-register","global-shortcut:allow-register-all","global-shortcut:allow-unregister","global-shortcut:allow-unregister-all","os:allow-platform","os:allow-version","os:allow-os-type","os:allow-family","os:allow-arch","os:allow-exe-extension","os:allow-locale","os:allow-hostname","process:allow-restart","process:allow-exit","clipboard-manager:allow-read-text","clipboard-manager:allow-write-text","core:app:allow-app-show","core:app:allow-app-hide","clipboard-manager:default"]}}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

61
src-tauri/src/lib.rs Normal file
View File

@@ -0,0 +1,61 @@
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
// #[cfg(target_os = "macos")]
// mod menu;
// use tauri::{webview::WebviewWindowBuilder, WebviewUrl};
// fn main() {
// let port: u16 = 44548;
// let mut context = tauri::generate_context!();
// let url = format!("http://localhost:{}", port).parse().unwrap();
// let window_url = WebviewUrl::External(url);
// // context.config_mut().build.frontend_dist = WebviewWindowBuilder::Url(window_url.clone());
// // context.config_mut().build.dev_url = WebviewWindowBuilder::Url(window_url.clone());
// context.config_mut().build.frontend_dist = WebviewWindowBuilder::new(app, "Cinny", window_url.clone());
// context.config_mut().build.dev_url = WebviewWindowBuilder::new(app, "Cinny", window_url.clone());
// let builder = tauri::Builder::default();
// #[cfg(target_os = "macos")]
// let builder = builder.menu(menu::menu());
// builder
// .plugin(tauri_plugin_localhost::Builder::new(port).build())
// .plugin(tauri_plugin_window_state::Builder::default().build())
// .run(context)
// .expect("error while building tauri application")
// }
use tauri::{webview::WebviewWindowBuilder, WebviewUrl};
pub fn run() {
let port: u16 = 44548;
let context = tauri::generate_context!();
let builder = tauri::Builder::default();
#[cfg(target_os = "macos")]
let builder = builder.menu(menu::menu());
builder
.plugin(tauri_plugin_localhost::Builder::new(port).build())
.plugin(tauri_plugin_window_state::Builder::default().build())
.setup(move |app| {
let url = format!("http://localhost:{}", port).parse().unwrap();
let window_url = WebviewUrl::External(url);
WebviewWindowBuilder::new(app, "main".to_string(), window_url)
.title("Cinny")
.build()?;
Ok(())
})
.run(context)
.expect("error while running tauri application");
}

View File

@@ -1,30 +1,5 @@
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
#[cfg(target_os = "macos")]
mod menu;
use tauri::{utils::config::AppUrl, WindowUrl};
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
let port = 44548;
let mut context = tauri::generate_context!();
let url = format!("http://localhost:{}", port).parse().unwrap();
let window_url = WindowUrl::External(url);
// rewrite the config so the IPC is enabled on this URL
context.config_mut().build.dist_dir = AppUrl::Url(window_url.clone());
context.config_mut().build.dev_path = AppUrl::Url(window_url.clone());
let builder = tauri::Builder::default();
#[cfg(target_os = "macos")]
let builder = builder.menu(menu::menu());
builder
.plugin(tauri_plugin_localhost::Builder::new(port).build())
.plugin(tauri_plugin_window_state::Builder::default().build())
.run(context)
.expect("error while building tauri application")
app_lib::run();
}

View File

@@ -5,10 +5,7 @@ pub(crate) fn menu() -> Menu {
.add_submenu(Submenu::new(
"Cinny",
Menu::new()
.add_native_item(MenuItem::About(
"Cinny".to_string(),
AboutMetadata::new(),
))
.add_native_item(MenuItem::About("Cinny".to_string(), AboutMetadata::new()))
.add_native_item(MenuItem::Separator)
.add_native_item(MenuItem::Hide)
.add_native_item(MenuItem::HideOthers)
@@ -29,8 +26,7 @@ pub(crate) fn menu() -> Menu {
))
.add_submenu(Submenu::new(
"View",
Menu::new()
.add_native_item(MenuItem::EnterFullScreen),
Menu::new().add_native_item(MenuItem::EnterFullScreen),
))
.add_submenu(Submenu::new(
"Window",

View File

@@ -1,19 +1,16 @@
{
"package": {
"productName": "Cinny",
"version": "4.8.1"
},
"build": {
"distDir": "../cinny/dist",
"devPath": "http://localhost:8080",
"beforeDevCommand": "cd cinny && npm start",
"beforeBuildCommand": "cd cinny && npm run build"
},
"tauri": {
"bundle": {
"active": true,
"targets": "all",
"identifier": "in.cinny.app",
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": "",
"wix": {
"bannerPath": "wix/banner.bmp",
"dialogImagePath": "wix/dialogImage.bmp"
}
},
"icon": [
"icons/32x32.png",
"icons/128x128.png",
@@ -27,9 +24,6 @@
"category": "SocialNetworking",
"shortDescription": "Yet another matrix client",
"longDescription": "",
"deb": {
"depends": []
},
"macOS": {
"frameworks": [],
"minimumSystemVersion": "",
@@ -38,26 +32,34 @@
"providerShortName": null,
"entitlements": null
},
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": "",
"wix": {
"bannerPath": "wix/banner.bmp",
"dialogImagePath": "wix/dialogImage.bmp"
}
"linux": {
"deb": {
"depends": []
}
},
"createUpdaterArtifacts": "v1Compatible"
},
"build": {
"beforeBuildCommand": "cd cinny && npm run build",
"frontendDist": "../cinny/dist",
"beforeDevCommand": "cd cinny && npm start",
"devUrl": "http://localhost:8080"
},
"productName": "Cinny",
"mainBinaryName": "Cinny",
"version": "4.8.1",
"identifier": "in.cinny.app",
"plugins": {
"updater": {
"active": true,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE2NDc3NDBGMTAzNTk1NUYKUldSZmxUVVFEM1JIRnRuMjVRTkFOQ21lUFI5KzRMU0s4OWtBS1RNRUVCNE9LcE9GcExNZ2M2NHoK",
"endpoints": [
"https://github.com/cinnyapp/cinny-desktop/releases/download/tauri/release.json"
],
"dialog": true,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE2NDc3NDBGMTAzNTk1NUYKUldSZmxUVVFEM1JIRnRuMjVRTkFOQ21lUFI5KzRMU0s4OWtBS1RNRUVCNE9LcE9GcExNZ2M2NHoK"
]
}
},
"allowlist": {
"all": true
"app": {
"security": {
"csp": "script-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'; connect-src ipc: http://ipc.localhost"
},
"windows": [
{
@@ -67,11 +69,9 @@
"center": true,
"resizable": true,
"fullscreen": false,
"fileDropEnabled": false
}
],
"security": {
"csp": "script-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'"
"dragDropEnabled": false,
"useHttpsScheme": true
}
]
}
}