feat(ui): unify tag editing in app sidebar and add management entry to TagFilter (#23325)

This commit is contained in:
lyzno1
2025-08-03 18:30:47 +08:00
committed by GitHub
parent 76d123fe19
commit 0c925bd088
6 changed files with 496 additions and 9 deletions

View File

@@ -60,6 +60,21 @@ export const deleteApp: Fetcher<CommonResponse, string> = (appID) => {
return del<CommonResponse>(`apps/${appID}`)
}
export const fetchAppWithTags = async (appID: string) => {
try {
const appListResponse = await fetchAppList({
url: '/apps',
params: { page: 1, limit: 100 },
})
const appWithTags = appListResponse.data.find(app => app.id === appID)
return appWithTags || null
}
catch (error) {
console.warn('Failed to fetch app with tags:', error)
return null
}
}
export const updateAppSiteStatus: Fetcher<AppDetailResponse, { url: string; body: Record<string, any> }> = ({ url, body }) => {
return post<AppDetailResponse>(url, { body })
}