fix(ui): right-anchor license icons and delete button as one group in model modal

This commit is contained in:
Will Miao
2026-08-24 11:39:17 +08:00
parent a7214b6cff
commit 40f922b0e8
2 changed files with 23 additions and 13 deletions
+5 -7
View File
@@ -442,10 +442,12 @@ export async function showModelModal(model, modelType) {
if (creatorActionsMarkup) {
headerActionItems.push(creatorActionsMarkup);
}
if (licenseIcons) {
headerActionItems.push(indentMarkup(licenseIcons.trim(), 20));
}
// Destructive action docks immediately left of the license icons so the
// icons keep their original rightmost position; the delete button's
// auto margin right-anchors the whole cluster.
// Destructive action stays last (rightmost). The license icons' auto
// margin right-anchors the [license][delete] cluster as one group.
const deleteModelTitle = translate('modals.model.actions.deleteModelWithShortcut', {}, 'Delete model (Del)');
const deleteModelButton = `
<button class="modal-delete-btn" data-action="delete-model" title="${deleteModelTitle}" aria-label="${deleteModelTitle}">
@@ -454,10 +456,6 @@ export async function showModelModal(model, modelType) {
`.trim();
headerActionItems.push(indentMarkup(deleteModelButton, 20));
if (licenseIcons) {
headerActionItems.push(indentMarkup(licenseIcons.trim(), 20));
}
const headerActionsMarkup = headerActionItems.length
? [
' <div class="modal-header-actions">',