Update dependencies and enhance UI components for better functionality

- Added new Tauri plugins: @tauri-apps/plugin-process and @tauri-apps/plugin-updater to improve application capabilities.
- Introduced UpdateStatus component to display update information in the UI.
- Enhanced GenerationForm to include an optional instruct field for additional input.
- Refactored various components for improved styling and responsiveness, including Sidebar, AudioPlayer, and ProfileCard.
- Updated API models and schemas to accommodate new instruct parameter in generation requests and responses.
- Improved documentation for autoupdater setup and usage.
This commit is contained in:
Jamie Pine
2026-01-25 16:38:25 -08:00
parent 45c4c2f488
commit e7e3a0a440
87 changed files with 2421 additions and 1628 deletions
+10 -2
View File
@@ -11,6 +11,10 @@ export interface UpdateStatus {
error?: string;
}
const isTauri = () => {
return '__TAURI_INTERNALS__' in window;
};
export function useAutoUpdater(checkOnMount = false) {
const [status, setStatus] = useState<UpdateStatus>({
checking: false,
@@ -22,6 +26,10 @@ export function useAutoUpdater(checkOnMount = false) {
const [update, setUpdate] = useState<Update | null>(null);
const checkForUpdates = async () => {
if (!isTauri()) {
return;
}
try {
setStatus((prev) => ({ ...prev, checking: true, error: undefined }));
@@ -56,7 +64,7 @@ export function useAutoUpdater(checkOnMount = false) {
};
const downloadAndInstall = async () => {
if (!update) return;
if (!update || !isTauri()) return;
try {
setStatus((prev) => ({ ...prev, downloading: true, error: undefined }));
@@ -91,7 +99,7 @@ export function useAutoUpdater(checkOnMount = false) {
};
useEffect(() => {
if (checkOnMount) {
if (checkOnMount && isTauri()) {
checkForUpdates();
}
}, [checkOnMount]);