2020-01-29 12:37:25 -07:00
|
|
|
<template>
|
2022-07-20 07:24:26 -06:00
|
|
|
<XModalWindow
|
|
|
|
ref="dialog"
|
2020-10-17 05:12:00 -06:00
|
|
|
:width="370"
|
|
|
|
:height="400"
|
2022-05-19 05:28:08 -06:00
|
|
|
@close="onClose"
|
2022-01-15 14:59:35 -07:00
|
|
|
@closed="emit('closed')"
|
2020-10-17 05:12:00 -06:00
|
|
|
>
|
2022-07-20 07:24:26 -06:00
|
|
|
<template #header>{{ i18n.ts.login }}</template>
|
2020-10-17 05:12:00 -06:00
|
|
|
|
2022-05-19 05:28:08 -06:00
|
|
|
<MkSignin :auto-set="autoSet" :message="message" @login="onLogin"/>
|
2020-10-17 05:12:00 -06:00
|
|
|
</XModalWindow>
|
2020-01-29 12:37:25 -07:00
|
|
|
</template>
|
|
|
|
|
2022-01-15 14:59:35 -07:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
2022-08-30 09:24:33 -06:00
|
|
|
import MkSignin from '@/components/MkSignin.vue';
|
2022-09-06 03:21:49 -06:00
|
|
|
import XModalWindow from '@/components/MkModalWindow.vue';
|
2022-07-20 07:24:26 -06:00
|
|
|
import { i18n } from '@/i18n';
|
2020-01-29 12:37:25 -07:00
|
|
|
|
2022-01-15 14:59:35 -07:00
|
|
|
const props = withDefaults(defineProps<{
|
|
|
|
autoSet?: boolean;
|
2022-05-19 05:28:08 -06:00
|
|
|
message?: string,
|
2022-01-15 14:59:35 -07:00
|
|
|
}>(), {
|
|
|
|
autoSet: false,
|
2022-07-20 07:24:26 -06:00
|
|
|
message: '',
|
2022-01-15 14:59:35 -07:00
|
|
|
});
|
2020-01-29 12:37:25 -07:00
|
|
|
|
2022-01-15 14:59:35 -07:00
|
|
|
const emit = defineEmits<{
|
2022-05-19 05:28:08 -06:00
|
|
|
(ev: 'done'): void;
|
|
|
|
(ev: 'closed'): void;
|
|
|
|
(ev: 'cancelled'): void;
|
2022-01-15 14:59:35 -07:00
|
|
|
}>();
|
2020-01-29 12:37:25 -07:00
|
|
|
|
2022-01-15 14:59:35 -07:00
|
|
|
const dialog = $ref<InstanceType<typeof XModalWindow>>();
|
2020-10-17 05:12:00 -06:00
|
|
|
|
2022-05-19 05:28:08 -06:00
|
|
|
function onClose() {
|
|
|
|
emit('cancelled');
|
|
|
|
dialog.close();
|
|
|
|
}
|
|
|
|
|
2022-01-15 14:59:35 -07:00
|
|
|
function onLogin(res) {
|
|
|
|
emit('done', res);
|
|
|
|
dialog.close();
|
|
|
|
}
|
2020-01-29 12:37:25 -07:00
|
|
|
</script>
|