File directory default value in Model Info "Move" input.
This commit is contained in:
@@ -1441,6 +1441,7 @@ class ModelInfoView {
|
|||||||
elements = {
|
elements = {
|
||||||
/** @type {HTMLDivElement} */ info: null,
|
/** @type {HTMLDivElement} */ info: null,
|
||||||
/** @type {HTMLButtonElement} */ setPreviewButton: null,
|
/** @type {HTMLButtonElement} */ setPreviewButton: null,
|
||||||
|
/** @type {HTMLInputElement} */ moveDestinationInput: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @type {ImageSelect} */
|
/** @type {ImageSelect} */
|
||||||
@@ -1457,6 +1458,7 @@ class ModelInfoView {
|
|||||||
placeholder: modelData.searchSeparator,
|
placeholder: modelData.searchSeparator,
|
||||||
value: modelData.searchSeparator,
|
value: modelData.searchSeparator,
|
||||||
});
|
});
|
||||||
|
this.elements.moveDestinationInput = moveDestinationInput;
|
||||||
|
|
||||||
const searchDropdown = new DirectoryDropdown(
|
const searchDropdown = new DirectoryDropdown(
|
||||||
modelData,
|
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 previewSelect = this.previewSelect;
|
||||||
const defaultUrl = previewSelect.elements.defaultUrl;
|
const defaultUrl = previewSelect.elements.defaultUrl;
|
||||||
if (info["Preview"]) {
|
if (info["Preview"]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user