From 259dc8999545029bd35c99307b467beca02c1320 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 5 Nov 2024 16:44:53 +0100 Subject: [PATCH] feat: Expose axios interceptors ton inline password confirmation Signed-off-by: Louis Chemineau --- package-lock.json | 51 +++++--- package.json | 1 + src/components/PasswordDialog.vue | 15 ++- src/globals.ts | 18 +++ src/main.ts | 208 +++++++++++++++++++++++++----- 5 files changed, 238 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4f1420e..fa4afce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "5.1.1", "license": "MIT", "dependencies": { + "@nextcloud/auth": "^2.4.0", "@nextcloud/axios": "^2.5.0", "@nextcloud/l10n": "^3.1.0", "@nextcloud/router": "^3.0.1" @@ -1203,17 +1204,40 @@ } }, "node_modules/@nextcloud/auth": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.3.0.tgz", - "integrity": "sha512-PCkRJbML9sXvBENY43vTIERIZJFk2azu08IK6zYOnOZ7cFkD1QlFJtdTCZTImQLg01IXhIm0j0ExEdatHoqz7g==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.4.0.tgz", + "integrity": "sha512-T5OFltKd0O9Hfj47VrzE7TVjCwqOMHH9JLyjjLUR3pu2MaTY9WL6AjL79sHbFTXUaIkftZgJKu12lHYmqXnL2Q==", "dependencies": { - "@nextcloud/event-bus": "^3.2.0" + "@nextcloud/browser-storage": "^0.4.0", + "@nextcloud/event-bus": "^3.3.1" }, "engines": { "node": "^20.0.0", "npm": "^10.0.0" } }, + "node_modules/@nextcloud/auth/node_modules/@nextcloud/browser-storage": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@nextcloud/browser-storage/-/browser-storage-0.4.0.tgz", + "integrity": "sha512-D6XxznxCYmJ3oBCC3p0JB6GZJ2RZ9dgbB1UqtTePXrIvHUMBAeF/YkiGKYxLAVZCZb+NSNZXgAYHm/3LnIUbDg==", + "dependencies": { + "core-js": "3.37.0" + }, + "engines": { + "node": "^20.0.0", + "npm": "^10.0.0" + } + }, + "node_modules/@nextcloud/auth/node_modules/core-js": { + "version": "3.37.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.0.tgz", + "integrity": "sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/@nextcloud/axios": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.5.1.tgz", @@ -1321,12 +1345,12 @@ } }, "node_modules/@nextcloud/event-bus": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-3.2.0.tgz", - "integrity": "sha512-5F3Zjqv12r/VCkzXFnsMZb/lb12eVv7/oDSUFV3njNJoPdu7x6k5kjRM/N4THHoDDRRgBQjgKr9Uyqgppqj6XA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-3.3.1.tgz", + "integrity": "sha512-VBYJspOVk5aZopgZwCUoMKFqcTLCNel2TLvtu0HMPV2gR5ZLPiPAKbkyKkYTh+Sd5QB1gR6l3STTv1gyal0soQ==", "dependencies": { - "@types/node": "^20.12.7", - "semver": "^7.6.0" + "@types/node": "^20.12.12", + "semver": "^7.6.2" }, "engines": { "node": "^20.0.0", @@ -1334,12 +1358,9 @@ } }, "node_modules/@nextcloud/event-bus/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, diff --git a/package.json b/package.json index c029167..cf5fb4f 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "bugs": "https://github.com/nextcloud-libraries/nextcloud-password-confirmation/issues", "license": "MIT", "dependencies": { + "@nextcloud/auth": "^2.4.0", "@nextcloud/axios": "^2.5.0", "@nextcloud/l10n": "^3.1.0", "@nextcloud/router": "^3.0.1" diff --git a/src/components/PasswordDialog.vue b/src/components/PasswordDialog.vue index bf6a77d..43276e6 100644 --- a/src/components/PasswordDialog.vue +++ b/src/components/PasswordDialog.vue @@ -21,7 +21,7 @@ + :disabled="!password || loading"> @@ -32,12 +32,10 @@