Generalise server specified action buttons.

This commit is contained in:
Julian Stirling 2025-07-27 15:39:38 +01:00
parent 0794d4777f
commit 3651013440
4 changed files with 86 additions and 41 deletions

View file

@ -0,0 +1,46 @@
<template>
<action-button
:thing="actionData.thing"
:action="actionData.action"
:poll-interval="actionData.poll_interval"
:submit-label="actionData.submit_label"
:can-terminate="actionData.can_terminate"
:requires-confirmation="actionData.requires_confirmation"
:confirmation-message="actionData.confirmation_message"
:button-primary="actionData.button_primary"
:modal-progress="actionData.modal_progress"
@response="actionResponse"
@error="modalError"
/>
</template>
<script>
import ActionButton from "./actionButton.vue";
// Export main app
export default {
name: "ServerSpecifiedActionButton",
components: {
ActionButton
},
props: {
actionData: {
type: Object,
required: true,
}
},
methods: {
actionResponse: function() {
if (this.actionData.notify_on_success) {
this.modalNotify(this.actionData.success_message);
}
}
}
};
</script>
<style lang="less"></style>