Skip to content

Commit

Permalink
re-add sync button next to last update label. always show it, and lab…
Browse files Browse the repository at this point in the history
…el it "reload" instead of former "update".
  • Loading branch information
ideadapt committed Sep 11, 2024
1 parent 19a61fc commit 994d551
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/components/InputTimeInterval.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@ div
@click="applyRange"
) Apply

div.mt-1.small.text-muted(v-if="lastUpdate", v-bind:title="lastUpdate")
| Last update: #[time(:datetime="lastUpdate.format()") {{lastUpdate | friendlytime}}]
div.mt-1
div.d-inline-block.mr-2(v-if="showUpdate")
b-button.px-2(@click="update()", variant="outline-dark", size="sm")
icon(name="sync")
span.d-none.d-md-inline
| Reload

div.d-inline-block.small.text-muted(v-if="lastUpdate", v-bind:title="lastUpdate")
| Last update: #[time(:datetime="lastUpdate.format()") {{lastUpdate | friendlytime}}]
</template>

<style scoped lang="scss">
Expand Down Expand Up @@ -134,6 +141,12 @@ export default {
this.$emit('input', this.value);
}
},
update() {
const tmpMode = this.mode;
this.mode = '';
this.mode = tmpMode;
this.valueChanged();
},
applyRange() {
this.mode = 'range';
this.duration = 0;
Expand Down

0 comments on commit 994d551

Please sign in to comment.