feat(app): add diagnostics and update runtime
This commit is contained in:
@@ -300,7 +300,7 @@ export const DEFAULT_SETTINGS: Settings = {
|
||||
const HHMM_RE = /^(\d{1,2}):(\d{2})$/
|
||||
|
||||
/** Parse `HH:MM` into minutes-since-midnight, or `null` if malformed. */
|
||||
function parseHHMM(s: string): number | null {
|
||||
export function parseHHMM(s: string): number | null {
|
||||
const m = HHMM_RE.exec(s)
|
||||
if (!m) return null
|
||||
const h = Number(m[1])
|
||||
@@ -455,3 +455,45 @@ export type UpdaterStatus =
|
||||
}
|
||||
| { kind: 'downloaded'; version: string }
|
||||
| { kind: 'error'; message: string }
|
||||
|
||||
export type DiagnosticsInfo = {
|
||||
generatedAt: number
|
||||
app: {
|
||||
version: string
|
||||
isPackaged: boolean
|
||||
platform: string
|
||||
arch: string
|
||||
}
|
||||
runtime: {
|
||||
electron: string
|
||||
chrome: string
|
||||
node: string
|
||||
}
|
||||
paths: {
|
||||
userData: string
|
||||
store: string
|
||||
logs: string
|
||||
}
|
||||
store: {
|
||||
bytes: number | null
|
||||
exercises: number
|
||||
meals: number
|
||||
challenges: number
|
||||
history: number
|
||||
}
|
||||
updater: UpdaterStatus
|
||||
games: GameStatus[]
|
||||
gsi: {
|
||||
running: boolean
|
||||
port: number
|
||||
baseUrl: string
|
||||
}
|
||||
meetingActive: boolean
|
||||
}
|
||||
|
||||
export type RendererErrorReport = {
|
||||
message: string
|
||||
stack?: string
|
||||
componentStack?: string
|
||||
source?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user