From e22e671afd44a4e27675f369d2d71bbce60016e7 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 28 Nov 2023 16:07:22 +0100 Subject: [PATCH] Use new API to register Files view Signed-off-by: Louis Chemineau --- package-lock.json | 219 +++++++++++++++++++-------- package.json | 2 +- src/actions/openGroupfolderAction.ts | 4 +- src/main.ts | 10 +- src/services/groupfolders.ts | 2 +- 5 files changed, 163 insertions(+), 74 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8750bd954..6bcb046f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "@nextcloud/auth": "^2.2.1", "@nextcloud/axios": "^2.4.0", "@nextcloud/event-bus": "^3.1.0", - "@nextcloud/files": "^3.0.0-beta.11", + "@nextcloud/files": "^3.0.0", "@nextcloud/l10n": "^2.1.0", "@nextcloud/router": "^2.1.2", "@nextcloud/vue": "^7.12.6", @@ -2364,19 +2364,37 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nextcloud/files": { - "version": "3.0.0-beta.11", - "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.0.0-beta.11.tgz", - "integrity": "sha512-eYPtUo+pBAvY8H0pSDyBJrpUKWILIadOmPVoHKpwOFwljNN3xh+AeT1ofT3oJI6ALfrKD/lDTe18BKU8uhLADA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.0.0.tgz", + "integrity": "sha512-zk5oIuVDyk2gWBKCJ+0B1HE3VjhuGnz2iLNbTcbRuTjMYb6aYCAEn1LY0dXbUQG93ehndYJCOdaYri/TaGrlXw==", "dependencies": { - "@nextcloud/auth": "^2.0.0", - "@nextcloud/l10n": "^2.1.0", - "@nextcloud/logger": "^2.5.0" + "@nextcloud/auth": "^2.2.1", + "@nextcloud/l10n": "^2.2.0", + "@nextcloud/logger": "^2.7.0", + "@nextcloud/paths": "^2.1.0", + "@nextcloud/router": "^2.2.0", + "is-svg": "^5.0.0", + "webdav": "^5.3.0" }, "engines": { "node": "^20.0.0", "npm": "^9.0.0" } }, + "node_modules/@nextcloud/files/node_modules/is-svg": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-5.0.0.tgz", + "integrity": "sha512-sRl7J0oX9yUNamSdc8cwgzh9KBLnQXNzGmW0RVHwg/jEYjGNYHC6UvnYD8+hAeut9WwxRvhG9biK7g/wDGxcMw==", + "dependencies": { + "fast-xml-parser": "^4.1.3" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@nextcloud/initial-state": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-1.2.0.tgz", @@ -2396,31 +2414,32 @@ } }, "node_modules/@nextcloud/l10n": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@nextcloud/l10n/-/l10n-2.1.0.tgz", - "integrity": "sha512-rToqXwxcsDTcijvSdgyJAKuOuW7XggDYH00/t3GN5HzO1lNNnVtOj7cc5WmiTknciM+En2oVSMFIUPs6HehjVQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@nextcloud/l10n/-/l10n-2.2.0.tgz", + "integrity": "sha512-UAM2NJcl/NR46MANSF7Gr7q8/Up672zRyGrxLpN3k4URNmWQM9upkbRME+1K3T29wPrUyOIbQu710ZjvZafqFA==", "dependencies": { - "@nextcloud/router": "^2.0.0", - "dompurify": "^2.4.1", + "@nextcloud/router": "^2.1.2", + "@nextcloud/typings": "^1.7.0", + "dompurify": "^3.0.3", "escape-html": "^1.0.3", "node-gettext": "^3.0.0" }, "engines": { - "node": "^16.0.0", - "npm": "^7.0.0 || ^8.0.0" + "node": "^20.0.0", + "npm": "^9.0.0" } }, "node_modules/@nextcloud/logger": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-2.5.0.tgz", - "integrity": "sha512-vJx5YxPyS9/tg3YoqA8CBN7YTZFHfuhMKJIIWFV28phxXqKhGwKVKh+/Ir8ZIPweIM5n8VNT6JOJq1JjGiMg2w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-2.7.0.tgz", + "integrity": "sha512-DSJg9H1jT2zfr7uoP4tL5hKncyY+LOuxJzLauj0M/f6gnpoXU5WG1Zw8EFPOrRWjkC0ZE+NCqrMnITgdRRpXJQ==", "dependencies": { "@nextcloud/auth": "^2.0.0", "core-js": "^3.6.4" }, "engines": { - "node": "^16.0.0", - "npm": "^7.0.0 || ^8.0.0" + "node": "^20.0.0", + "npm": "^9.0.0" } }, "node_modules/@nextcloud/logger/node_modules/core-js": { @@ -2433,17 +2452,35 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/@nextcloud/paths": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-2.1.0.tgz", + "integrity": "sha512-8wX0gqwez0bTuAS8A0OEiqbbp0ZsqLr07zSErmS6OYhh9KZcSt/kO6lQV5tnrFqIqJVsxwz4kHUjtZXh6DSf9Q==", + "dependencies": { + "core-js": "^3.6.4" + } + }, + "node_modules/@nextcloud/paths/node_modules/core-js": { + "version": "3.33.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.3.tgz", + "integrity": "sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/@nextcloud/router": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-2.1.2.tgz", - "integrity": "sha512-Jj5fgjeHT1vVIgOyUGOeHfwk2KgaO77QGfqZAT6GWXvpAsN0mkqwljkg4FkHrQRouYqCE4VnJ5o8/w0DAN89tA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-2.2.0.tgz", + "integrity": "sha512-M4AVGnB5tt3MYO5RpH/R2jq7z/nW05AmRhk4Lh68krVwRIYGo8pgNikKrPGogHd2Q3UgzF5Py1drHz3uuV99bQ==", "dependencies": { - "@nextcloud/typings": "^1.0.0", + "@nextcloud/typings": "^1.7.0", "core-js": "^3.6.4" }, "engines": { - "node": "^16.0.0", - "npm": "^7.0.0 || ^8.0.0" + "node": "^20.0.0", + "npm": "^9.0.0" } }, "node_modules/@nextcloud/router/node_modules/core-js": { @@ -2472,11 +2509,13 @@ } }, "node_modules/@nextcloud/typings": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.6.0.tgz", - "integrity": "sha512-5uIsteFy9Z9/ZaNGE8w8SDgJp+FK8/LeRLgfnakC2pU8eNKTPlQfkiYR163oEI5Xu5YzwdIzf6/roIXdNinhrw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.7.0.tgz", + "integrity": "sha512-fK1i09FYTfSUBdXswyiCr8ng5MwdWjEWOF7hRvNvq5i+XFUSmGjSsRmpQZFM2AONroHqGGQBkvQqpONUshFBJQ==", "dependencies": { - "@types/jquery": "2.0.60" + "@types/jquery": "3.5.16", + "vue": "^2.7.14", + "vue-router": "<4" }, "engines": { "node": "^16.0.0", @@ -2484,9 +2523,12 @@ } }, "node_modules/@nextcloud/typings/node_modules/@types/jquery": { - "version": "2.0.60", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.60.tgz", - "integrity": "sha512-izi6OBEVrAwaHiqWITjOPBbVtcKZKAXTocJqPZsAKA2lvmbpFEyPSAxgcqmisbiMYj9EvrooUEPLHQeQqVMWAg==" + "version": "3.5.16", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.16.tgz", + "integrity": "sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==", + "dependencies": { + "@types/sizzle": "*" + } }, "node_modules/@nextcloud/vue": { "version": "7.12.6", @@ -2977,8 +3019,7 @@ "node_modules/@types/sizzle": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", - "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==", - "dev": true + "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==" }, "node_modules/@types/sockjs": { "version": "0.3.33", @@ -5670,9 +5711,9 @@ } }, "node_modules/dompurify": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.4.tgz", - "integrity": "sha512-1e2SpqHiRx4DPvmRuXU5J0di3iQACwJM+mFGE2HAkkK7Tbnfk9WcghcAmyWc9CRrjyRRUpmuhPUH6LphQQR3EQ==" + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.6.tgz", + "integrity": "sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==" }, "node_modules/domutils": { "version": "2.8.0", @@ -14019,6 +14060,11 @@ "vue": "^2.6.0" } }, + "node_modules/vue-router": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz", + "integrity": "sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ==" + }, "node_modules/vue-style-loader": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", @@ -16434,13 +16480,27 @@ } }, "@nextcloud/files": { - "version": "3.0.0-beta.11", - "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.0.0-beta.11.tgz", - "integrity": "sha512-eYPtUo+pBAvY8H0pSDyBJrpUKWILIadOmPVoHKpwOFwljNN3xh+AeT1ofT3oJI6ALfrKD/lDTe18BKU8uhLADA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.0.0.tgz", + "integrity": "sha512-zk5oIuVDyk2gWBKCJ+0B1HE3VjhuGnz2iLNbTcbRuTjMYb6aYCAEn1LY0dXbUQG93ehndYJCOdaYri/TaGrlXw==", "requires": { - "@nextcloud/auth": "^2.0.0", - "@nextcloud/l10n": "^2.1.0", - "@nextcloud/logger": "^2.5.0" + "@nextcloud/auth": "^2.2.1", + "@nextcloud/l10n": "^2.2.0", + "@nextcloud/logger": "^2.7.0", + "@nextcloud/paths": "^2.1.0", + "@nextcloud/router": "^2.2.0", + "is-svg": "^5.0.0", + "webdav": "^5.3.0" + }, + "dependencies": { + "is-svg": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-5.0.0.tgz", + "integrity": "sha512-sRl7J0oX9yUNamSdc8cwgzh9KBLnQXNzGmW0RVHwg/jEYjGNYHC6UvnYD8+hAeut9WwxRvhG9biK7g/wDGxcMw==", + "requires": { + "fast-xml-parser": "^4.1.3" + } + } } }, "@nextcloud/initial-state": { @@ -16459,20 +16519,21 @@ } }, "@nextcloud/l10n": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@nextcloud/l10n/-/l10n-2.1.0.tgz", - "integrity": "sha512-rToqXwxcsDTcijvSdgyJAKuOuW7XggDYH00/t3GN5HzO1lNNnVtOj7cc5WmiTknciM+En2oVSMFIUPs6HehjVQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@nextcloud/l10n/-/l10n-2.2.0.tgz", + "integrity": "sha512-UAM2NJcl/NR46MANSF7Gr7q8/Up672zRyGrxLpN3k4URNmWQM9upkbRME+1K3T29wPrUyOIbQu710ZjvZafqFA==", "requires": { - "@nextcloud/router": "^2.0.0", - "dompurify": "^2.4.1", + "@nextcloud/router": "^2.1.2", + "@nextcloud/typings": "^1.7.0", + "dompurify": "^3.0.3", "escape-html": "^1.0.3", "node-gettext": "^3.0.0" } }, "@nextcloud/logger": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-2.5.0.tgz", - "integrity": "sha512-vJx5YxPyS9/tg3YoqA8CBN7YTZFHfuhMKJIIWFV28phxXqKhGwKVKh+/Ir8ZIPweIM5n8VNT6JOJq1JjGiMg2w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-2.7.0.tgz", + "integrity": "sha512-DSJg9H1jT2zfr7uoP4tL5hKncyY+LOuxJzLauj0M/f6gnpoXU5WG1Zw8EFPOrRWjkC0ZE+NCqrMnITgdRRpXJQ==", "requires": { "@nextcloud/auth": "^2.0.0", "core-js": "^3.6.4" @@ -16485,12 +16546,27 @@ } } }, + "@nextcloud/paths": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-2.1.0.tgz", + "integrity": "sha512-8wX0gqwez0bTuAS8A0OEiqbbp0ZsqLr07zSErmS6OYhh9KZcSt/kO6lQV5tnrFqIqJVsxwz4kHUjtZXh6DSf9Q==", + "requires": { + "core-js": "^3.6.4" + }, + "dependencies": { + "core-js": { + "version": "3.33.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.3.tgz", + "integrity": "sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw==" + } + } + }, "@nextcloud/router": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-2.1.2.tgz", - "integrity": "sha512-Jj5fgjeHT1vVIgOyUGOeHfwk2KgaO77QGfqZAT6GWXvpAsN0mkqwljkg4FkHrQRouYqCE4VnJ5o8/w0DAN89tA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-2.2.0.tgz", + "integrity": "sha512-M4AVGnB5tt3MYO5RpH/R2jq7z/nW05AmRhk4Lh68krVwRIYGo8pgNikKrPGogHd2Q3UgzF5Py1drHz3uuV99bQ==", "requires": { - "@nextcloud/typings": "^1.0.0", + "@nextcloud/typings": "^1.7.0", "core-js": "^3.6.4" }, "dependencies": { @@ -16509,17 +16585,22 @@ "requires": {} }, "@nextcloud/typings": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.6.0.tgz", - "integrity": "sha512-5uIsteFy9Z9/ZaNGE8w8SDgJp+FK8/LeRLgfnakC2pU8eNKTPlQfkiYR163oEI5Xu5YzwdIzf6/roIXdNinhrw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.7.0.tgz", + "integrity": "sha512-fK1i09FYTfSUBdXswyiCr8ng5MwdWjEWOF7hRvNvq5i+XFUSmGjSsRmpQZFM2AONroHqGGQBkvQqpONUshFBJQ==", "requires": { - "@types/jquery": "2.0.60" + "@types/jquery": "3.5.16", + "vue": "^2.7.14", + "vue-router": "<4" }, "dependencies": { "@types/jquery": { - "version": "2.0.60", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.60.tgz", - "integrity": "sha512-izi6OBEVrAwaHiqWITjOPBbVtcKZKAXTocJqPZsAKA2lvmbpFEyPSAxgcqmisbiMYj9EvrooUEPLHQeQqVMWAg==" + "version": "3.5.16", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.16.tgz", + "integrity": "sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==", + "requires": { + "@types/sizzle": "*" + } } } }, @@ -16963,8 +17044,7 @@ "@types/sizzle": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", - "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==", - "dev": true + "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==" }, "@types/sockjs": { "version": "0.3.33", @@ -19001,9 +19081,9 @@ } }, "dompurify": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.4.tgz", - "integrity": "sha512-1e2SpqHiRx4DPvmRuXU5J0di3iQACwJM+mFGE2HAkkK7Tbnfk9WcghcAmyWc9CRrjyRRUpmuhPUH6LphQQR3EQ==" + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.6.tgz", + "integrity": "sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==" }, "domutils": { "version": "2.8.0", @@ -25124,6 +25204,11 @@ "@babel/runtime": "^7.13.10" } }, + "vue-router": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz", + "integrity": "sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ==" + }, "vue-style-loader": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", diff --git a/package.json b/package.json index 26ad1eb00..f22bf9d9d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@nextcloud/auth": "^2.2.1", "@nextcloud/axios": "^2.4.0", "@nextcloud/event-bus": "^3.1.0", - "@nextcloud/files": "^3.0.0-beta.11", + "@nextcloud/files": "^3.0.0", "@nextcloud/l10n": "^2.1.0", "@nextcloud/router": "^2.1.2", "@nextcloud/vue": "^7.12.6", diff --git a/src/actions/openGroupfolderAction.ts b/src/actions/openGroupfolderAction.ts index d5085663b..b59548fb7 100644 --- a/src/actions/openGroupfolderAction.ts +++ b/src/actions/openGroupfolderAction.ts @@ -22,7 +22,7 @@ import { translate as t } from '@nextcloud/l10n' import type { Node } from '@nextcloud/files' -import { registerFileAction, FileAction } from '@nextcloud/files' +import { registerFileAction, FileAction, DefaultType } from '@nextcloud/files' registerFileAction(new FileAction({ id: 'open-group-folders', @@ -41,7 +41,7 @@ registerFileAction(new FileAction({ return null as any as boolean }, - default: true, + default: DefaultType.DEFAULT, // Before openFolderAction order: -1000, })) diff --git a/src/main.ts b/src/main.ts index f2fea3103..a10d7139e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,6 +21,7 @@ */ /* eslint-disable */ import { translate as t } from '@nextcloud/l10n' +import { View, getNavigation } from '@nextcloud/files' import FolderSvg from '@mdi/svg/svg/folder-account.svg?raw' import { getContents } from './services/groupfolders' import './actions/openGroupfolderAction' @@ -33,16 +34,19 @@ declare global { const appName: string } -const Navigation = window.OCP.Files.Navigation -Navigation.register({ +const Navigation = getNavigation() +Navigation.register(new View({ id: appName, name: t('groupfolders', 'Group folders'), caption: t('groupfolders', 'List of group folders.'), + emptyTitle: t('files', 'No group folders yet'), + emptyCaption: t('files', 'Group folders will show up here'), + icon: FolderSvg, order: 20, columns: [], getContents, -}) +})) diff --git a/src/services/groupfolders.ts b/src/services/groupfolders.ts index 2fc802306..3603f88f5 100644 --- a/src/services/groupfolders.ts +++ b/src/services/groupfolders.ts @@ -22,7 +22,7 @@ import type { DAVResultResponseProps, FileStat, ResponseDataDetailed } from 'webdav' import { getCurrentUser } from '@nextcloud/auth' -import { File, Folder, Permission, parseWebdavPermissions } from '@nextcloud/files' +import { File, Folder, Permission } from '@nextcloud/files' import { generateRemoteUrl, generateUrl } from '@nextcloud/router' import client, { rootPath } from './client'