From 06c1686f5dbb690014d021fa7356d7641c0ab972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D0=B8=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 28 Jan 2025 11:57:03 +0000 Subject: [PATCH 01/17] add confirmation for deliting auth method --- src/components/IrdomAuthButton.vue | 26 +++++++++++++++++++++-- src/views/profile/ProfileEditAuthView.vue | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/components/IrdomAuthButton.vue b/src/components/IrdomAuthButton.vue index 6d4212d8..034d4bdc 100644 --- a/src/components/IrdomAuthButton.vue +++ b/src/components/IrdomAuthButton.vue @@ -20,6 +20,8 @@ const props = withDefaults(defineProps(), { unlink: false }); const authUrl = ref(null); +const dialogVisible = ref(false); + onMounted(async () => { const { data } = await apiClient.GET(`/auth/${props.button.link}/auth_url`); if (data) { @@ -29,12 +31,20 @@ onMounted(async () => { async function clickHandler() { if (props.unlink) { - await apiClient.DELETE(`/auth/${props.button.link}`); - location.reload(); // TODO: придумать нормальное решение + dialogVisible.value = true; } else if (authUrl.value) { window.open(authUrl.value, '_self'); } } + +async function confirmUnlink() { + await apiClient.DELETE(`/auth/${props.button.link}`); + location.reload(); // TODO: придумать нормальное решение +} + +function cancelUnlink() { + dialogVisible.value = false; +} diff --git a/src/views/profile/ProfileEditAuthView.vue b/src/views/profile/ProfileEditAuthView.vue index b3f574c4..72065806 100644 --- a/src/views/profile/ProfileEditAuthView.vue +++ b/src/views/profile/ProfileEditAuthView.vue @@ -44,7 +44,7 @@ const canUnlinked = computed(() => :key="button.method" :button="button" :disabled="profileStore.authMethods.length === 1" - unlink + :unlink="true" /> From 9d161b26128707e61baabf6274ff2befab158238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D0=B8=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 28 Jan 2025 12:14:56 +0000 Subject: [PATCH 02/17] fix error for text label in vuetify modal window --- src/components/IrdomAuthButton.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/IrdomAuthButton.vue b/src/components/IrdomAuthButton.vue index 034d4bdc..a6819708 100644 --- a/src/components/IrdomAuthButton.vue +++ b/src/components/IrdomAuthButton.vue @@ -64,7 +64,7 @@ function cancelUnlink() { Вы точно хотите отвязать аккаунт? - Не отвязывать + Не отвязывать Отвязать From 20c85f89441e4d16df50bbc113457f7f3e705217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D0=B8=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 30 Jan 2025 12:33:44 +0000 Subject: [PATCH 03/17] change colours between buttons --- src/components/IrdomAuthButton.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/IrdomAuthButton.vue b/src/components/IrdomAuthButton.vue index a6819708..3f7d20e3 100644 --- a/src/components/IrdomAuthButton.vue +++ b/src/components/IrdomAuthButton.vue @@ -64,8 +64,8 @@ function cancelUnlink() { Вы точно хотите отвязать аккаунт? - Не отвязывать - Отвязать + Не отвязывать + Отвязать From e5ef8174d011852a0981f8784fdaefe907fa8788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D0=B8=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Sat, 15 Feb 2025 22:16:31 +0000 Subject: [PATCH 04/17] add-confirmation-for-delete-auth-method. fix-auth-button-styles --- src/components/IrdomAuthButton.vue | 33 ++++++++++++++++++++++++++---- src/views/auth/AuthView.vue | 13 ++++++++++-- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/components/IrdomAuthButton.vue b/src/components/IrdomAuthButton.vue index 3f7d20e3..0c318182 100644 --- a/src/components/IrdomAuthButton.vue +++ b/src/components/IrdomAuthButton.vue @@ -1,7 +1,6 @@