enhance(frontend): 外部アプリ認証画面の改良 (#14828)
* enhance(frontend): 外部アプリ認証画面の改良 * 🎨 * lint * Update Changelog * indent * lint * enhance: miauthのリダイレクト先をUI内でも表示するように * 🎨 * fix * fix
This commit is contained in:
@@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
ref="dialog"
|
||||
:width="500"
|
||||
:height="600"
|
||||
@close="dialog?.close()"
|
||||
@close="onClose"
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<template #header>{{ i18n.ts.signup }}</template>
|
||||
@@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
:leaveToClass="$style.transition_x_leaveTo"
|
||||
>
|
||||
<template v-if="!isAcceptedServerRule">
|
||||
<XServerRules @done="isAcceptedServerRule = true" @cancel="dialog?.close()"/>
|
||||
<XServerRules @done="isAcceptedServerRule = true" @cancel="onClose"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<XSignup :autoSet="autoSet" @signup="onSignup" @signupEmailPending="onSignupEmailPending"/>
|
||||
@@ -48,6 +48,7 @@ const props = withDefaults(defineProps<{
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'done', res: Misskey.entities.SignupResponse): void;
|
||||
(ev: 'cancelled'): void;
|
||||
(ev: 'closed'): void;
|
||||
}>();
|
||||
|
||||
@@ -55,6 +56,11 @@ const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||
|
||||
const isAcceptedServerRule = ref(false);
|
||||
|
||||
function onClose() {
|
||||
emit('cancelled');
|
||||
dialog.value?.close();
|
||||
}
|
||||
|
||||
function onSignup(res: Misskey.entities.SignupResponse) {
|
||||
emit('done', res);
|
||||
dialog.value?.close();
|
||||
|
Reference in New Issue
Block a user