diff options
author | Devlin Junker <devlin.junker@gmail.com> | 2022-11-09 22:28:16 -0800 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-11-17 14:50:53 +0100 |
commit | 7753837f6cebfaac4cc0c9f8ac09810210e99a3f (patch) | |
tree | 222a46af64221774fd080844b04541c94be67c8b | |
parent | c6b4bcc00e5202e85388a0624d149e8b1df386f8 (diff) |
ensure admin settings page is working
Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | js/.gitkeep | 0 | ||||
-rw-r--r-- | package-lock.json | 138 | ||||
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | templates/admin.php | 8 | ||||
-rw-r--r-- | webpack.config.js | 13 | ||||
-rw-r--r-- | webpack.js | 11 |
7 files changed, 150 insertions, 25 deletions
@@ -173,7 +173,7 @@ appstore: # on macOS there is no option "--parents" for the "cp" command mkdir -p $(appstore_sign_dir)/$(app_name)/js/build $(appstore_sign_dir)/$(app_name)/js/admin cp js/build/app.min.js $(appstore_sign_dir)/$(app_name)/js/build - cp js/build/news-admin-settings.js* $(appstore_sign_dir)/$(app_name)/js/build + cp js/nextcloud-news-admin-settings.js* $(appstore_sign_dir)/$(app_name)/js/build # export the key and cert to a file @if [ ! -f $(cert_dir)/$(app_name).key ] || [ ! -f $(cert_dir)/$(app_name).crt ]; then \ @@ -228,4 +228,4 @@ feed-server: .PHONY: nextcloud-server nextcloud-server: - php -S 127.0.0.1:8080 -t $(CURDIR)/../../.
\ No newline at end of file + php -S 127.0.0.1:8080 -t $(CURDIR)/../../. diff --git a/js/.gitkeep b/js/.gitkeep deleted file mode 100644 index e69de29bb..000000000 --- a/js/.gitkeep +++ /dev/null diff --git a/package-lock.json b/package-lock.json index d241114ad..f643fb2e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "@nextcloud/browserslist-config": "^2.2.0", "@nextcloud/eslint-config": "^8.0.0", "@nextcloud/eslint-plugin": "^2.0.0", + "@nextcloud/password-confirmation": "^4.0.2", "@nextcloud/stylelint-config": "^2.1.2", "@nextcloud/webpack-vue-config": "^5.1.0", "@types/jest": "^29.1.1", @@ -3367,6 +3368,71 @@ "npm": "^7.0.0 || ^8.0.0" } }, + "node_modules/@nextcloud/password-confirmation": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@nextcloud/password-confirmation/-/password-confirmation-4.0.2.tgz", + "integrity": "sha512-5UwPka9hHOOaoevAE9PpPzZYepKJURuogggAp71BrGl8z1mvE8iMckRQ3B7TYwWX5p9pmMtdWtflWIsVA0uvhw==", + "dev": true, + "dependencies": { + "@nextcloud/axios": "^2.0.0", + "@nextcloud/l10n": "^1.6.0", + "@nextcloud/router": "^2.0.0", + "@nextcloud/vue": "^7.0.0-beta.5", + "vue": "^2.7.10" + }, + "engines": { + "node": "^16.0.0", + "npm": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@nextcloud/password-confirmation/node_modules/@nextcloud/auth": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.0.0.tgz", + "integrity": "sha512-v8K8tvjkOsGt1+gKydVeMiEwWLXlfPWSptXnMqP21Xd6pFAQxNuNNCY679XKU4MNaKzpZqLstCCxv/KrjeQv8A==", + "dev": true, + "dependencies": { + "@nextcloud/event-bus": "^3.0.0" + } + }, + "node_modules/@nextcloud/password-confirmation/node_modules/@nextcloud/axios": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.1.0.tgz", + "integrity": "sha512-fUwRQeYfdX0sP+DJnQiqlJfB7ngNHWu6Gbi0nYapkB7IFiLECeL2SWzDOFj+M04j4ApsblEMBqGOJ38WEgdeyA==", + "dev": true, + "dependencies": { + "@nextcloud/auth": "^2.0.0", + "@nextcloud/router": "^2.0.0", + "axios": "^0.27.2", + "tslib": "^2.4.0" + }, + "engines": { + "node": "^16.0.0", + "npm": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@nextcloud/password-confirmation/node_modules/@nextcloud/event-bus": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-3.0.2.tgz", + "integrity": "sha512-svXCZa4UkoZKsBiGzTi0cVcbPFUOhCm7pMKjGumRwBvHywX+8by478IQ8Grw75PFHxajMJZ0KrOTTM8WnzzEAw==", + "dev": true, + "dependencies": { + "semver": "^7.3.7" + }, + "engines": { + "node": "^16.0.0", + "npm": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@nextcloud/password-confirmation/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "node_modules/@nextcloud/router": { "version": "2.0.0", "license": "GPL-3.0-or-later", @@ -3496,10 +3562,6 @@ "resolved": "https://registry.npmjs.org/splitpanes/-/splitpanes-2.4.1.tgz", "integrity": "sha512-kpEo1WuMXuc6QfdQdO2V/fl/trONlkUKp+pputsLTiW9RMtwEvjb4/aYGm2m3+KAzjmb+zLwr4A4SYZu74+pgQ==" }, - "node_modules/@nextcloud/vue/node_modules/tslib": { - "version": "2.4.0", - "license": "0BSD" - }, "node_modules/@nextcloud/webpack-vue-config": { "version": "5.3.0", "dev": true, @@ -15046,6 +15108,11 @@ "node": ">=0.10.0" } }, + "node_modules/tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + }, "node_modules/tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -18498,6 +18565,61 @@ "core-js": "^3.6.4" } }, + "@nextcloud/password-confirmation": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@nextcloud/password-confirmation/-/password-confirmation-4.0.2.tgz", + "integrity": "sha512-5UwPka9hHOOaoevAE9PpPzZYepKJURuogggAp71BrGl8z1mvE8iMckRQ3B7TYwWX5p9pmMtdWtflWIsVA0uvhw==", + "dev": true, + "requires": { + "@nextcloud/axios": "^2.0.0", + "@nextcloud/l10n": "^1.6.0", + "@nextcloud/router": "^2.0.0", + "@nextcloud/vue": "^7.0.0-beta.5", + "vue": "^2.7.10" + }, + "dependencies": { + "@nextcloud/auth": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.0.0.tgz", + "integrity": "sha512-v8K8tvjkOsGt1+gKydVeMiEwWLXlfPWSptXnMqP21Xd6pFAQxNuNNCY679XKU4MNaKzpZqLstCCxv/KrjeQv8A==", + "dev": true, + "requires": { + "@nextcloud/event-bus": "^3.0.0" + } + }, + "@nextcloud/axios": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.1.0.tgz", + "integrity": "sha512-fUwRQeYfdX0sP+DJnQiqlJfB7ngNHWu6Gbi0nYapkB7IFiLECeL2SWzDOFj+M04j4ApsblEMBqGOJ38WEgdeyA==", + "dev": true, + "requires": { + "@nextcloud/auth": "^2.0.0", + "@nextcloud/router": "^2.0.0", + "axios": "^0.27.2", + "tslib": "^2.4.0" + } + }, + "@nextcloud/event-bus": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-3.0.2.tgz", + "integrity": "sha512-svXCZa4UkoZKsBiGzTi0cVcbPFUOhCm7pMKjGumRwBvHywX+8by478IQ8Grw75PFHxajMJZ0KrOTTM8WnzzEAw==", + "dev": true, + "requires": { + "semver": "^7.3.7" + } + }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + } + } + }, "@nextcloud/router": { "version": "2.0.0", "requires": { @@ -18594,9 +18716,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/splitpanes/-/splitpanes-2.4.1.tgz", "integrity": "sha512-kpEo1WuMXuc6QfdQdO2V/fl/trONlkUKp+pputsLTiW9RMtwEvjb4/aYGm2m3+KAzjmb+zLwr4A4SYZu74+pgQ==" - }, - "tslib": { - "version": "2.4.0" } } }, @@ -27376,6 +27495,11 @@ } } }, + "tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", diff --git a/package.json b/package.json index fa0700f55..20d7ae20c 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@nextcloud/browserslist-config": "^2.2.0", "@nextcloud/eslint-config": "^8.0.0", "@nextcloud/eslint-plugin": "^2.0.0", + "@nextcloud/password-confirmation": "^4.0.2", "@nextcloud/stylelint-config": "^2.1.2", "@nextcloud/webpack-vue-config": "^5.1.0", "@types/jest": "^29.1.1", diff --git a/templates/admin.php b/templates/admin.php new file mode 100644 index 000000000..f36bd27ea --- /dev/null +++ b/templates/admin.php @@ -0,0 +1,8 @@ +<?php +declare(strict_types=1); +// SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu> +// SPDX-Licence-Identifier: AGPL-3.0-or-later +\OCP\Util::addScript('news', 'nextcloud-news-admin-settings'); +?> + +<div id="vue-admin-news"></div> diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index c329f79d1..000000000 --- a/webpack.config.js +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: Carl Schwan <carl@carlschwan.eu> -// SPDX-License-Identifier: AGPL-3.0-or-later - -const path = require('path') -const webpackConfig = require('@nextcloud/webpack-vue-config') - -webpackConfig.entry = { - 'admin-settings': path.join(__dirname, 'src', 'main-admin.js'), -} -webpackConfig.output.path = path.resolve('./js/build/') -webpackConfig.output.publicPath = path.join('/apps/', process.env.npm_package_name, '/js/build/') - -module.exports = webpackConfig diff --git a/webpack.js b/webpack.js index 4bdb0d02d..9b6a70a0b 100644 --- a/webpack.js +++ b/webpack.js @@ -1,4 +1,11 @@ const webpackConfig = require('@nextcloud/webpack-vue-config') +const path = require('path') + +webpackConfig.entry['admin-settings'] = path.join( + __dirname, + 'src', + 'main-admin.js', +) // Add TS Loader for processing typescript in vue templates webpackConfig.module.rules.push({ @@ -9,9 +16,7 @@ webpackConfig.module.rules.push({ loader: 'ts-loader', options: { transpileOnly: true, - appendTsSuffixTo: [ - '\\.vue$', - ], + appendTsSuffixTo: ['\\.vue$'], }, }, ], |