feat: move switch version inline like update btn for content tab (#5631)

* fix: switch version inline same as update btn

* fix: lint
This commit is contained in:
Calum H.
2026-03-21 18:06:03 +00:00
committed by GitHub
parent 9e6a6cd385
commit 92eddbe832
8 changed files with 43 additions and 36 deletions

View File

@@ -407,6 +407,13 @@ function handleUpdateById(id: string) {
ctx.updateItem?.(id)
}
function handleSwitchVersionById(id: string) {
const item = ctx.items.value.find((i) => i.id === id)
if (item) {
ctx.switchVersion?.(item)
}
}
// Bulk updating
const confirmBulkUpdateModal = ref<InstanceType<typeof ConfirmBulkUpdateModal>>()
const pendingBulkUpdateItems = ref<ContentItem[]>([])
@@ -705,6 +712,7 @@ const confirmUnlinkModal = ref<InstanceType<typeof ConfirmUnlinkModal>>()
@update:enabled="handleToggleEnabledById"
@delete="handleDeleteById"
@update="handleUpdateById"
@switch-version="handleSwitchVersionById"
>
<template #empty>
<span>{{ formatMessage(messages.noContentFound) }}</span>