diff --git a/assets/webui/index.html b/assets/webui/index.html
index b760810..5b5a581 100644
--- a/assets/webui/index.html
+++ b/assets/webui/index.html
@@ -365,21 +365,22 @@
+
+
-
+
diff --git a/assets/webui/ofdgo.css b/assets/webui/ofdgo.css
index 685f2dd..c59a483 100644
--- a/assets/webui/ofdgo.css
+++ b/assets/webui/ofdgo.css
@@ -1552,8 +1552,7 @@ body[data-hide-meta] .meta-panel {
width: 600px;
}
-.resource-dialog form > .form-actions {
- grid-template-columns: minmax(0, 1fr) auto;
+.resource-dialog .form-status:not(:empty) {
margin-top: 12px;
}
@@ -1642,6 +1641,10 @@ body[data-hide-meta] .meta-panel {
min-height: 28px;
}
+.resource-actions > #resourceClose {
+ margin-left: auto;
+}
+
.resource-actions > [hidden] {
display: none;
}
diff --git a/assets/webui/ofdgo.js b/assets/webui/ofdgo.js
index 5a07cf4..abcc631 100644
--- a/assets/webui/ofdgo.js
+++ b/assets/webui/ofdgo.js
@@ -23,7 +23,7 @@ const batch = { items: [], formats: [], running: false, canceled: false, worker:
const batchElements = Object.fromEntries(["Button", "Panel", "Form", "Input", "Add", "Clear", "Count", "Format", "Compression", "FontRow", "FontMode", "Destination", "DPIRow", "DPI", "List", "Empty", "Progress", "Status", "Close", "Cancel", "Start"].map(name => [name, document.querySelector(`#convert${name}`)]));
const fontBinding = { font: null, choices: [], sequence: 0 };
const fontBindingElements = Object.fromEntries(["Panel", "Form", "Title", "Name", "SourceRow", "Source", "File", "Hint", "Status", "Cancel", "Submit"].map(name => [name, document.querySelector(`#fontBinding${name}`)]));
-const resourceElements = Object.fromEntries(["ManageButton", "Panel", "Form", "Kind", "List", "Empty", "Reference", "Add", "Preview", "Export", "Rename", "Replace", "Delete", "Locate", "Close", "Binding", "Page", "Object", "Pick", "Bind", "Unbind", "Viewer", "Status", "File"].map(name => [name, document.querySelector(`#resource${name}`)]));
+const resourceElements = Object.fromEntries(["ManageButton", "Panel", "Form", "Kind", "List", "Empty", "Reference", "Actions", "Add", "Preview", "Export", "Rename", "Replace", "Delete", "Locate", "Close", "Binding", "BindingActions", "Page", "Object", "Pick", "Bind", "Unbind", "Viewer", "Status", "File"].map(name => [name, document.querySelector(`#resource${name}`)]));
const resourceManager = { items: [], selected: null, targets: [], pick: null, busy: false, sequence: 0, url: null, font: null, fileAction: null };
let wasmPromise = null;
@@ -5189,6 +5189,8 @@ function updateResourceControls() {
resourceElements.Delete.title = item?.kind === "Attachment" ? "删除附件" : item?.references?.length ? "资源仍被引用" : "删除资源";
resourceElements.Locate.disabled = disabled || !item?.references?.length;
resourceElements.Binding.hidden = !editing || !actionable;
+ const actions = resourceElements.Binding.hidden ? resourceElements.Actions : resourceElements.BindingActions;
+ if (resourceElements.Close.parentElement !== actions) actions.append(resourceElements.Close);
const target = resourceManager.targets.find(target => target.id === resourceElements.Object.value);
resourceElements.Pick.disabled = disabled || !editing || !actionable || Boolean(state.composite);
resourceElements.Bind.disabled = disabled || !actionable || !target || target.bound;