feat(web): update button in Settings (#15)
Shows the installed commit, checks for new commits, starts the update after a confirmation and follows its output through the service restart.
This commit is contained in:
@@ -5,6 +5,9 @@ import type {
|
||||
SessionSettingsResponse,
|
||||
ClaudeStatusResponse,
|
||||
SystemInfoResponse,
|
||||
UpdateCheckResponse,
|
||||
UpdateStartResponse,
|
||||
UpdateStatusResponse,
|
||||
} from "@shellbook/core";
|
||||
import { HttpError } from "./api";
|
||||
async function request<T>(path: string, body?: unknown): Promise<T> {
|
||||
@@ -29,4 +32,7 @@ export const settingsApi = {
|
||||
session: () => request<SessionSettingsResponse>("/settings/session"),
|
||||
claude: () => request<ClaudeStatusResponse>("/settings/claude"),
|
||||
system: () => request<SystemInfoResponse>("/settings/system"),
|
||||
updateStatus: () => request<UpdateStatusResponse>("/settings/update"),
|
||||
checkUpdate: () => request<UpdateCheckResponse>("/settings/update/check", {}),
|
||||
startUpdate: () => request<UpdateStartResponse>("/settings/update", {}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user