forked from FoundKeyGang/FoundKey
commit
51c33989fe
2 changed files with 10 additions and 5 deletions
|
@ -39,6 +39,10 @@ export default Vue.extend({
|
||||||
dark: {
|
dark: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
smooth: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -75,7 +79,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
ms(): number {
|
ms(): number {
|
||||||
return this.now.getMilliseconds();
|
return this.now.getMilliseconds() * this.smooth;
|
||||||
}
|
}
|
||||||
s(): number {
|
s(): number {
|
||||||
return this.now.getSeconds();
|
return this.now.getSeconds();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mkw-analog-clock">
|
<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">
|
<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>
|
</div>
|
||||||
</mk-widget-container>
|
</mk-widget-container>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,12 +13,13 @@ import define from '../../../common/define-widget';
|
||||||
export default define({
|
export default define({
|
||||||
name: 'analog-clock',
|
name: 'analog-clock',
|
||||||
props: () => ({
|
props: () => ({
|
||||||
naked: false
|
design: -1
|
||||||
})
|
})
|
||||||
}).extend({
|
}).extend({
|
||||||
methods: {
|
methods: {
|
||||||
func() {
|
func() {
|
||||||
this.props.naked = !this.props.naked;
|
if (++this.props.design > 2)
|
||||||
|
this.props.design = -1;
|
||||||
this.save();
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue