Add app update detection and multi-folder project support
Feature 1 - Update Detection: Query Gitea releases API on startup (3s
delay) and every 24h, compare patch versions by platform, show pulsing
"Update" button in TopBar with dialog for release notes/downloads.
Settings: auto-check toggle, manual check, dismiss per-version.
Feature 2 - Multi-Folder Projects: Replace single `path` with
`paths: Vec<ProjectPath>` (host_path + mount_name). Each folder mounts
to `/workspace/{mount_name}`. Auto-migrate old single-path JSON on load.
Container recreation via paths-fingerprint label. AddProjectDialog and
ProjectCard support add/remove/edit of multiple folders.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { create } from "zustand";
|
||||
import type { Project, TerminalSession, AppSettings } from "../lib/types";
|
||||
import type { Project, TerminalSession, AppSettings, UpdateInfo } from "../lib/types";
|
||||
|
||||
interface AppState {
|
||||
// Projects
|
||||
@@ -30,6 +30,12 @@ interface AppState {
|
||||
// App settings
|
||||
appSettings: AppSettings | null;
|
||||
setAppSettings: (settings: AppSettings) => void;
|
||||
|
||||
// Update info
|
||||
updateInfo: UpdateInfo | null;
|
||||
setUpdateInfo: (info: UpdateInfo | null) => void;
|
||||
appVersion: string;
|
||||
setAppVersion: (version: string) => void;
|
||||
}
|
||||
|
||||
export const useAppState = create<AppState>((set) => ({
|
||||
@@ -85,4 +91,10 @@ export const useAppState = create<AppState>((set) => ({
|
||||
// App settings
|
||||
appSettings: null,
|
||||
setAppSettings: (settings) => set({ appSettings: settings }),
|
||||
|
||||
// Update info
|
||||
updateInfo: null,
|
||||
setUpdateInfo: (info) => set({ updateInfo: info }),
|
||||
appVersion: "",
|
||||
setAppVersion: (version) => set({ appVersion: version }),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user