openflexure-microscope-server/webapp/src/components/labThingsComponents/serverSpecifiedActionButton.vue
2025-07-31 20:56:55 +01:00

46 lines
985 B
Vue

<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>