mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 09:17:06 +08:00
style: Assistant Embedded Appearance Configuration - Restore Default Function Style Error
This commit is contained in:
@@ -115,7 +115,13 @@ async def ui(session: SessionDep, data: str = Form(), files: List[UploadFile] =
|
||||
ui_schema_dict[flag_name] = file_id
|
||||
else:
|
||||
raise ValueError(f"Unsupported file flag: {flag_name}")
|
||||
|
||||
|
||||
for flag_name in ['logo', 'float_icon']:
|
||||
file_val = config_obj.get(flag_name)
|
||||
if file_val and not ui_schema_dict.get(flag_name):
|
||||
config_obj[flag_name] = None
|
||||
SQLBotFileUtils.detete_file(file_val)
|
||||
|
||||
for attr, value in ui_schema_dict.items():
|
||||
if attr != 'id' and not attr.startswith("__"):
|
||||
config_obj[attr] = value
|
||||
|
||||
@@ -14,16 +14,15 @@ const currentId = ref()
|
||||
interface SqlBotForm {
|
||||
theme: string
|
||||
header_font_color: string
|
||||
// logo?: string
|
||||
logo?: string
|
||||
x_type: string
|
||||
y_type: string
|
||||
welcome_desc: string
|
||||
// float_icon?: string
|
||||
float_icon?: string
|
||||
welcome: string
|
||||
float_icon_drag: boolean
|
||||
x_val: number
|
||||
y_val: number
|
||||
restoreDefaults: boolean
|
||||
}
|
||||
|
||||
const optionsY = [
|
||||
@@ -74,9 +73,8 @@ const defaultSqlBotForm = reactive<SqlBotForm>({
|
||||
welcome_desc: t('embedded.data_analysis_now'),
|
||||
theme: '#1CBA90',
|
||||
header_font_color: '#1F2329',
|
||||
restoreDefaults: false,
|
||||
// logo: '',
|
||||
// float_icon: '',
|
||||
logo: '',
|
||||
float_icon: '',
|
||||
})
|
||||
const sqlBotForm = reactive<SqlBotForm>(cloneDeep(defaultSqlBotForm)) as { [key: string]: any }
|
||||
let rawData = {} as { [key: string]: any }
|
||||
|
||||
Reference in New Issue
Block a user