fix: KB card buttons stick to bottom via filler; tag save uses reload instead of fragile DOM refresh
This commit is contained in:
parent
e2d17b630b
commit
ee0a563e92
@ -28,12 +28,13 @@ async with get_sor_context(env, 'rag') as sor:
|
||||
"cfontsize": 16, "fontWeight": "bold"}},
|
||||
{"widgettype": "Text", "options": {"text": str(engine) + " \u00b7 1024\u7ef4",
|
||||
"cfontsize": 12, "color": "#888", "padding": "2px 0 6px 0"}},
|
||||
{"widgettype": "HBox", "options": {"spacing": "12px", "padding": "0 0 8px 0"}, "subwidgets": [
|
||||
{"widgettype": "HBox", "options": {"spacing": "12px", "padding": "0 0 4px 0"}, "subwidgets": [
|
||||
{"widgettype": "Text", "options": {"text": "\U0001f4c4 " + str(doc_count) + "\u6587\u6863",
|
||||
"cfontsize": 12, "color": "#666"}},
|
||||
{"widgettype": "Text", "options": {"text": "\U0001f4be " + size_str,
|
||||
"cfontsize": 12, "color": "#666"}}
|
||||
]},
|
||||
{"widgettype": "Text", "options": {"text": "", "css": "filler"}},
|
||||
{"widgettype": "HBox", "options": {"justifyContent": "flex-end", "spacing": "6px",
|
||||
"padding": "4px 0 0 0", "borderTop": "1px solid #e8f0fe"}, "subwidgets": [
|
||||
{"widgettype": "Text", "options": {"text": "\u270f\ufe0f \u91cd\u547d\u540d",
|
||||
|
||||
@ -129,7 +129,7 @@ submit_js = ("var rows=document.querySelectorAll('#tag_list_panel [data-sel]');"
|
||||
"if(ids.length===0){alert('请至少勾选一个标签');return};"
|
||||
"fetch('/api/tag/sync?kb_id=" + kb_id + "&media_type=document&media_id=" + doc_id + "&tag_ids='+encodeURIComponent(ids.join(',')))"
|
||||
".then(function(r){return r.json()}).then(function(d){"
|
||||
"if(d&&d.status==='SUCCEEDED'){" + close_popup_js + refresh_js + "}"
|
||||
"if(d&&d.status==='SUCCEEDED'){" + close_popup_js + "window.location.reload();" + "}"
|
||||
"else{alert('保存失败:'+(d&&d.error||'未知错误'));}"
|
||||
"}).catch(function(){alert('网络错误')});")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user