diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/app/common/views/components/analog-clock.vue | 6 | ||||
| -rw-r--r-- | src/client/app/common/views/widgets/analog-clock.vue | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/client/app/common/views/components/analog-clock.vue b/src/client/app/common/views/components/analog-clock.vue index 6378194a0e..43ae2ca933 100644 --- a/src/client/app/common/views/components/analog-clock.vue +++ b/src/client/app/common/views/components/analog-clock.vue @@ -39,6 +39,10 @@ export default Vue.extend({ dark: { type: Boolean, default: false + }, + smooth: { + type: Boolean, + default: false } }, @@ -75,7 +79,7 @@ export default Vue.extend({ }, ms(): number { - return this.now.getMilliseconds(); + return this.now.getMilliseconds() * this.smooth; } s(): number { return this.now.getSeconds(); diff --git a/src/client/app/common/views/widgets/analog-clock.vue b/src/client/app/common/views/widgets/analog-clock.vue index b1177d4ddf..0de30228b3 100644 --- a/src/client/app/common/views/widgets/analog-clock.vue +++ b/src/client/app/common/views/widgets/analog-clock.vue @@ -1,8 +1,8 @@ <template> <div class="mkw-analog-clock"> - <mk-widget-container :naked="props.naked" :show-header="false"> + <mk-widget-container :naked="!(props.design % 2)" :show-header="false"> <div class="mkw-analog-clock--body"> - <mk-analog-clock :dark="$store.state.device.darkmode"/> + <mk-analog-clock :dark="$store.state.device.darkmode" :smooth="!(props.design && ~props.design)"/> </div> </mk-widget-container> </div> @@ -13,12 +13,13 @@ import define from '../../../common/define-widget'; export default define({ name: 'analog-clock', props: () => ({ - naked: false + design: -1 }) }).extend({ methods: { func() { - this.props.naked = !this.props.naked; + if (++this.props.design > 2) + this.props.design = -1; this.save(); } } |