From a2ce072ae7bd9249754f1151efcbbde3aafc3a27 Mon Sep 17 00:00:00 2001
From: fuyu <54523771+mfmfuyu@users.noreply.github.com>
Date: Fri, 14 Feb 2020 23:31:24 +0900
Subject: アナログ時計ウィジェットを移植 (#5944)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* アナログ時計ウィジェットを移植

* analog-clock -> clock
---
 src/client/widgets/clock.vue | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 src/client/widgets/clock.vue

(limited to 'src/client/widgets/clock.vue')

diff --git a/src/client/widgets/clock.vue b/src/client/widgets/clock.vue
new file mode 100644
index 0000000000..bd521813b7
--- /dev/null
+++ b/src/client/widgets/clock.vue
@@ -0,0 +1,42 @@
+<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>
-- 
cgit v1.2.3-freya

