mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
* fix: keep a button action card open when its save finishes A created action is keyed by its new id once the list is refetched, which closed the card while the context was still on screen. * fix: give the button action error a line height * fix: outline the selected button field cell * fix: name the button actions that ran before one failed Completed actions are not rolled back, and the old message left the clicker to assume nothing had happened. * fix: disable a button field for users who may not click it The dispatch operation is now scoped to the field, which is the only id a cell has to ask with. Roles attach no lower than the table, so one check on the field answers the same as one per action. * fix: refetch permissions when a field is created or restored A role on the table or database lists the fields it covers, so a field added after the page loaded was refused by every field scoped check until a reload. * test: cover the disabled button in the row modal and on a card * fix: keep a button action card in place while its save finishes The refetched list keyed a created or retyped action by its new id, so its card remounted and the editor scrolled to the top mid-save.
59 lines
1.5 KiB
Vue
59 lines
1.5 KiB
Vue
<template>
|
|
<div>
|
|
<!-- A disabled button fires no mouse events, so the tooltip sits on a
|
|
wrapper. -->
|
|
<span
|
|
v-if="requiresReconfiguration"
|
|
v-tooltip="$t('buttonField.requiresReconfiguration')"
|
|
class="forced-pointer-events-auto"
|
|
>
|
|
<Button
|
|
size="tiny"
|
|
type="secondary"
|
|
icon="iconoir-warning-triangle"
|
|
disabled
|
|
>
|
|
{{ field.label }}
|
|
</Button>
|
|
</span>
|
|
<Button
|
|
v-else-if="canClick"
|
|
size="tiny"
|
|
type="secondary"
|
|
:loading="dispatching"
|
|
class="forced-pointer-events-auto"
|
|
@mousedown.stop
|
|
@click="dispatchWorkflowActions"
|
|
>
|
|
{{ field.label }}
|
|
</Button>
|
|
<!-- A card takes the pointer away from everything inside it, so the
|
|
wrapper asks for it back while it has a reason to show. -->
|
|
<span
|
|
v-else
|
|
v-tooltip="disabledReason"
|
|
:class="{ 'forced-pointer-events-auto': disabledReason }"
|
|
>
|
|
<Button size="tiny" type="secondary" disabled>
|
|
{{ field.label }}
|
|
</Button>
|
|
</span>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import buttonField from '@baserow/modules/database/mixins/buttonField'
|
|
|
|
export default {
|
|
name: 'RowCardFieldButtonField',
|
|
mixins: [buttonField],
|
|
props: {
|
|
row: { type: Object, required: true },
|
|
field: { type: Object, required: true },
|
|
value: { type: null, default: null },
|
|
workspaceId: { type: Number, required: false, default: null },
|
|
},
|
|
height: 26,
|
|
}
|
|
</script>
|