mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-22 00:03:20 +01:00
Prevent the user from changing the metadata format if the server has set force_save_metadata
This commit is contained in:
parent
4c8d5a7077
commit
e999832c26
@ -225,6 +225,7 @@ def read_web_data_internal(key: str = None, **kwargs):
|
||||
"hosts": app.getIPConfig(),
|
||||
"default_output_dir": output_dir,
|
||||
"enforce_output_dir": ("force_save_path" in config),
|
||||
"enforce_output_metadata": ("force_save_metadata" in config),
|
||||
}
|
||||
system_info["devices"]["config"] = config.get("render_devices", "auto")
|
||||
return JSONResponse(system_info, headers=NOCACHE_HEADERS)
|
||||
|
@ -740,10 +740,13 @@ async function getSystemInfo() {
|
||||
force = res["enforce_output_dir"]
|
||||
if (force == true) {
|
||||
saveToDiskField.checked = true
|
||||
metadataOutputFormatField.disabled = false
|
||||
metadataOutputFormatField.disabled = res["enforce_output_metadata"]
|
||||
diskPathField.disabled = true
|
||||
}
|
||||
saveToDiskField.disabled = force
|
||||
diskPathField.disabled = force
|
||||
} else {
|
||||
diskPathField.disabled = !saveToDiskField.checked
|
||||
metadataOutputFormatField.disabled = !saveToDiskField.checked
|
||||
}
|
||||
setDiskPath(res["default_output_dir"], force)
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user