2018-05-29 17:13:39 +03:00
|
|
|
<template>
|
|
|
|
<div class="mkw-analog-clock">
|
2018-07-17 20:02:52 +03:00
|
|
|
<mk-widget-container :naked="!(props.design % 2)" :show-header="false">
|
2018-05-29 17:13:39 +03:00
|
|
|
<div class="mkw-analog-clock--body">
|
2018-07-17 20:02:52 +03:00
|
|
|
<mk-analog-clock :dark="$store.state.device.darkmode" :smooth="!(props.design && ~props.design)"/>
|
2018-05-29 17:13:39 +03:00
|
|
|
</div>
|
|
|
|
</mk-widget-container>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import define from '../../../common/define-widget';
|
|
|
|
export default define({
|
|
|
|
name: 'analog-clock',
|
|
|
|
props: () => ({
|
2018-07-17 20:02:52 +03:00
|
|
|
design: -1
|
2018-05-29 17:13:39 +03:00
|
|
|
})
|
|
|
|
}).extend({
|
|
|
|
methods: {
|
|
|
|
func() {
|
2018-07-17 20:02:52 +03:00
|
|
|
if (++this.props.design > 2)
|
|
|
|
this.props.design = -1;
|
2018-05-29 17:13:39 +03:00
|
|
|
this.save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
@import '~const.styl'
|
|
|
|
|
|
|
|
root(isDark)
|
|
|
|
.mkw-analog-clock--body
|
|
|
|
padding 8px
|
|
|
|
|
|
|
|
.mkw-analog-clock[data-darkmode]
|
|
|
|
root(true)
|
|
|
|
|
|
|
|
.mkw-analog-clock:not([data-darkmode])
|
|
|
|
root(false)
|
|
|
|
|
|
|
|
</style>
|