Browse Source

Copyright fix, changed vue settings output name and fixes template name

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
tags/v14.0.0beta1
John Molakvoæ (skjnldsv) 6 years ago
parent
commit
62667914a0
No account linked to committer's email address

+ 1
- 1
build/vue-builds.sh View File

#!/bin/bash #!/bin/bash


declare -a apps=("./settings/js/main.js" "./apps/updatenotification/js/merged.js")
declare -a apps=("./settings/js/settings-vue.js" "./apps/updatenotification/js/merged.js")
root=$(pwd) root=$(pwd)
entryFile=$1 entryFile=$1



+ 1
- 1
settings/Controller/AppSettingsController.php View File

$params['bundles'] = $this->getBundles(); $params['bundles'] = $this->getBundles();
$this->navigationManager->setActiveEntry('core_apps'); $this->navigationManager->setActiveEntry('core_apps');


$templateResponse = new TemplateResponse('settings', 'settings', ['serverData' => $params]);
$templateResponse = new TemplateResponse('settings', 'settings-vue', ['serverData' => $params]);
$policy = new ContentSecurityPolicy(); $policy = new ContentSecurityPolicy();
$policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com'); $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com');
$templateResponse->setContentSecurityPolicy($policy); $templateResponse->setContentSecurityPolicy($policy);

+ 1
- 1
settings/Controller/UsersController.php View File

$serverData['defaultQuota'] = $defaultQuota; $serverData['defaultQuota'] = $defaultQuota;
$serverData['canChangePassword'] = $canChangePassword; $serverData['canChangePassword'] = $canChangePassword;


return new TemplateResponse('settings', 'settings', ['serverData' => $serverData]);
return new TemplateResponse('settings', 'settings-vue', ['serverData' => $serverData]);
} }


/** /**

+ 2
- 2
settings/Makefile View File

npm run watch npm run watch


clean: clean:
rm -f js/main.js
rm -f js/main.js.map
rm -f js/settings-vue.js
rm -f js/settings-vue.js.map


clean-dev: clean-dev:
rm -rf node_modules rm -rf node_modules

+ 4
- 1
settings/README.md View File



# build for production with minification # build for production with minification
make build-js-production make build-js-production
```

# clean output files
make clean
```

+ 0
- 1
settings/js/main.js.map
File diff suppressed because it is too large
View File


settings/js/settings-vue.js
File diff suppressed because it is too large
View File


+ 1
- 0
settings/js/settings-vue.js.map
File diff suppressed because it is too large
View File


+ 10
- 5
settings/package-lock.json View File

{ {
"name": "settings", "name": "settings",
"version": "1.1.0",
"version": "1.1.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true
"dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true
"dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true
"dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true
"dev": true,
"optional": true
} }
} }
}, },

+ 1
- 1
settings/package.json View File

{ {
"name": "settings", "name": "settings",
"description": "Nextcloud settings", "description": "Nextcloud settings",
"version": "1.1.0",
"version": "1.1.1",
"author": "John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>", "author": "John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>",
"license": "AGPL3", "license": "AGPL3",
"private": true, "private": true,

+ 22
- 0
settings/src/App.vue View File

<!--
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->

<template> <template>
<router-view></router-view> <router-view></router-view>
</template> </template>

+ 23
- 1
settings/src/components/appNavigation.vue View File

<!--
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->

<template> <template>
<div id="app-navigation" :class="{'icon-loading': menu.loading}"> <div id="app-navigation" :class="{'icon-loading': menu.loading}">
<div class="app-navigation-new" v-if="menu.new"> <div class="app-navigation-new" v-if="menu.new">
components: { components: {
navigationItem navigationItem
} }
}
};
</script> </script>

+ 21
- 0
settings/src/components/appNavigation/navigationItem.vue View File

<!--
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->
<template> <template>
<nav-element :id="item.id" v-bind="navElement(item)" <nav-element :id="item.id" v-bind="navElement(item)"
:class="[{'icon-loading-small': item.loading, 'open': item.opened, 'collapsible': item.collapsible&&item.children&&item.children.length>0 }, item.classes]"> :class="[{'icon-loading-small': item.loading, 'open': item.opened, 'collapsible': item.collapsible&&item.children&&item.children.length>0 }, item.classes]">

+ 22
- 0
settings/src/components/popoverMenu.vue View File

<!--
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->

<template> <template>
<ul> <ul>
<popover-item v-for="(item, key) in menu" :item="item" :key="key" /> <popover-item v-for="(item, key) in menu" :item="item" :key="key" />

+ 23
- 1
settings/src/components/popoverMenu/popoverItem.vue View File

<!--
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->

<template> <template>
<li> <li>
<!-- If item.href is set, a link will be directly used --> <!-- If item.href is set, a link will be directly used -->
<script> <script>
export default { export default {
props: ['item'] props: ['item']
}
};
</script> </script>

+ 22
- 0
settings/src/components/userList.vue View File

<!--
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->
<template> <template>
<div id="app-content" class="user-list-grid" v-on:scroll.passive="onScroll"> <div id="app-content" class="user-list-grid" v-on:scroll.passive="onScroll">
<div class="row" id="grid-header" :class="{'sticky': scrolled && !showConfig.showNewUserForm}"> <div class="row" id="grid-header" :class="{'sticky': scrolled && !showConfig.showNewUserForm}">

+ 22
- 0
settings/src/components/userList/userRow.vue View File

<!--
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->

<template> <template>
<!-- Obfuscated user: Logged in user does not have permissions to see all of the data --> <!-- Obfuscated user: Logged in user does not have permissions to see all of the data -->
<div class="row" v-if="Object.keys(user).length ===1"> <div class="row" v-if="Object.keys(user).length ===1">

+ 22
- 0
settings/src/main.js View File

/*
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import Vue from 'vue'; import Vue from 'vue';
import { sync } from 'vuex-router-sync'; import { sync } from 'vuex-router-sync';
import App from './App.vue'; import App from './App.vue';

+ 26
- 3
settings/src/router.js View File

import Vue from 'vue';
/*
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import Vue from 'vue';
import Router from 'vue-router'; import Router from 'vue-router';
import Users from './views/Users'; import Users from './views/Users';
import Apps from './views/Apps'; import Apps from './views/Apps';
* This is the list of routes where the vuejs app will * This is the list of routes where the vuejs app will
* take over php to provide data * take over php to provide data
* You need to forward the php routing (routes.php) to * You need to forward the php routing (routes.php) to
* /settings/main.php, where the vue-router will ensure
* the proper route.
* the settings-vue template, where the vue-router will
* ensure the proper route.
* ⚠️ Routes needs to match the php routes. * ⚠️ Routes needs to match the php routes.
*/ */



+ 22
- 0
settings/src/store/api.js View File

/*
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import axios from 'axios'; import axios from 'axios';


const requestToken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken'); const requestToken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken');

+ 23
- 0
settings/src/store/index.js View File

/*
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import users from './users'; import users from './users';

+ 22
- 0
settings/src/store/oc.js View File

/*
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import api from './api'; import api from './api';


const state = {}; const state = {};

+ 22
- 0
settings/src/store/settings.js View File

/*
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import api from './api'; import api from './api';


const state = { const state = {

+ 22
- 0
settings/src/store/users.js View File

/*
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import api from './api'; import api from './api';


const orderGroups = function(groups, orderBy) { const orderGroups = function(groups, orderBy) {

+ 22
- 0
settings/src/views/Users.vue View File

<!--
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
- @license GNU AGPL version 3 or any later version
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-->

<template> <template>
<div id="app"> <div id="app">
<app-navigation :menu="menu"> <app-navigation :menu="menu">

settings/templates/settings.php → settings/templates/settings-vue.php View File

* *
*/ */


script('settings', 'main');
script('settings', 'settings-vue');
style('settings', 'settings'); style('settings', 'settings');


// Did we have some data to inject ? // Did we have some data to inject ?

+ 1
- 1
settings/webpack.common.js View File

output: { output: {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/', publicPath: '/',
filename: 'main.js'
filename: 'settings-vue.js'
}, },
module: { module: {
rules: [ rules: [

Loading…
Cancel
Save