Add profile default setting for admin

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/29372/head
Christopher Ng 4 years ago
parent 1fc0b4320c
commit 108abd77ed
  1. 16
      apps/settings/lib/Settings/Admin/Server.php
  2. 101
      apps/settings/src/components/BasicSettings/ProfileSettings.vue
  3. 49
      apps/settings/src/main-admin-basic-settings.js
  4. 24
      apps/settings/src/service/ProfileService.js
  5. 7
      apps/settings/templates/settings/admin/server.php
  6. 11
      apps/settings/tests/Settings/Admin/ServerTest.php
  7. 4
      dist/accessibility-accessibility.js
  8. 2
      dist/accessibility-accessibility.js.map
  9. 4
      dist/accessibility-accessibilityoca.js
  10. 2
      dist/accessibility-accessibilityoca.js.map
  11. 4
      dist/comments-comments-app.js
  12. 2
      dist/comments-comments-app.js.map
  13. 4
      dist/core-common.js
  14. 2
      dist/core-common.js.map
  15. 4
      dist/core-files_client.js
  16. 2
      dist/core-files_client.js.map
  17. 4
      dist/core-install.js
  18. 2
      dist/core-install.js.map
  19. 4
      dist/core-login.js
  20. 2
      dist/core-login.js.map
  21. 4
      dist/core-main.js
  22. 2
      dist/core-main.js.map
  23. 4
      dist/core-maintenance.js
  24. 2
      dist/core-maintenance.js.map
  25. 4
      dist/core-profile.js
  26. 2
      dist/core-profile.js.map
  27. 4
      dist/core-recommendedapps.js
  28. 2
      dist/core-recommendedapps.js.map
  29. 4
      dist/core-systemtags.js
  30. 2
      dist/core-systemtags.js.map
  31. 4
      dist/core-unified-search.js
  32. 2
      dist/core-unified-search.js.map
  33. 4
      dist/dashboard-main.js
  34. 2
      dist/dashboard-main.js.map
  35. 4
      dist/dav-settings-admin-caldav.js
  36. 2
      dist/dav-settings-admin-caldav.js.map
  37. 4
      dist/dav-settings-personal-availability.js
  38. 2
      dist/dav-settings-personal-availability.js.map
  39. 4
      dist/files-main.js
  40. 2
      dist/files-main.js.map
  41. 4
      dist/files-personal-settings.js
  42. 2
      dist/files-personal-settings.js.map
  43. 4
      dist/files-sidebar.js
  44. 2
      dist/files-sidebar.js.map
  45. 4
      dist/files_sharing-additionalScripts.js
  46. 2
      dist/files_sharing-additionalScripts.js.map
  47. 4
      dist/files_sharing-files_sharing_tab.js
  48. 2
      dist/files_sharing-files_sharing_tab.js.map
  49. 4
      dist/files_sharing-personal-settings.js
  50. 2
      dist/files_sharing-personal-settings.js.map
  51. 4
      dist/files_trashbin-files_trashbin.js
  52. 2
      dist/files_trashbin-files_trashbin.js.map
  53. 4
      dist/files_versions-files_versions.js
  54. 2
      dist/files_versions-files_versions.js.map
  55. 4
      dist/oauth2-oauth2.js
  56. 2
      dist/oauth2-oauth2.js.map
  57. 2
      dist/settings-apps-view-418.js
  58. 1
      dist/settings-apps-view-418.js.map
  59. 2
      dist/settings-apps-view-7418.js
  60. 1
      dist/settings-apps-view-7418.js.map
  61. 4
      dist/settings-apps.js
  62. 2
      dist/settings-apps.js.map
  63. 3
      dist/settings-users-351.js
  64. 1
      dist/settings-users-351.js.map
  65. 3
      dist/settings-users-8351.js
  66. 0
      dist/settings-users-8351.js.LICENSE.txt
  67. 1
      dist/settings-users-8351.js.map
  68. 3
      dist/settings-vue-settings-admin-basic-settings.js
  69. 65
      dist/settings-vue-settings-admin-basic-settings.js.LICENSE.txt
  70. 1
      dist/settings-vue-settings-admin-basic-settings.js.map
  71. 4
      dist/settings-vue-settings-admin-delegation.js
  72. 2
      dist/settings-vue-settings-admin-delegation.js.map
  73. 4
      dist/settings-vue-settings-admin-security.js
  74. 2
      dist/settings-vue-settings-admin-security.js.map
  75. 4
      dist/settings-vue-settings-apps-users-management.js
  76. 2
      dist/settings-vue-settings-apps-users-management.js.map
  77. 4
      dist/settings-vue-settings-nextcloud-pdf.js
  78. 2
      dist/settings-vue-settings-nextcloud-pdf.js.map
  79. 4
      dist/settings-vue-settings-personal-info.js
  80. 2
      dist/settings-vue-settings-personal-info.js.map
  81. 4
      dist/settings-vue-settings-personal-security.js
  82. 2
      dist/settings-vue-settings-personal-security.js.map
  83. 4
      dist/settings-vue-settings-personal-webauthn.js
  84. 2
      dist/settings-vue-settings-personal-webauthn.js.map
  85. 4
      dist/systemtags-systemtags.js
  86. 2
      dist/systemtags-systemtags.js.map
  87. 4
      dist/twofactor_backupcodes-settings.js
  88. 2
      dist/twofactor_backupcodes-settings.js.map
  89. 4
      dist/updatenotification-updatenotification.js
  90. 2
      dist/updatenotification-updatenotification.js.map
  91. 2
      dist/user-status-modal-299.js
  92. 1
      dist/user-status-modal-299.js.map
  93. 2
      dist/user-status-modal-8299.js
  94. 1
      dist/user-status-modal-8299.js.map
  95. 4
      dist/user_status-dashboard.js
  96. 2
      dist/user_status-dashboard.js.map
  97. 4
      dist/user_status-menu.js
  98. 2
      dist/user_status-menu.js.map
  99. 4
      dist/weather_status-weather-status.js
  100. 2
      dist/weather_status-weather-status.js.map
  101. Some files were not shown because too many files have changed in this diff Show More

@ -25,7 +25,10 @@
*/
namespace OCA\Settings\Settings\Admin;
use OC\Profile\ProfileManager;
use OC\Profile\TProfileHelper;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IConfig;
use OCP\IDBConnection;
@ -33,9 +36,14 @@ use OCP\IL10N;
use OCP\Settings\IDelegatedSettings;
class Server implements IDelegatedSettings {
use TProfileHelper;
/** @var IDBConnection */
private $connection;
/** @var IInitialState */
private $initialStateService;
/** @var ProfileManager */
private $profileManager;
/** @var ITimeFactory */
private $timeFactory;
/** @var IConfig */
@ -44,10 +52,14 @@ class Server implements IDelegatedSettings {
private $l;
public function __construct(IDBConnection $connection,
IInitialState $initialStateService,
ProfileManager $profileManager,
ITimeFactory $timeFactory,
IConfig $config,
IL10N $l) {
$this->connection = $connection;
$this->initialStateService = $initialStateService;
$this->profileManager = $profileManager;
$this->timeFactory = $timeFactory;
$this->config = $config;
$this->l = $l;
@ -65,8 +77,12 @@ class Server implements IDelegatedSettings {
'cronErrors' => $this->config->getAppValue('core', 'cronErrors'),
'cli_based_cron_possible' => function_exists('posix_getpwuid'),
'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '',
'profileEnabledGlobally' => $this->profileManager->isProfileEnabled(),
];
$this->initialStateService->provideInitialState('profileEnabledGlobally', $this->profileManager->isProfileEnabled());
$this->initialStateService->provideInitialState('profileEnabledByDefault', $this->isProfileEnabledByDefault($this->config));
return new TemplateResponse('settings', 'settings/admin/server', $parameters, '');
}

@ -0,0 +1,101 @@
<!--
- @copyright 2022 Christopher Ng <chrng8@gmail.com>
-
- @author Christopher Ng <chrng8@gmail.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>
<div id="profile-settings"
class="section">
<h2 class="inlineblock">
{{ t('settings', 'Profile') }}
</h2>
<p class="settings-hint">
{{ t('settings', 'Enable or disable profile by default for new users.') }}
</p>
<CheckboxRadioSwitch type="switch"
:checked.sync="initialProfileEnabledByDefault"
@update:checked="onProfileDefaultChange">
{{ t('settings', 'Enable') }}
</CheckboxRadioSwitch>
</div>
</template>
<script>
import { loadState } from '@nextcloud/initial-state'
import { showError } from '@nextcloud/dialogs'
import { saveProfileDefault } from '../../service/ProfileService'
import { validateBoolean } from '../../utils/validate'
import CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'
const profileEnabledByDefault = loadState('settings', 'profileEnabledByDefault', true)
export default {
name: 'ProfileSettings',
components: {
CheckboxRadioSwitch,
},
data() {
return {
initialProfileEnabledByDefault: profileEnabledByDefault,
}
},
methods: {
async onProfileDefaultChange(isEnabled) {
if (validateBoolean(isEnabled)) {
await this.updateProfileDefault(isEnabled)
}
},
async updateProfileDefault(isEnabled) {
try {
const responseData = await saveProfileDefault(isEnabled)
this.handleResponse({
isEnabled,
status: responseData.ocs?.meta?.status,
})
} catch (e) {
this.handleResponse({
errorMessage: t('settings', 'Unable to update profile default setting'),
error: e,
})
}
},
handleResponse({ isEnabled, status, errorMessage, error }) {
if (status === 'ok') {
this.initialProfileEnabledByDefault = isEnabled
} else {
showError(errorMessage)
this.logger.error(errorMessage, error)
}
},
},
}
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,49 @@
/**
* @copyright 2022 Christopher Ng <chrng8@gmail.com>
*
* @author Christopher Ng <chrng8@gmail.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 { getRequestToken } from '@nextcloud/auth'
import { loadState } from '@nextcloud/initial-state'
import { translate as t } from '@nextcloud/l10n'
import '@nextcloud/dialogs/styles/toast.scss'
import logger from './logger'
import ProfileSettings from './components/BasicSettings/ProfileSettings'
__webpack_nonce__ = btoa(getRequestToken())
const profileEnabledGlobally = loadState('settings', 'profileEnabledGlobally', true)
Vue.mixin({
props: {
logger,
},
methods: {
t,
},
})
if (profileEnabledGlobally) {
const ProfileSettingsView = Vue.extend(ProfileSettings)
new ProfileSettingsView().$mount('.vue-admin-profile-settings')
}

@ -45,3 +45,27 @@ export const saveProfileParameterVisibility = async (paramId, visibility) => {
return res.data
}
/**
* Save profile default
*
* @param {boolean} isEnabled the default
* @return {object}
*/
export const saveProfileDefault = async (isEnabled) => {
// Convert to string for compatibility
isEnabled = isEnabled ? '1' : '0'
const url = generateOcsUrl('/apps/provisioning_api/api/v1/config/apps/{appId}/{key}', {
appId: 'settings',
key: 'profile_enabled_by_default',
})
await confirmPassword()
const res = await axios.post(url, {
value: isEnabled,
})
return res.data
}

@ -24,6 +24,9 @@
/** @var \OCP\IL10N $l */
/** @var array $_ */
script('settings', [
'vue-settings-admin-basic-settings',
]);
?>
<div class="section" id="backgroundjobs">
@ -112,3 +115,7 @@
</fieldset>
</form>
</div>
<?php if ($_['profileEnabledGlobally']) : ?>
<div class="vue-admin-profile-settings"></div>
<?php endif; ?>

@ -31,8 +31,10 @@ declare(strict_types=1);
*/
namespace OCA\Settings\Tests\Settings\Admin;
use OC\Profile\ProfileManager;
use OCA\Settings\Settings\Admin\Server;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IConfig;
use OCP\IDBConnection;
@ -48,6 +50,10 @@ class ServerTest extends TestCase {
private $admin;
/** @var IDBConnection */
private $connection;
/** @var IInitialState */
private $initialStateService;
/** @var ProfileManager */
private $profileManager;
/** @var ITimeFactory|MockObject */
private $timeFactory;
/** @var IConfig|MockObject */
@ -58,6 +64,8 @@ class ServerTest extends TestCase {
protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
$this->initialStateService = $this->createMock(IInitialState::class);
$this->profileManager = $this->createMock(ProfileManager::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);
$this->l10n = $this->createMock(IL10N::class);
@ -66,6 +74,8 @@ class ServerTest extends TestCase {
->onlyMethods(['cronMaxAge'])
->setConstructorArgs([
$this->connection,
$this->initialStateService,
$this->profileManager,
$this->timeFactory,
$this->config,
$this->l10n,
@ -106,6 +116,7 @@ class ServerTest extends TestCase {
'cronMaxAge' => 1337,
'cli_based_cron_possible' => true,
'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '', // to not explode here because of posix extension not being disabled - which is already checked in the line above
'profileEnabledGlobally' => true,
],
''
);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,3 +1,3 @@
/*! For license information please see accessibility-accessibilityoca.js.LICENSE.txt */
!function(){"use strict";var e,t={27214:function(e,t,n){var r=n(16453);OCA.Accessibility=(0,r.loadState)("accessibility","data"),OCA.Accessibility.checkMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(OCA.Accessibility.theme="dark"),!1!==OCA.Accessibility.theme?document.body.classList.add("theme--".concat(OCA.Accessibility.theme)):document.body.classList.add("theme--light"),!1!==OCA.Accessibility.highcontrast&&document.body.classList.add("theme--highcontrast")}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=t,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},e=[],r.O=function(t,n,i,o){if(!n){var c=1/0;for(s=0;s<e.length;s++){n=e[s][0],i=e[s][1],o=e[s][2];for(var a=!0,u=0;u<n.length;u++)(!1&o||c>=o)&&Object.keys(r.O).every((function(e){return r.O[e](n[u])}))?n.splice(u--,1):(a=!1,o<c&&(c=o));if(a){e.splice(s--,1);var d=i();void 0!==d&&(t=d)}}return t}o=o||0;for(var s=e.length;s>0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[n,i,o]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.j=883,function(){r.b=document.baseURI||self.location.href;var e={883:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,o,c=n[0],a=n[1],u=n[2],d=0;if(c.some((function(t){return 0!==e[t]}))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(u)var s=u(r)}for(t&&t(n);d<c.length;d++)o=c[d],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(s)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var i=r.O(void 0,[874],(function(){return r(27214)}));i=r.O(i)}();
//# sourceMappingURL=accessibility-accessibilityoca.js.map?v=77a8a6564b4758fa562c
!function(){"use strict";var e,t={27214:function(e,t,n){var r=n(16453);OCA.Accessibility=(0,r.loadState)("accessibility","data"),OCA.Accessibility.checkMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(OCA.Accessibility.theme="dark"),!1!==OCA.Accessibility.theme?document.body.classList.add("theme--".concat(OCA.Accessibility.theme)):document.body.classList.add("theme--light"),!1!==OCA.Accessibility.highcontrast&&document.body.classList.add("theme--highcontrast")}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=t,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},e=[],r.O=function(t,n,i,o){if(!n){var c=1/0;for(s=0;s<e.length;s++){n=e[s][0],i=e[s][1],o=e[s][2];for(var a=!0,u=0;u<n.length;u++)(!1&o||c>=o)&&Object.keys(r.O).every((function(e){return r.O[e](n[u])}))?n.splice(u--,1):(a=!1,o<c&&(c=o));if(a){e.splice(s--,1);var d=i();void 0!==d&&(t=d)}}return t}o=o||0;for(var s=e.length;s>0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[n,i,o]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.j=2883,function(){r.b=document.baseURI||self.location.href;var e={2883:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,o,c=n[0],a=n[1],u=n[2],d=0;if(c.some((function(t){return 0!==e[t]}))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(u)var s=u(r)}for(t&&t(n);d<c.length;d++)o=c[d],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(s)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var i=r.O(void 0,[7874],(function(){return r(27214)}));i=r.O(i)}();
//# sourceMappingURL=accessibility-accessibilityoca.js.map?v=d152d172f19100cde55e

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,2 +1,2 @@
!function(){"use strict";var n,e={49e3:function(n,e,t){var o=t(4820),r=(0,t(79753).getRootUrl)()+"/status.php";!function n(){console.info("checking the Nextcloud maintenance status"),o.default.get(r).then((function(n){return n.data})).then((function(e){if(!1===e.maintenance)return console.info("Nextcloud is not in maintenance mode anymore -> reloading"),void window.location.reload();console.info("Nextcloud is still in maintenance mode"),setTimeout(n,2e4)})).catch(console.error.bind(void 0))}()}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=e,o.amdD=function(){throw new Error("define cannot be used indirect")},o.amdO={},n=[],o.O=function(e,t,r,i){if(!t){var u=1/0;for(l=0;l<n.length;l++){t=n[l][0],r=n[l][1],i=n[l][2];for(var c=!0,a=0;a<t.length;a++)(!1&i||u>=i)&&Object.keys(o.O).every((function(n){return o.O[n](t[a])}))?t.splice(a--,1):(c=!1,i<u&&(u=i));if(c){n.splice(l--,1);var f=r();void 0!==f&&(e=f)}}return e}i=i||0;for(var l=n.length;l>0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[t,r,i]},o.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(e,{a:e}),e},o.d=function(n,e){for(var t in e)o.o(e,t)&&!o.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.nmd=function(n){return n.paths=[],n.children||(n.children=[]),n},o.j=802,function(){o.b=document.baseURI||self.location.href;var n={802:0};o.O.j=function(e){return 0===n[e]};var e=function(e,t){var r,i,u=t[0],c=t[1],a=t[2],f=0;if(u.some((function(e){return 0!==n[e]}))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(a)var l=a(o)}for(e&&e(t);f<u.length;f++)i=u[f],o.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return o.O(l)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))}();var r=o.O(void 0,[874],(function(){return o(49e3)}));r=o.O(r)}();
//# sourceMappingURL=core-maintenance.js.map?v=8c58a08df0fabf3cf91d
!function(){"use strict";var n,e={49e3:function(n,e,t){var o=t(4820),r=(0,t(79753).getRootUrl)()+"/status.php";!function n(){console.info("checking the Nextcloud maintenance status"),o.default.get(r).then((function(n){return n.data})).then((function(e){if(!1===e.maintenance)return console.info("Nextcloud is not in maintenance mode anymore -> reloading"),void window.location.reload();console.info("Nextcloud is still in maintenance mode"),setTimeout(n,2e4)})).catch(console.error.bind(void 0))}()}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=e,o.amdD=function(){throw new Error("define cannot be used indirect")},o.amdO={},n=[],o.O=function(e,t,r,i){if(!t){var u=1/0;for(l=0;l<n.length;l++){t=n[l][0],r=n[l][1],i=n[l][2];for(var c=!0,a=0;a<t.length;a++)(!1&i||u>=i)&&Object.keys(o.O).every((function(n){return o.O[n](t[a])}))?t.splice(a--,1):(c=!1,i<u&&(u=i));if(c){n.splice(l--,1);var f=r();void 0!==f&&(e=f)}}return e}i=i||0;for(var l=n.length;l>0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[t,r,i]},o.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(e,{a:e}),e},o.d=function(n,e){for(var t in e)o.o(e,t)&&!o.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.nmd=function(n){return n.paths=[],n.children||(n.children=[]),n},o.j=1802,function(){o.b=document.baseURI||self.location.href;var n={1802:0};o.O.j=function(e){return 0===n[e]};var e=function(e,t){var r,i,u=t[0],c=t[1],a=t[2],f=0;if(u.some((function(e){return 0!==n[e]}))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(a)var l=a(o)}for(e&&e(t);f<u.length;f++)i=u[f],o.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return o.O(l)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))}();var r=o.O(void 0,[7874],(function(){return o(49e3)}));r=o.O(r)}();
//# sourceMappingURL=core-maintenance.js.map?v=1b4f16bb5395363395e8

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,65 @@
/**
* @copyright 2021 Christopher Ng <chrng8@gmail.com>
*
* @author Christopher Ng <chrng8@gmail.com>
*
* @license AGPL-3.0-or-later
*
* 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/>.
*
*/
/**
* @copyright 2021, Christopher Ng <chrng8@gmail.com>
*
* @author Christopher Ng <chrng8@gmail.com>
*
* @license AGPL-3.0-or-later
*
* 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/>.
*
*/
/**
* @copyright 2022 Christopher Ng <chrng8@gmail.com>
*
* @author Christopher Ng <chrng8@gmail.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/>.
*
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,3 +1,3 @@
/*! For license information please see settings-vue-settings-nextcloud-pdf.js.LICENSE.txt */
!function(){"use strict";var e,n={27853:function(e,n,t){var r=!0===(0,t(16453).loadState)("settings","has-reasons-use-nextcloud-pdf");window.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("open-reasons-use-nextcloud-pdf");e&&r&&e.addEventListener("click",(function(e){e.preventDefault(),OCA.Viewer.open({path:"/Reasons to use Nextcloud.pdf"})}))}))}},t={};function r(e){var o=t[e];if(void 0!==o)return o.exports;var u=t[e]={id:e,loaded:!1,exports:{}};return n[e].call(u.exports,u,u.exports,r),u.loaded=!0,u.exports}r.m=n,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},e=[],r.O=function(n,t,o,u){if(!t){var i=1/0;for(d=0;d<e.length;d++){t=e[d][0],o=e[d][1],u=e[d][2];for(var c=!0,f=0;f<t.length;f++)(!1&u||i>=u)&&Object.keys(r.O).every((function(e){return r.O[e](t[f])}))?t.splice(f--,1):(c=!1,u<i&&(i=u));if(c){e.splice(d--,1);var a=o();void 0!==a&&(n=a)}}return n}u=u||0;for(var d=e.length;d>0&&e[d-1][2]>u;d--)e[d]=e[d-1];e[d]=[t,o,u]},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.j=636,function(){r.b=document.baseURI||self.location.href;var e={636:0};r.O.j=function(n){return 0===e[n]};var n=function(n,t){var o,u,i=t[0],c=t[1],f=t[2],a=0;if(i.some((function(n){return 0!==e[n]}))){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(f)var d=f(r)}for(n&&n(t);a<i.length;a++)u=i[a],r.o(e,u)&&e[u]&&e[u][0](),e[u]=0;return r.O(d)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}();var o=r.O(void 0,[874],(function(){return r(27853)}));o=r.O(o)}();
//# sourceMappingURL=settings-vue-settings-nextcloud-pdf.js.map?v=931fa13cff66a4c5959d
!function(){"use strict";var e,n={27853:function(e,n,t){var r=!0===(0,t(16453).loadState)("settings","has-reasons-use-nextcloud-pdf");window.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("open-reasons-use-nextcloud-pdf");e&&r&&e.addEventListener("click",(function(e){e.preventDefault(),OCA.Viewer.open({path:"/Reasons to use Nextcloud.pdf"})}))}))}},t={};function r(e){var o=t[e];if(void 0!==o)return o.exports;var u=t[e]={id:e,loaded:!1,exports:{}};return n[e].call(u.exports,u,u.exports,r),u.loaded=!0,u.exports}r.m=n,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},e=[],r.O=function(n,t,o,u){if(!t){var i=1/0;for(d=0;d<e.length;d++){t=e[d][0],o=e[d][1],u=e[d][2];for(var c=!0,f=0;f<t.length;f++)(!1&u||i>=u)&&Object.keys(r.O).every((function(e){return r.O[e](t[f])}))?t.splice(f--,1):(c=!1,u<i&&(i=u));if(c){e.splice(d--,1);var a=o();void 0!==a&&(n=a)}}return n}u=u||0;for(var d=e.length;d>0&&e[d-1][2]>u;d--)e[d]=e[d-1];e[d]=[t,o,u]},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.j=7636,function(){r.b=document.baseURI||self.location.href;var e={7636:0};r.O.j=function(n){return 0===e[n]};var n=function(n,t){var o,u,i=t[0],c=t[1],f=t[2],a=0;if(i.some((function(n){return 0!==e[n]}))){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(f)var d=f(r)}for(n&&n(t);a<i.length;a++)u=i[a],r.o(e,u)&&e[u]&&e[u][0](),e[u]=0;return r.O(d)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}();var o=r.O(void 0,[7874],(function(){return r(27853)}));o=r.O(o)}();
//# sourceMappingURL=settings-vue-settings-nextcloud-pdf.js.map?v=3b2559cbf2901f9d22f2

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save