From 9384f5399da39e53855beb8e7f8ded1aa56bf72e Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Tue, 27 Dec 2022 14:36:33 +0900
Subject: rename: client -> frontend

---
 .../frontend/src/components/MkSigninDialog.vue     | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 packages/frontend/src/components/MkSigninDialog.vue

(limited to 'packages/frontend/src/components/MkSigninDialog.vue')

diff --git a/packages/frontend/src/components/MkSigninDialog.vue b/packages/frontend/src/components/MkSigninDialog.vue
new file mode 100644
index 0000000000..fd27244516
--- /dev/null
+++ b/packages/frontend/src/components/MkSigninDialog.vue
@@ -0,0 +1,46 @@
+<template>
+<XModalWindow
+	ref="dialog"
+	:width="370"
+	:height="400"
+	@close="onClose"
+	@closed="emit('closed')"
+>
+	<template #header>{{ i18n.ts.login }}</template>
+
+	<MkSignin :auto-set="autoSet" :message="message" @login="onLogin"/>
+</XModalWindow>
+</template>
+
+<script lang="ts" setup>
+import { } from 'vue';
+import MkSignin from '@/components/MkSignin.vue';
+import XModalWindow from '@/components/MkModalWindow.vue';
+import { i18n } from '@/i18n';
+
+const props = withDefaults(defineProps<{
+	autoSet?: boolean;
+	message?: string,
+}>(), {
+	autoSet: false,
+	message: '',
+});
+
+const emit = defineEmits<{
+	(ev: 'done'): void;
+	(ev: 'closed'): void;
+	(ev: 'cancelled'): void;
+}>();
+
+const dialog = $ref<InstanceType<typeof XModalWindow>>();
+
+function onClose() {
+	emit('cancelled');
+	dialog.close();
+}
+
+function onLogin(res) {
+	emit('done', res);
+	dialog.close();
+}
+</script>
-- 
cgit v1.2.3-freya

