File directory default value in Model Info "Move" input.
This commit is contained in:
@@ -1441,6 +1441,7 @@ class ModelInfoView {
|
||||
elements = {
|
||||
/** @type {HTMLDivElement} */ info: null,
|
||||
/** @type {HTMLButtonElement} */ setPreviewButton: null,
|
||||
/** @type {HTMLInputElement} */ moveDestinationInput: null,
|
||||
};
|
||||
|
||||
/** @type {ImageSelect} */
|
||||
@@ -1457,6 +1458,7 @@ class ModelInfoView {
|
||||
placeholder: modelData.searchSeparator,
|
||||
value: modelData.searchSeparator,
|
||||
});
|
||||
this.elements.moveDestinationInput = moveDestinationInput;
|
||||
|
||||
const searchDropdown = new DirectoryDropdown(
|
||||
modelData,
|
||||
@@ -1722,6 +1724,14 @@ class ModelInfoView {
|
||||
);
|
||||
}
|
||||
|
||||
const fileDirectory = info["File Directory"];
|
||||
if (fileDirectory !== undefined && fileDirectory !== null && fileDirectory !== "") {
|
||||
this.elements.moveDestinationInput.value = fileDirectory; // TODO: noise vs convenience
|
||||
}
|
||||
else {
|
||||
this.elements.moveDestinationInput.value = searchSeparator;
|
||||
}
|
||||
|
||||
const previewSelect = this.previewSelect;
|
||||
const defaultUrl = previewSelect.elements.defaultUrl;
|
||||
if (info["Preview"]) {
|
||||
|
||||
Reference in New Issue
Block a user