fix: Dont rely on icon DOM text for ExecutionView
This commit is contained in:
parent
3ba10621d4
commit
3e414564e5
|
|
@ -79,6 +79,7 @@ const showNavigateOnStartIcons = computed(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const actionGlyph = computed(() => props.actionData?.icon ?? '')
|
const actionGlyph = computed(() => props.actionData?.icon ?? '')
|
||||||
|
const glyph = ref('')
|
||||||
|
|
||||||
// Combined classes including custom cssClass
|
// Combined classes including custom cssClass
|
||||||
const combinedClasses = computed(() => {
|
const combinedClasses = computed(() => {
|
||||||
|
|
@ -112,6 +113,7 @@ function constructFromJson(json) {
|
||||||
|
|
||||||
isDisabled.value = !json.canExec
|
isDisabled.value = !json.canExec
|
||||||
displayTitle.value = title.value
|
displayTitle.value = title.value
|
||||||
|
glyph.value = json.icon ?? ''
|
||||||
// Initialize rate limit from action data (parse datetime string)
|
// Initialize rate limit from action data (parse datetime string)
|
||||||
if (json.datetimeRateLimitExpires) {
|
if (json.datetimeRateLimitExpires) {
|
||||||
const date = new Date(json.datetimeRateLimitExpires.replace(' ', 'T'))
|
const date = new Date(json.datetimeRateLimitExpires.replace(' ', 'T'))
|
||||||
|
|
@ -313,10 +315,17 @@ watch(
|
||||||
() => props.actionData,
|
() => props.actionData,
|
||||||
(newData) => {
|
(newData) => {
|
||||||
updateFromJson(newData)
|
updateFromJson(newData)
|
||||||
|
if (newData?.icon !== undefined) {
|
||||||
|
glyph.value = newData.icon ?? ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
glyph
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ async function reset() {
|
||||||
|
|
||||||
function show(actionButton) {
|
function show(actionButton) {
|
||||||
if (actionButton) {
|
if (actionButton) {
|
||||||
icon.value = actionButton.domIcon.innerText
|
icon.value = actionButton.glyph ?? ''
|
||||||
}
|
}
|
||||||
|
|
||||||
canKill.value = true
|
canKill.value = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue