mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 10:33:09 +02:00
43 lines
792 B
Vue
43 lines
792 B
Vue
|
<template>
|
||
|
<div class="mkw-clock">
|
||
|
<mk-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.style < 2"/>
|
||
|
</div>
|
||
|
</mk-container>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import define from './define';
|
||
|
|
||
|
import MkContainer from '../components/ui/container.vue';
|
||
|
import MkAnalogClock from '../components/analog-clock.vue';
|
||
|
|
||
|
export default define({
|
||
|
name: 'clock',
|
||
|
props: () => ({
|
||
|
style: 0
|
||
|
})
|
||
|
}).extend({
|
||
|
components: {
|
||
|
MkContainer,
|
||
|
MkAnalogClock
|
||
|
},
|
||
|
methods: {
|
||
|
func() {
|
||
|
this.props.style = (this.props.style + 1) % 4;
|
||
|
this.save();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
.mkw-analog-clock {
|
||
|
.mkw-analog-clock--body {
|
||
|
padding: 8px;
|
||
|
}
|
||
|
}
|
||
|
</style>
|