From 0b88ec9a5caced919d87400be0aa23043618fd61 Mon Sep 17 00:00:00 2001 From: phenomen Date: Thu, 21 Nov 2024 21:56:24 -0600 Subject: [PATCH] Fixed fullscreen bug; Removed unused plugins --- package-lock.json | 46 +++--------- package.json | 6 +- src-tauri/Cargo.lock | 51 +------------ src-tauri/Cargo.toml | 3 +- src-tauri/capabilities/default.json | 38 +++++----- src-tauri/gen/schemas/capabilities.json | 2 +- src-tauri/gen/schemas/desktop-schema.json | 85 ---------------------- src-tauri/gen/schemas/windows-schema.json | 85 ---------------------- src-tauri/src/lib.rs | 1 - src-tauri/tauri.conf.json | 2 +- src/lib/components/ui/sonner/index.ts | 1 - src/lib/components/ui/sonner/sonner.svelte | 20 ----- src/lib/scripts/shortcuts.svelte.ts | 7 +- 13 files changed, 38 insertions(+), 309 deletions(-) delete mode 100644 src/lib/components/ui/sonner/index.ts delete mode 100644 src/lib/components/ui/sonner/sonner.svelte diff --git a/package-lock.json b/package-lock.json index c2d45fd..3581ac4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flc", - "version": "6.0.0", + "version": "6.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "flc", - "version": "6.0.0", + "version": "6.4.0", "license": "MIT", "dependencies": { "@fontsource-variable/inter": "^5.1.0" @@ -20,7 +20,6 @@ "@tauri-apps/plugin-dialog": "^2.0.1", "@tauri-apps/plugin-global-shortcut": "^2.0.0", "@tauri-apps/plugin-http": "^2.0.1", - "@tauri-apps/plugin-os": "^2.0.0", "@tauri-apps/plugin-shell": "^2.0.1", "@tauri-apps/plugin-updater": "^2.0.0", "@types/eslint": "^9.6.1", @@ -34,10 +33,9 @@ "lucide-svelte": "^0.460.1", "mode-watcher": "^0.5.0", "prettier": "^3.3.3", - "prettier-plugin-svelte": "^3.3.0", + "prettier-plugin-svelte": "^3.3.1", "svelte": "^5.2.7", "svelte-check": "^4.0.9", - "svelte-sonner": "^0.3.28", "tailwind-merge": "^2.5.4", "tailwind-variants": "^0.3.0", "tailwindcss": "^3.4.15", @@ -705,9 +703,9 @@ } }, "node_modules/@internationalized/date": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.5.6.tgz", - "integrity": "sha512-jLxQjefH9VI5P9UQuqB6qNKnvFt1Ky1TPIzHGsIlCi7sZZoMR8SdYbBGRvM0y+Jtb+ez4ieBzmiAUcpmPYpyOw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.6.0.tgz", + "integrity": "sha512-+z6ti+CcJnRlLHok/emGEsWQhe7kfSmEW+/6qCzvKY67YPh7YOBfvc7+/+NXq+zJlbArg30tYpqLjNgcAYv2YQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1426,16 +1424,6 @@ "@tauri-apps/api": "^2.0.0" } }, - "node_modules/@tauri-apps/plugin-os": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-os/-/plugin-os-2.0.0.tgz", - "integrity": "sha512-M7hG/nNyQYTJxVG/UhTKhp9mpXriwWzrs9mqDreB8mIgqA3ek5nHLdwRZJWhkKjZrnDT4v9CpA9BhYeplTlAiA==", - "dev": true, - "license": "MIT OR Apache-2.0", - "dependencies": { - "@tauri-apps/api": "^2.0.0" - } - }, "node_modules/@tauri-apps/plugin-shell": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.0.1.tgz", @@ -2209,9 +2197,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.63", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.63.tgz", - "integrity": "sha512-ddeXKuY9BHo/mw145axlyWjlJ1UBt4WK3AlvkT7W2AbqfRQoacVoRUCF6wL3uIx/8wT9oLKXzI+rFqHHscByaA==", + "version": "1.5.64", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.64.tgz", + "integrity": "sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==", "dev": true, "license": "ISC" }, @@ -3690,9 +3678,9 @@ } }, "node_modules/prettier-plugin-svelte": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.3.0.tgz", - "integrity": "sha512-iNoYiQUx4zwqbQDW/bk0WR75w+QiY4fHJQpGQ5v8Yr7X5m7YoSvs2buUnhoYFXNAL32ULVmrjPSc0vVOHJsO0Q==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.3.1.tgz", + "integrity": "sha512-AIKwXYBGm+f0l0DUcQRWjeQj8xm1cVBIZGshvlfiCuesEfueF1TGqz88NP0cr95Ar7Xvt0Ef7h9LFzGdkHr+gA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -4267,16 +4255,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/svelte-sonner": { - "version": "0.3.28", - "resolved": "https://registry.npmjs.org/svelte-sonner/-/svelte-sonner-0.3.28.tgz", - "integrity": "sha512-K3AmlySeFifF/cKgsYNv5uXqMVNln0NBAacOYgmkQStLa/UoU0LhfAACU6Gr+YYC8bOCHdVmFNoKuDbMEsppJg==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "svelte": "^3.0.0 || ^4.0.0 || ^5.0.0-next.1" - } - }, "node_modules/svelte-toolbelt": { "version": "0.4.6", "resolved": "https://registry.npmjs.org/svelte-toolbelt/-/svelte-toolbelt-0.4.6.tgz", diff --git a/package.json b/package.json index 015f883..6659735 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flc", - "version": "6.3.0", + "version": "6.4.0", "description": "Foundry Lightweight Client", "type": "module", "scripts": { @@ -25,7 +25,6 @@ "@tauri-apps/plugin-dialog": "^2.0.1", "@tauri-apps/plugin-global-shortcut": "^2.0.0", "@tauri-apps/plugin-http": "^2.0.1", - "@tauri-apps/plugin-os": "^2.0.0", "@tauri-apps/plugin-shell": "^2.0.1", "@tauri-apps/plugin-updater": "^2.0.0", "@types/eslint": "^9.6.1", @@ -39,10 +38,9 @@ "lucide-svelte": "^0.460.1", "mode-watcher": "^0.5.0", "prettier": "^3.3.3", - "prettier-plugin-svelte": "^3.3.0", + "prettier-plugin-svelte": "^3.3.1", "svelte": "^5.2.7", "svelte-check": "^4.0.9", - "svelte-sonner": "^0.3.28", "tailwind-merge": "^2.5.4", "tailwind-variants": "^0.3.0", "tailwindcss": "^3.4.15", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 4b1c4a9..c696477 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -975,7 +975,7 @@ dependencies = [ [[package]] name = "flc" -version = "6.2.0" +version = "6.4.0" dependencies = [ "serde", "serde_json", @@ -984,7 +984,6 @@ dependencies = [ "tauri-plugin-dialog", "tauri-plugin-global-shortcut", "tauri-plugin-http", - "tauri-plugin-os", "tauri-plugin-shell", "tauri-plugin-updater", ] @@ -1231,16 +1230,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30" -dependencies = [ - "rustix", - "windows-targets 0.52.6", -] - [[package]] name = "getrandom" version = "0.1.16" @@ -2523,17 +2512,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "os_info" -version = "3.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" -dependencies = [ - "log", - "serde", - "windows-sys 0.52.0", -] - [[package]] name = "os_pipe" version = "1.2.1" @@ -3732,15 +3710,6 @@ dependencies = [ "syn 2.0.87", ] -[[package]] -name = "sys-locale" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" -dependencies = [ - "libc", -] - [[package]] name = "system-configuration" version = "0.6.1" @@ -4048,24 +4017,6 @@ dependencies = [ "urlpattern", ] -[[package]] -name = "tauri-plugin-os" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc5f23a86f37687c7f4fecfdc706b279087bc44f7a46702f7307ff1551ee03a" -dependencies = [ - "gethostname", - "log", - "os_info", - "serde", - "serde_json", - "serialize-to-javascript", - "sys-locale", - "tauri", - "tauri-plugin", - "thiserror 1.0.69", -] - [[package]] name = "tauri-plugin-shell" version = "2.0.2" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index d9abd75..ba57cdf 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flc" -version = "6.3.0" +version = "6.4.0" description = "Foundry Lightweight Client" authors = ["phenomen"] license = "MIT" @@ -35,7 +35,6 @@ serde = { version = "1", features = ["derive"] } serde_json = "1" tauri-plugin-dialog = "2" tauri-plugin-http = "2" -tauri-plugin-os = "2" [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] tauri-plugin-global-shortcut = "2" diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 2633e89..53bb3d8 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -11,35 +11,34 @@ "linux" ], "permissions": [ - "core:default", - "core:window:default", - "core:webview:default", - "dialog:default", - "http:default", - "os:default", - "shell:default", - "shell:allow-open", - "shell:allow-spawn", - "shell:allow-kill", - "updater:default", - "updater:allow-check", - "updater:allow-download", - "updater:allow-install", - "updater:allow-download-and-install", - "global-shortcut:allow-register", - "core:app:allow-default-window-icon", "core:app:allow-set-app-theme", + "core:default", "core:webview:allow-create-webview-window", "core:webview:allow-create-webview", "core:webview:allow-set-webview-focus", "core:webview:allow-set-webview-size", "core:webview:allow-set-webview-zoom", + "core:webview:default", "core:window:allow-close", "core:window:allow-create", - "core:window:allow-is-fullscreen", "core:window:allow-is-focused", + "core:window:allow-is-fullscreen", "core:window:allow-set-focus", "core:window:allow-set-fullscreen", + "core:window:default", + "dialog:default", + "global-shortcut:allow-register", + "global-shortcut:default", + "http:default", + "shell:allow-kill", + "shell:allow-open", + "shell:allow-spawn", + "shell:default", + "updater:allow-check", + "updater:allow-download-and-install", + "updater:allow-download", + "updater:allow-install", + "updater:default", { "identifier": "http:default", "allow": [ @@ -61,7 +60,6 @@ } ], "sidecar": false - }, - "global-shortcut:default" + } ] } \ No newline at end of file diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json index d388593..4871687 100644 --- a/src-tauri/gen/schemas/capabilities.json +++ b/src-tauri/gen/schemas/capabilities.json @@ -1 +1 @@ -{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"permissions":["core:default","core:window:default","core:webview:default","dialog:default","http:default","os:default","shell:default","shell:allow-open","shell:allow-spawn","shell:allow-kill","updater:default","updater:allow-check","updater:allow-download","updater:allow-install","updater:allow-download-and-install","global-shortcut:allow-register","core:app:allow-default-window-icon","core:app:allow-set-app-theme","core:webview:allow-create-webview-window","core:webview:allow-create-webview","core:webview:allow-set-webview-focus","core:webview:allow-set-webview-size","core:webview:allow-set-webview-zoom","core:window:allow-close","core:window:allow-create","core:window:allow-is-fullscreen","core:window:allow-is-focused","core:window:allow-set-focus","core:window:allow-set-fullscreen",{"identifier":"http:default","allow":[{"url":"https://*:*"},{"url":"http://*:*"}]},{"identifier":"shell:allow-spawn","allow":[{"args":true,"cmd":"node","name":"node"}]},"global-shortcut:default"],"platforms":["macOS","windows","linux"]}} \ No newline at end of file +{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"permissions":["core:app:allow-set-app-theme","core:default","core:webview:allow-create-webview-window","core:webview:allow-create-webview","core:webview:allow-set-webview-focus","core:webview:allow-set-webview-size","core:webview:allow-set-webview-zoom","core:webview:default","core:window:allow-close","core:window:allow-create","core:window:allow-is-focused","core:window:allow-is-fullscreen","core:window:allow-set-focus","core:window:allow-set-fullscreen","core:window:default","dialog:default","global-shortcut:allow-register","global-shortcut:default","http:default","shell:allow-kill","shell:allow-open","shell:allow-spawn","shell:default","updater:allow-check","updater:allow-download-and-install","updater:allow-download","updater:allow-install","updater:default",{"identifier":"http:default","allow":[{"url":"https://*:*"},{"url":"http://*:*"}]},{"identifier":"shell:allow-spawn","allow":[{"args":true,"cmd":"node","name":"node"}]}],"platforms":["macOS","windows","linux"]}} \ No newline at end of file diff --git a/src-tauri/gen/schemas/desktop-schema.json b/src-tauri/gen/schemas/desktop-schema.json index 46d8b98..0938d0b 100644 --- a/src-tauri/gen/schemas/desktop-schema.json +++ b/src-tauri/gen/schemas/desktop-schema.json @@ -2127,91 +2127,6 @@ "type": "string", "const": "http:deny-fetch-send" }, - { - "description": "This permission set configures which\noperating system information are available\nto gather from the frontend.\n\n#### Granted Permissions\n\nAll information except the host name are available.\n\n", - "type": "string", - "const": "os:default" - }, - { - "description": "Enables the arch command without any pre-configured scope.", - "type": "string", - "const": "os:allow-arch" - }, - { - "description": "Enables the exe_extension command without any pre-configured scope.", - "type": "string", - "const": "os:allow-exe-extension" - }, - { - "description": "Enables the family command without any pre-configured scope.", - "type": "string", - "const": "os:allow-family" - }, - { - "description": "Enables the hostname command without any pre-configured scope.", - "type": "string", - "const": "os:allow-hostname" - }, - { - "description": "Enables the locale command without any pre-configured scope.", - "type": "string", - "const": "os:allow-locale" - }, - { - "description": "Enables the os_type command without any pre-configured scope.", - "type": "string", - "const": "os:allow-os-type" - }, - { - "description": "Enables the platform command without any pre-configured scope.", - "type": "string", - "const": "os:allow-platform" - }, - { - "description": "Enables the version command without any pre-configured scope.", - "type": "string", - "const": "os:allow-version" - }, - { - "description": "Denies the arch command without any pre-configured scope.", - "type": "string", - "const": "os:deny-arch" - }, - { - "description": "Denies the exe_extension command without any pre-configured scope.", - "type": "string", - "const": "os:deny-exe-extension" - }, - { - "description": "Denies the family command without any pre-configured scope.", - "type": "string", - "const": "os:deny-family" - }, - { - "description": "Denies the hostname command without any pre-configured scope.", - "type": "string", - "const": "os:deny-hostname" - }, - { - "description": "Denies the locale command without any pre-configured scope.", - "type": "string", - "const": "os:deny-locale" - }, - { - "description": "Denies the os_type command without any pre-configured scope.", - "type": "string", - "const": "os:deny-os-type" - }, - { - "description": "Denies the platform command without any pre-configured scope.", - "type": "string", - "const": "os:deny-platform" - }, - { - "description": "Denies the version command without any pre-configured scope.", - "type": "string", - "const": "os:deny-version" - }, { "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality without any specific\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n", "type": "string", diff --git a/src-tauri/gen/schemas/windows-schema.json b/src-tauri/gen/schemas/windows-schema.json index 46d8b98..0938d0b 100644 --- a/src-tauri/gen/schemas/windows-schema.json +++ b/src-tauri/gen/schemas/windows-schema.json @@ -2127,91 +2127,6 @@ "type": "string", "const": "http:deny-fetch-send" }, - { - "description": "This permission set configures which\noperating system information are available\nto gather from the frontend.\n\n#### Granted Permissions\n\nAll information except the host name are available.\n\n", - "type": "string", - "const": "os:default" - }, - { - "description": "Enables the arch command without any pre-configured scope.", - "type": "string", - "const": "os:allow-arch" - }, - { - "description": "Enables the exe_extension command without any pre-configured scope.", - "type": "string", - "const": "os:allow-exe-extension" - }, - { - "description": "Enables the family command without any pre-configured scope.", - "type": "string", - "const": "os:allow-family" - }, - { - "description": "Enables the hostname command without any pre-configured scope.", - "type": "string", - "const": "os:allow-hostname" - }, - { - "description": "Enables the locale command without any pre-configured scope.", - "type": "string", - "const": "os:allow-locale" - }, - { - "description": "Enables the os_type command without any pre-configured scope.", - "type": "string", - "const": "os:allow-os-type" - }, - { - "description": "Enables the platform command without any pre-configured scope.", - "type": "string", - "const": "os:allow-platform" - }, - { - "description": "Enables the version command without any pre-configured scope.", - "type": "string", - "const": "os:allow-version" - }, - { - "description": "Denies the arch command without any pre-configured scope.", - "type": "string", - "const": "os:deny-arch" - }, - { - "description": "Denies the exe_extension command without any pre-configured scope.", - "type": "string", - "const": "os:deny-exe-extension" - }, - { - "description": "Denies the family command without any pre-configured scope.", - "type": "string", - "const": "os:deny-family" - }, - { - "description": "Denies the hostname command without any pre-configured scope.", - "type": "string", - "const": "os:deny-hostname" - }, - { - "description": "Denies the locale command without any pre-configured scope.", - "type": "string", - "const": "os:deny-locale" - }, - { - "description": "Denies the os_type command without any pre-configured scope.", - "type": "string", - "const": "os:deny-os-type" - }, - { - "description": "Denies the platform command without any pre-configured scope.", - "type": "string", - "const": "os:deny-platform" - }, - { - "description": "Denies the version command without any pre-configured scope.", - "type": "string", - "const": "os:deny-version" - }, { "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality without any specific\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n", "type": "string", diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index efbdf7a..dab8c27 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -8,7 +8,6 @@ fn greet(name: &str) -> String { pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_global_shortcut::Builder::new().build()) - .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_http::init()) .plugin(tauri_plugin_dialog::init()) .plugin(tauri_plugin_updater::Builder::new().build()) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index ec50a8d..2ad0f97 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "FLC", - "version": "6.3.0", + "version": "6.4.0", "identifier": "com.phenomen.flc", "build": { "beforeDevCommand": "npm run dev", diff --git a/src/lib/components/ui/sonner/index.ts b/src/lib/components/ui/sonner/index.ts deleted file mode 100644 index 1ad9f4a..0000000 --- a/src/lib/components/ui/sonner/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as Toaster } from "./sonner.svelte"; diff --git a/src/lib/components/ui/sonner/sonner.svelte b/src/lib/components/ui/sonner/sonner.svelte deleted file mode 100644 index 8050e04..0000000 --- a/src/lib/components/ui/sonner/sonner.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/src/lib/scripts/shortcuts.svelte.ts b/src/lib/scripts/shortcuts.svelte.ts index 9fbf093..5e43544 100644 --- a/src/lib/scripts/shortcuts.svelte.ts +++ b/src/lib/scripts/shortcuts.svelte.ts @@ -6,11 +6,8 @@ export async function toggleFullscreen() { const foundryWindows = windows.filter((window) => window.label.includes("foundry")); for (const window of foundryWindows) { - const focused = await window.isFocused(); - if (focused) { - const fullscreen = await window.isFullscreen(); - await window.setFullscreen(!fullscreen); - } + const fullscreen = await window.isFullscreen(); + await window.setFullscreen(!fullscreen); } }