diff --git a/package-lock.json b/package-lock.json index 05ab6c60..f4dfee31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ }, "devDependencies": { "@tailwindcss/nesting": "^0.0.0-insiders.565cd3e", - "@tauri-apps/cli": "^1.5.6", + "@tauri-apps/cli": "^1.5.10", "@types/node": "^18.7.10", "@types/papaparse": "^5.3.7", "@types/parse-color": "^1.0.1", @@ -2282,9 +2282,9 @@ } }, "node_modules/@tauri-apps/cli": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.5.9.tgz", - "integrity": "sha512-knSt/9AvCTeyfC6wkyeouF9hBW/0Mzuw+5vBKEvzaGPQsfFJo1ZCp5FkdiZpGBBfnm09BhugasGRTGofzatfqQ==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.5.10.tgz", + "integrity": "sha512-8+6NJgqSXqsFAEuUERDDRWrLh24TMT4aisn1qpADvKVX4KlBAKE17KTXHI54XQFR8qLbkUFNzprU4M9PV8ighw==", "dev": true, "bin": { "tauri": "tauri.js" @@ -2297,22 +2297,22 @@ "url": "https://opencollective.com/tauri" }, "optionalDependencies": { - "@tauri-apps/cli-darwin-arm64": "1.5.9", - "@tauri-apps/cli-darwin-x64": "1.5.9", - "@tauri-apps/cli-linux-arm-gnueabihf": "1.5.9", - "@tauri-apps/cli-linux-arm64-gnu": "1.5.9", - "@tauri-apps/cli-linux-arm64-musl": "1.5.9", - "@tauri-apps/cli-linux-x64-gnu": "1.5.9", - "@tauri-apps/cli-linux-x64-musl": "1.5.9", - "@tauri-apps/cli-win32-arm64-msvc": "1.5.9", - "@tauri-apps/cli-win32-ia32-msvc": "1.5.9", - "@tauri-apps/cli-win32-x64-msvc": "1.5.9" + "@tauri-apps/cli-darwin-arm64": "1.5.10", + "@tauri-apps/cli-darwin-x64": "1.5.10", + "@tauri-apps/cli-linux-arm-gnueabihf": "1.5.10", + "@tauri-apps/cli-linux-arm64-gnu": "1.5.10", + "@tauri-apps/cli-linux-arm64-musl": "1.5.10", + "@tauri-apps/cli-linux-x64-gnu": "1.5.10", + "@tauri-apps/cli-linux-x64-musl": "1.5.10", + "@tauri-apps/cli-win32-arm64-msvc": "1.5.10", + "@tauri-apps/cli-win32-ia32-msvc": "1.5.10", + "@tauri-apps/cli-win32-x64-msvc": "1.5.10" } }, "node_modules/@tauri-apps/cli-darwin-arm64": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.9.tgz", - "integrity": "sha512-7C2Jf8f0gzv778mLYb7Eszqqv1bm9Wzews81MRTqKrUIcC+eZEtDXLex+JaEkEzFEUrgIafdOvMBVEavF030IA==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.10.tgz", + "integrity": "sha512-8dqHaGFKFUEMv3CfEyRP0Ebq28X4Oz74bdi393nBZVqbZM8SN6JdB7kXNb3o3W1TMNSu0M71e6x06YvXSNWvXQ==", "cpu": [ "arm64" ], @@ -2326,9 +2326,9 @@ } }, "node_modules/@tauri-apps/cli-darwin-x64": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.5.9.tgz", - "integrity": "sha512-LHKytpkofPYgH8RShWvwDa3hD1ws131x7g7zNasJPfOiCWLqYVQFUuQVmjEUt8+dpHe/P/err5h4z+YZru2d0A==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.5.10.tgz", + "integrity": "sha512-qb/9H2FgGRAZPlPj5ingwgpI9B1BUWBUjJpjP+XzSkgjfSQVs3mbdCFz+knGIfrbpw/rBfdOt9BM7biWqIml3Q==", "cpu": [ "x64" ], @@ -2342,9 +2342,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.5.9.tgz", - "integrity": "sha512-teGK20IYKx+dVn8wFq/Lg57Q9ce7foq1KHSfyHi464LVt1T0V1rsmULSgZpQPPj/NYPF5BG78PcWYv64yH86jw==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.5.10.tgz", + "integrity": "sha512-iYwfKHGQU0Ezvj5OOhILDiv9VSNm3oouctsvUC4ygOLhpVKXDqQ6nQwJzUZey1KjpBPeM7spOOEYZYxNUgAdZA==", "cpu": [ "arm" ], @@ -2358,9 +2358,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm64-gnu": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.5.9.tgz", - "integrity": "sha512-onJ/DW5Crw38qVx+wquY4uBbfCxVhzhdJmlCYqnYyXsZZmSiPUfSyhV58y+5TYB0q1hG8eYdB5x8VAwzByhGzw==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.5.10.tgz", + "integrity": "sha512-kz4tI6Rr8wRuSVrDYpT6mAzHDW/rwPosb2wGatnhKRPb5v9LGPAZflUUUj+AAXnyl6XmD86Rbu7ekkm9BGm1Vw==", "cpu": [ "arm64" ], @@ -2374,9 +2374,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm64-musl": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.9.tgz", - "integrity": "sha512-23AYoLD3acakLp9NtheKQDJl8F66eTOflxoPzdJNRy13hUSxb+W9qpz4rRA+CIzkjICFvO2i3UWjeV9QwDVpsQ==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.10.tgz", + "integrity": "sha512-HswFaeTplIVY6YSjx+awXfLqB4zwzW3D/8WpmxHY3kyxaE4VnXBhKT86YnlA+qX0qZxgsYr0L0EXxk940lHtKQ==", "cpu": [ "arm64" ], @@ -2390,9 +2390,9 @@ } }, "node_modules/@tauri-apps/cli-linux-x64-gnu": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.5.9.tgz", - "integrity": "sha512-9PQA1rE7gh41W2ylyKd5qOGOds55ymaYPml9KOpM0g+cxmCXa+8Wf9K5NKvACnJldJJ6cekWzIyB4eN6o5T+yQ==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.5.10.tgz", + "integrity": "sha512-sOh7slboFQxJCBH5QFNe1Iw3JF2GPWYsq2TlQ6T8GgFh/cb13bK/a1TJG/gOrsRA7/pkIweaSufjpKpPBzAoGQ==", "cpu": [ "x64" ], @@ -2406,9 +2406,9 @@ } }, "node_modules/@tauri-apps/cli-linux-x64-musl": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.9.tgz", - "integrity": "sha512-5hdbNFeDsrJ/pXZ4cSQV4bJwUXPPxXxN3/pAtNUqIph7q+vLcBXOXIMoS64iuyaluJC59lhEwlWZFz+EPv0Hqg==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.10.tgz", + "integrity": "sha512-fbTZa3Q01ttIKg6s9rhWGRfdOI23zIPa6loVz6YafHAzr3WLLEXSuG2fI/+01TdX9xdr6glttu8j3H5xE5oDgw==", "cpu": [ "x64" ], @@ -2422,9 +2422,9 @@ } }, "node_modules/@tauri-apps/cli-win32-arm64-msvc": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.5.9.tgz", - "integrity": "sha512-O18JufjSB3hSJYu5WWByONouGeX7DraLAtXLErsG1r/VS3zHd/zyuzycrVUaObNXk5bfGlIP0Ypt+RvZJILN2w==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.5.10.tgz", + "integrity": "sha512-Hntd66+Rrjn2dPPHqCVhZSXotNn5u7lfSff/1riIFbR4hZysB1OPlMOEjh51lBYhmcrvhseMfGfwH6D9i7WYKg==", "cpu": [ "arm64" ], @@ -2438,9 +2438,9 @@ } }, "node_modules/@tauri-apps/cli-win32-ia32-msvc": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.5.9.tgz", - "integrity": "sha512-FQxtxTZu0JVBihfd/lmpxo7jyMOesjWQehfyVUqtgMfm5+Pvvw0Y+ZioeDi1TZkFVrT3QDYy8R4LqDLSZVMQRA==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.5.10.tgz", + "integrity": "sha512-Kgd3qojNhH7qRsS2RKD1rKgUzk4y/v+SWW8Yr/xNo6FIYZzJChawW+WrYyBBtRoftrhLwm09LSnkR21KlGZxbA==", "cpu": [ "ia32" ], @@ -2454,9 +2454,9 @@ } }, "node_modules/@tauri-apps/cli-win32-x64-msvc": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.5.9.tgz", - "integrity": "sha512-EeI1+L518cIBLKw0qUFwnLIySBeSmPQjPLIlNwSukHSro4tAQPHycEVGgKrdToiCWgaZJBA0e5aRSds0Du2TWg==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.5.10.tgz", + "integrity": "sha512-pvuot24ZeLqQYD3rQHSzHJvUDX/kE18F98yl2mO9IHrHQyasdqlLhr/6kkmOWIvFDqyQNhpFXDzGNPm7yRbB1g==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index aeba482c..01e010de 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ }, "devDependencies": { "@tailwindcss/nesting": "^0.0.0-insiders.565cd3e", - "@tauri-apps/cli": "^1.5.6", + "@tauri-apps/cli": "^1.5.10", "@types/node": "^18.7.10", "@types/papaparse": "^5.3.7", "@types/parse-color": "^1.0.1", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 412c1b20..ca0e3294 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" strip = true # Automatically strip symbols from the binary. [build-dependencies] -tauri-build = { version = "1.2", features = [] } +tauri-build = { version = "1.5", features = [] } [target.'cfg(target_os = "macos")'.dependencies] objc = "0.2.7" @@ -34,7 +34,7 @@ cookie = { version = "0.18.0" } serde = { version = "1.0.195", features = ["derive"] } serde_json = { version = "1.0.111", features = ["raw_value"] } sqlx = { version = "0.7.3", features = ["sqlite", "runtime-tokio-rustls", "json", "chrono", "time"] } -tauri = { version = "1.5.2", features = [ +tauri = { version = "1.5.4", features = [ "config-toml", "path-all", "devtools", diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index f5233d2a..4a689c42 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -89,7 +89,8 @@ async fn migrate_db(app_handle: AppHandle, db: &Mutex>) -> Result<( .resolve_resource("migrations") .expect("failed to resolve resource"); info!("Running migrations at {}", p.to_string_lossy()); - let m = Migrator::new(p).await.expect("Failed to load migrations"); + let mut m = Migrator::new(p).await.expect("Failed to load migrations"); + m.set_ignore_missing(true); // So we can rollback versions and not crash m.run(pool).await.expect("Failed to run migrations"); info!("Migrations complete!"); Ok(()) @@ -472,8 +473,8 @@ async fn cmd_grpc_go( }, }), ) - .await - .unwrap(); + .await + .unwrap(); } None => { // Server streaming doesn't return initial message diff --git a/src-web/components/SettingsDropdown.tsx b/src-web/components/SettingsDropdown.tsx index 485c729c..a0158d49 100644 --- a/src-web/components/SettingsDropdown.tsx +++ b/src-web/components/SettingsDropdown.tsx @@ -1,7 +1,7 @@ -import { invoke, shell } from '@tauri-apps/api'; +import { shell } from '@tauri-apps/api'; import { useRef, useState } from 'react'; -import { useAlert } from '../hooks/useAlert'; import { useAppInfo } from '../hooks/useAppInfo'; +import { useCheckForUpdates } from '../hooks/useCheckForUpdates'; import { useExportData } from '../hooks/useExportData'; import { useImportData } from '../hooks/useImportData'; import { useListenToTauriEvent } from '../hooks/useListenToTauriEvent'; @@ -19,7 +19,7 @@ export function SettingsDropdown() { const appInfo = useAppInfo(); const dropdownRef = useRef(null); const dialog = useDialog(); - const alert = useAlert(); + const checkForUpdates = useCheckForUpdates(); const [showChangelog, setShowChangelog] = useState(false); useListenToTauriEvent('show_changelog', () => { @@ -76,17 +76,7 @@ export function SettingsDropdown() { key: 'update-check', label: 'Check for Updates', leftSlot: , - onSelect: async () => { - const hasUpdate: boolean = await invoke('cmd_check_for_updates'); - if (!hasUpdate) { - alert({ - id: 'no-updates', - title: 'No Updates', - body: 'You are currently up to date', - }); - } - console.log('HAS UPDATE', hasUpdate); - }, + onSelect: () => checkForUpdates.mutate(), }, { key: 'feedback',