mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 21:04:23 +01:00
add drag and drop repo reordering functionality
This commit is contained in:
1 parent
17ee96d316
commit
8695f7c745
8 files changed
+320
-85
No files matched your search
@@ -188,3 +188,16 @@ export async function downloadRepo(id: number, repoName: string): Promise<void>
|
||||
document.body.removeChild(a)
|
||||
window.URL.revokeObjectURL(url)
|
||||
}
|
||||
|
||||
export async function updateRepoOrder(order: number[]): Promise<void> {
|
||||
const response = await fetch(`${API_BASE_URL}/api/repos/order`, {
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ order }),
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
const error = await response.json()
|
||||
throw new Error(error.error || 'Failed to update repo order')
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@ export interface UserPreferences {
|
||||
gitCredentials?: GitCredential[]
|
||||
gitIdentity?: GitIdentity
|
||||
tts?: TTSConfig
|
||||
repoOrder?: number[]
|
||||
}
|
||||
|
||||
export interface SettingsResponse {
|
||||
|
||||
Reference in new issue
Block a user