mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
* feat(frontend): mobile-friendly config editor with find bar and unsaved-changes guard * refactor: remove retry-clone flow and share destructive-confirm dialog Backend drops POST /:id/retry-clone and the supporting retryCloneRepo service and claimRepoForRetry query; failed clones now delete the repo row rather than lingering in error state. Frontend extracts ConfirmDestructiveDialog shared by Delete/Discard/UnsavedChanges dialogs, memoizes CodeEditor rows, fixes scroll jump while typing away from the active match, and aligns the responsive breakpoint to 768px.
13 lines
396 B
TypeScript
13 lines
396 B
TypeScript
interface RowScrollInput {
|
|
rowTop: number
|
|
rowHeight: number
|
|
viewportHeight: number
|
|
maxScrollTop: number
|
|
}
|
|
|
|
export function computeScrollTopForRow({ rowTop, rowHeight, viewportHeight, maxScrollTop }: RowScrollInput): number {
|
|
const centred = rowTop - viewportHeight / 2 + rowHeight / 2
|
|
const upperBound = Math.max(0, maxScrollTop)
|
|
return Math.min(Math.max(0, centred), upperBound)
|
|
}
|