From fc768b1d193bc45388bc5cb298b499921ef18b93 Mon Sep 17 00:00:00 2001 From: Thomas Lehmann Date: Mon, 8 Jul 2024 12:42:35 +0200 Subject: [PATCH] [WIP] (fix) security: OC.dialogs.confirm() change to NcDialog TODO: * typing: check whether typing "tokenToBeWiped" is possible without as as IToken | null (otherwise it's not nullable). Object as PropType did not work. * styles: confirm/cancel positioning From https://github.com/nextcloud-libraries/nextcloud-dialogs/issues/1371#issuecomment-2211176448 --- src/components/security/AuthToken.vue | 2 +- src/components/security/AuthTokenList.vue | 1 + src/components/security/AuthTokenSection.vue | 61 +++++++++++++++++++- src/components/security/AuthTokenSetup.vue | 2 + src/oc.d.ts | 17 ------ src/store/authtoken.ts | 21 ------- 6 files changed, 64 insertions(+), 40 deletions(-) diff --git a/src/components/security/AuthToken.vue b/src/components/security/AuthToken.vue index 9b9d764..7f4ada0 100644 --- a/src/components/security/AuthToken.vue +++ b/src/components/security/AuthToken.vue @@ -350,7 +350,7 @@ export default defineComponent({ }, wipe() { this.actionOpen = false - this.authTokenStore.wipeToken(this.token) + this.$emit('wipe', this.token) }, }, }) diff --git a/src/components/security/AuthTokenList.vue b/src/components/security/AuthTokenList.vue index d4532a5..089e34f 100644 --- a/src/components/security/AuthTokenList.vue +++ b/src/components/security/AuthTokenList.vue @@ -40,6 +40,7 @@ diff --git a/src/components/security/AuthTokenSection.vue b/src/components/security/AuthTokenSection.vue index be54a0e..70bcf6f 100644 --- a/src/components/security/AuthTokenSection.vue +++ b/src/components/security/AuthTokenSection.vue @@ -26,14 +26,38 @@

{{ t('simplesettings', 'Web, desktop and mobile clients currently logged in to your account.') }}

- + + + {{ t('simplesettings', 'Do you really want to wipe your data from this device?') }} +
+ + {{ t('simplesettings', 'Cancel') }} + + + + {{ t('simplesettings', 'Confirm wipe') }} + +
+
+ + diff --git a/src/components/security/AuthTokenSetup.vue b/src/components/security/AuthTokenSetup.vue index 44829df..8e5ae48 100644 --- a/src/components/security/AuthTokenSetup.vue +++ b/src/components/security/AuthTokenSetup.vue @@ -44,6 +44,7 @@