Skip to content
Snippets Groups Projects
Commit d92e9759 authored by Aya Morisawa's avatar Aya Morisawa Committed by syuilo
Browse files

Refactor analog clock widget (#2648)

parent bf7e19b2
No related branches found
No related tags found
No related merge requests found
<template>
<div class="mkw-analog-clock">
<mk-widget-container :naked="!(props.design % 2)" :show-header="false">
<mk-widget-container :naked="props.style % 2 === 0" :show-header="false">
<div class="mkw-analog-clock--body">
<mk-analog-clock :dark="$store.state.device.darkmode" :smooth="!(props.design && ~props.design)"/>
<mk-analog-clock :dark="$store.state.device.darkmode" :smooth="props.style < 2"/>
</div>
</mk-widget-container>
</div>
......@@ -13,13 +13,12 @@ import define from '../../../common/define-widget';
export default define({
name: 'analog-clock',
props: () => ({
design: -1
style: 0
})
}).extend({
methods: {
func() {
if (++this.props.design > 2)
this.props.design = -1;
this.props.style = (this.props.style + 1) % 4;
this.save();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment