Update the reload property button next to property controls

This commit is contained in:
Julian Stirling 2025-08-28 11:12:19 +01:00
parent 823456dbc2
commit 80ee303ac9
3 changed files with 49 additions and 30 deletions

View file

@ -11,9 +11,7 @@
@focusout="focusOut" @focusout="focusOut"
@keydown="keyDown" @keydown="keyDown"
/> />
<a class="button-next-to-input" @click="requestUpdate"> <sync-property-button @click="requestUpdate" />
<span class="material-symbols-outlined">refresh</span>
</a>
</div> </div>
</label> </label>
<div v-if="dataType == 'boolean'" class="input-and-buttons-container"> <div v-if="dataType == 'boolean'" class="input-and-buttons-container">
@ -27,9 +25,7 @@
/> />
{{ label }} {{ label }}
</label> </label>
<a class="button-next-to-input" @click="requestUpdate"> <sync-property-button @click="requestUpdate" />
<span class="material-symbols-outlined">refresh</span>
</a>
</div> </div>
<label v-if="dataType == 'number_array'" class="uk-form-label" <label v-if="dataType == 'number_array'" class="uk-form-label"
>{{ label }} >{{ label }}
@ -44,9 +40,7 @@
@focusout="focusOut" @focusout="focusOut"
@keydown="keyDown" @keydown="keyDown"
/> />
<a class="button-next-to-input" @click="requestUpdate"> <sync-property-button @click="requestUpdate" />
<span class="material-symbols-outlined">refresh</span>
</a>
</div> </div>
</label> </label>
<label v-if="dataType == 'number_object'" class="uk-form-label" <label v-if="dataType == 'number_object'" class="uk-form-label"
@ -62,9 +56,7 @@
@focusout="focusOut" @focusout="focusOut"
@keydown="keyDown" @keydown="keyDown"
/> />
<a class="button-next-to-input" @click="requestUpdate"> <sync-property-button @click="requestUpdate" />
<span class="material-symbols-outlined">refresh</span>
</a>
</div> </div>
</div> </div>
</label> </label>
@ -83,9 +75,15 @@
</template> </template>
<script> <script>
import syncPropertyButton from "./syncPropertyButton.vue";
export default { export default {
name: "InputFromSchema", name: "InputFromSchema",
components: {
syncPropertyButton
},
props: { props: {
dataSchema: { dataSchema: {
type: Object type: Object
@ -217,11 +215,4 @@ export default {
margin-right: 5px; margin-right: 5px;
width: 6em; width: 6em;
} }
.button-next-to-input {
flex-grow: 0;
padding-left: 5px;
padding-right: 5px;
vertical-align: middle;
cursor: pointer;
}
</style> </style>

View file

@ -0,0 +1,35 @@
<template>
<a class="sync-button">
<span class="material-symbols-outlined sync-icon" title="Reload from microscope">
sync
</span>
</a>
</template>
<script>
export default {
name: "syncPropertyButton"
};
</script>
<style scoped>
.sync-button {
flex-grow: 0;
padding-left: 5px;
padding-right: 5px;
vertical-align: middle;
cursor: pointer;
}
.material-symbols-outlined.sync-icon{
color: #888;
transition: transform 0.3s ease, color 0.3s ease;
}
.material-symbols-outlined.sync-icon:hover{
transform: rotate(-90deg);
color: #c5247f;
}
</style>

View file

@ -85,9 +85,7 @@
type="number" type="number"
@keyup.enter="startMoveTask" @keyup.enter="startMoveTask"
/> />
<a class="button-next-to-input" @click="updatePosition"> <sync-property-button @click="updatePosition" />
<span class="material-symbols-outlined">refresh</span>
</a>
</div> </div>
<p> <p>
<action-button <action-button
@ -177,13 +175,15 @@
<script> <script>
import axios from "axios"; import axios from "axios";
import ActionButton from "../../labThingsComponents/actionButton.vue"; import ActionButton from "../../labThingsComponents/actionButton.vue";
import syncPropertyButton from "../../labThingsComponents/syncPropertyButton.vue";
// Export main app // Export main app
export default { export default {
name: "PaneControl", name: "PaneControl",
components: { components: {
ActionButton ActionButton,
syncPropertyButton
}, },
data: function() { data: function() {
@ -375,11 +375,4 @@ export default {
-webkit-appearance: none; -webkit-appearance: none;
margin: 0; margin: 0;
} }
.button-next-to-input {
flex-grow: 0;
padding-left: 5px;
padding-right: 5px;
vertical-align: middle;
cursor: pointer;
}
</style> </style>