Optional primary/default button style in taskSubmitter
This commit is contained in:
parent
d3998b7678
commit
55a68738a7
4 changed files with 31 additions and 21 deletions
|
|
@ -232,20 +232,22 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<taskSubmitter
|
||||
v-if="scanCapture"
|
||||
:submit-url="scanUri"
|
||||
:submit-data="scanPayload"
|
||||
:submit-label="'Start Scan'"
|
||||
@submit="onScanSubmit"
|
||||
@response="onScanResponse"
|
||||
@error="onScanError"
|
||||
>
|
||||
</taskSubmitter>
|
||||
<div v-if="scanCapture" class="uk-margin uk-margin-remove-top ">
|
||||
<taskSubmitter
|
||||
:submit-url="scanUri"
|
||||
:submit-data="scanPayload"
|
||||
:submit-label="'Start Scan'"
|
||||
:button-primary="true"
|
||||
@submit="onScanSubmit"
|
||||
@response="onScanResponse"
|
||||
@error="onScanError"
|
||||
>
|
||||
</taskSubmitter>
|
||||
</div>
|
||||
|
||||
<button
|
||||
v-else
|
||||
class="uk-button uk-button-primary uk-form-small uk-margin uk-margin-remove-top uk-float-right uk-width-1-1"
|
||||
class="uk-button uk-button-primary uk-form-small uk-margin uk-margin-remove-top uk-width-1-1"
|
||||
@click="handleCapture()"
|
||||
>
|
||||
Capture
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
</li>
|
||||
|
||||
<!--Show autofocus if default plugin is enabled-->
|
||||
<li class="uk-open">
|
||||
<li v-show="fastAutofocusUri || normalAutofocusUri" class="uk-open">
|
||||
<a class="uk-accordion-title" href="#">Autofocus</a>
|
||||
<div class="uk-accordion-content">
|
||||
<div class="uk-grid-small uk-child-width-expand" uk-grid>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
'Start recalibration? This may take a while, and the microscope will be locked during this time.'
|
||||
"
|
||||
:submit-url="recalibrationUri"
|
||||
:submit-label="'Auto-Calibrate (Task)'"
|
||||
:submit-label="'Auto-Calibrate'"
|
||||
@response="onRecalibrateResponse"
|
||||
@error="onRecalibrateError"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -20,14 +20,17 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
:hidden="taskRunning"
|
||||
class="uk-button uk-button-primary uk-form-small uk-margin-remove uk-float-right uk-width-1-1"
|
||||
@click="bootstrapTask()"
|
||||
>
|
||||
{{ submitLabel }}
|
||||
</button>
|
||||
<div>
|
||||
<button
|
||||
type="button"
|
||||
:hidden="taskRunning"
|
||||
class="uk-button uk-form-small uk-margin-remove uk-width-1-1"
|
||||
:class="[buttonPrimary ? 'uk-button-primary' : 'uk-button-default']"
|
||||
@click="bootstrapTask()"
|
||||
>
|
||||
{{ submitLabel }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -76,6 +79,11 @@ export default {
|
|||
type: String,
|
||||
required: false,
|
||||
default: "Start task?"
|
||||
},
|
||||
buttonPrimary: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue