mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-21 09:39:03 +08:00
feat: 看板SQL与布局支持数据库持久化
This commit is contained in:
@@ -444,7 +444,7 @@ ORDER BY reward_points DESC, score DESC`,
|
||||
|
||||
setSaving(true)
|
||||
try {
|
||||
const res = await (window as any).api.setSetting("dashboards_config", nextBoards)
|
||||
const res = await (window as any).api.boardSaveConfigs(nextBoards)
|
||||
if (!res?.success) {
|
||||
messageApi.error(res?.message || t("board.saveFailed"))
|
||||
}
|
||||
@@ -475,7 +475,7 @@ ORDER BY reward_points DESC, score DESC`,
|
||||
|
||||
setLoading(true)
|
||||
try {
|
||||
const res = await (window as any).api.getSetting("dashboards_config")
|
||||
const res = await (window as any).api.boardGetConfigs()
|
||||
if (res?.success) {
|
||||
const normalized = normalizeBoards(res?.data)
|
||||
setBoards(normalized)
|
||||
|
||||
@@ -155,6 +155,10 @@ const api = {
|
||||
limit?: number
|
||||
}): Promise<{ success: boolean; data: any[]; message?: string }> =>
|
||||
invoke("board_query_sql", { params }),
|
||||
boardGetConfigs: (): Promise<{ success: boolean; data: any[]; message?: string }> =>
|
||||
invoke("board_get_configs"),
|
||||
boardSaveConfigs: (configs: any[]): Promise<{ success: boolean; message?: string }> =>
|
||||
invoke("board_save_configs", { configs }),
|
||||
|
||||
// Settlement
|
||||
querySettlements: (): Promise<{ success: boolean; data: any[] }> => invoke("db_settlement_query"),
|
||||
|
||||
Reference in New Issue
Block a user