chore: upgrade typescript, eslint and fix lint

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
pull/39029/head
John Molakvoæ 11 months ago
parent 4cfab4b838
commit cd54f7c7f4
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF

@ -3,21 +3,18 @@ module.exports = {
__webpack_nonce__: true,
_: true,
$: true,
moment: true,
escapeHTML: true,
oc_userconfig: true,
dayNames: true,
escapeHTML: true,
firstDay: true,
'cypress/globals': true,
},
parserOptions: {
parser: '@typescript-eslint/parser',
moment: true,
oc_userconfig: true,
sinon: true,
},
plugins: [
'cypress',
],
extends: [
'@nextcloud',
'@nextcloud/eslint-config/typescript',
'plugin:cypress/recommended',
],
rules: {

@ -0,0 +1,30 @@
/**
* @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.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/>.
*
*/
import { jest } from '@jest/globals'
export const showMessage = jest.fn()
export const showSuccess = jest.fn()
export const showWarning = jest.fn()
export const showInfo = jest.fn()
export const showError = jest.fn()
export const showUndo = jest.fn()

@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"verbatimModuleSyntax": false
}
}

@ -21,11 +21,11 @@
*/
import { action } from './editLocallyAction'
import { expect } from '@jest/globals'
import { File, Folder, Permission } from '@nextcloud/files'
import { File, Permission } from '@nextcloud/files'
import { FileAction } from '../services/FileAction'
import * as ncDialogs from '@nextcloud/dialogs'
import axios from '@nextcloud/axios'
import type { Navigation } from '../services/Navigation'
import ncDialogs from '@nextcloud/dialogs'
const view = {
id: 'files',
@ -140,7 +140,7 @@ describe('Edit locally action execute tests', () => {
test('Edit locally fails and show error', async () => {
jest.spyOn(axios, 'post').mockImplementation(async () => ({}))
jest.spyOn(ncDialogs, 'showError')
jest.spyOn(ncDialogs, 'showError').mockImplementation(async () => ({}))
const file = new File({
id: 1,

@ -21,7 +21,7 @@
*/
import { action } from './openFolderAction'
import { expect } from '@jest/globals'
import { File, Folder, Permission } from '@nextcloud/files'
import { File, Folder, Node, Permission } from '@nextcloud/files'
import { FileAction } from '../services/FileAction'
import type { Navigation } from '../services/Navigation'
@ -139,8 +139,7 @@ describe('Open folder action execute tests', () => {
const goToRouteMock = jest.fn()
window.OCP = { Files: { Router: { goToRoute: goToRouteMock } } }
// @ts-ignore null as Node
const exec = await action.exec(null, view, '/')
const exec = await action.exec(null as unknown as Node, view, '/')
expect(exec).toBe(false)
expect(goToRouteMock).toBeCalledTimes(0)
})

@ -65,4 +65,3 @@ export const action = new FileAction({
})
registerFileAction(action)

@ -1,4 +1,3 @@
<!--
- @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
-

@ -19,14 +19,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import type { Route } from 'vue-router';
import type VueRouter from 'vue-router';
import type { Dictionary } from 'vue-router/types/router';
import type { Location } from 'vue-router/types/router';
import type { Route } from 'vue-router'
import type VueRouter from 'vue-router'
import type { Dictionary, Location } from 'vue-router/types/router'
export default class RouterService {
private _router: VueRouter;
private _router: VueRouter
constructor(router: VueRouter) {
this._router = router
@ -34,12 +33,12 @@ export default class RouterService {
/**
* Trigger a route change on the files app
*
*
* @param path the url path, eg: '/trashbin?dir=/Deleted'
* @param replace replace the current history
* @see https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location
*/
goTo(path: string, replace: boolean = false): Promise<Route> {
goTo(path: string, replace = false): Promise<Route> {
return this._router.push({
path,
replace,
@ -68,4 +67,5 @@ export default class RouterService {
replace,
} as Location)
}
}

@ -161,7 +161,7 @@ describe('Quota rendering', () => {
// TODO: remove when @nextcloud/l10n 2.0 is released
// https://github.com/nextcloud/nextcloud-l10n/pull/542
cy.stub(L10n, 'translate', (app, text, vars = {}, number) => {
cy.log({app, text, vars, number})
cy.log({ app, text, vars, number })
return text.replace(/%n/g, '' + number).replace(/{([^{}]*)}/g, (match, key) => {
return vars[key]
})

@ -1,4 +1,3 @@
<template>
<ul>
<SharingEntrySimple ref="shareEntrySimple"

@ -196,15 +196,13 @@ export default {
return (this.category === 'app-bundles')
},
allBundlesEnabled() {
const self = this
return function(id) {
return self.bundleApps(id).filter(app => !app.active).length === 0
return (id) => {
return this.bundleApps(id).filter(app => !app.active).length === 0
}
},
bundleToggleText() {
const self = this
return function(id) {
if (self.allBundlesEnabled(id)) {
return (id) => {
if (this.allBundlesEnabled(id)) {
return t('settings', 'Disable all')
}
return t('settings', 'Enable all')

@ -123,16 +123,15 @@ export default {
}
},
removeGroup(groupid) {
const self = this
// TODO migrate to a vue js confirm dialog component
OC.dialogs.confirm(
t('settings', 'You are about to remove the group {group}. The users will NOT be deleted.', { group: groupid }),
t('settings', 'Please confirm the group removal '),
function(success) {
(success) => {
if (success) {
self.$store.dispatch('removeGroup', groupid)
this.$store.dispatch('removeGroup', groupid)
}
}
},
)
},
},

@ -87,18 +87,18 @@ export default {
</script>
<style lang="scss" scoped>
.federation-actions__btn {
&::v-deep p {
width: 150px !important;
padding: 8px 0 !important;
color: var(--color-main-text) !important;
font-size: 12.8px !important;
line-height: 1.5em !important;
}
.federation-actions__btn {
&::v-deep p {
width: 150px !important;
padding: 8px 0 !important;
color: var(--color-main-text) !important;
font-size: 12.8px !important;
line-height: 1.5em !important;
}
}
.federation-actions__btn--active {
background-color: var(--color-primary-element-light) !important;
box-shadow: inset 2px 0 var(--color-primary-element) !important;
}
.federation-actions__btn--active {
background-color: var(--color-primary-element-light) !important;
box-shadow: inset 2px 0 var(--color-primary-element) !important;
}
</style>

@ -252,8 +252,8 @@ export default {
const result = await axios.post(generateUrl('/apps/theming/background/color'), { color })
this.update(result.data)
},
debouncePickColor: debounce(function() {
this.pickColor(...arguments)
debouncePickColor: debounce(function(...args) {
this.pickColor(...args)
}, 200),
async pickFile() {

@ -1,4 +1,3 @@
/**
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
*

@ -1,5 +1,3 @@
/* eslint-disable node/no-unpublished-import */
import {
applyChangesToNextcloud,
configureNextcloud,

3
dist/2142-2142.js vendored

File diff suppressed because one or more lines are too long

@ -2,14 +2,6 @@
/*! For license information please see NcActionTextEditable.js.LICENSE.txt */
/**
*
*
* @author Jerry Bendy <jerry@icewingcc.com>
* @licence MIT
*
*/
/**
* @copyright 2022 Louis Chmn <louis@chmn.me>
*
@ -444,3 +436,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**!
* url-search-params-polyfill
*
* @author Jerry Bendy (https://github.com/jerrybendy)
* @licence MIT
*/

File diff suppressed because one or more lines are too long

4
dist/2323-2323.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
dist/6117-6117.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/614-614.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/7816-7816.js vendored

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

@ -84,7 +84,7 @@ object-assign
*/
/*!
* focus-trap 7.4.0
* focus-trap 7.4.3
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/
@ -94,11 +94,11 @@ object-assign
*/
/*!
* tabbable 6.1.1
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/
/*! @license DOMPurify 2.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.5/LICENSE */
/*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/LICENSE */
/*! For license information please see NcActionButton.js.LICENSE.txt */
@ -182,28 +182,6 @@ object-assign
*
*/
/**
* @copyright Copyright (c) 2021 Christoph Wurst
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @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/>.
*
*/
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1

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

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 core-unsupported-browser-redirect.js.LICENSE.txt */
(()=>{"use strict";var e,r,t,o={66592:(e,r,t)=>{var o,n,a=t(77958);t.nc=btoa((0,a.IH)()),window.TESTING||null!==(o=OC)&&void 0!==o&&null!==(n=o.config)&&void 0!==n&&n.no_unsupported_browser_warning||window.addEventListener("DOMContentLoaded",(async function(){const{testSupportedBrowser:e}=await Promise.all([t.e(7874),t.e(7816)]).then(t.bind(t,77816));e()}))}},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var t=n[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,a),t.loaded=!0,t.exports}a.m=o,e=[],a.O=(r,t,o,n)=>{if(!t){var i=1/0;for(u=0;u<e.length;u++){t=e[u][0],o=e[u][1],n=e[u][2];for(var l=!0,d=0;d<t.length;d++)(!1&n||i>=n)&&Object.keys(a.O).every((e=>a.O[e](t[d])))?t.splice(d--,1):(l=!1,n<i&&(i=n));if(l){e.splice(u--,1);var c=o();void 0!==c&&(r=c)}}return r}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[t,o,n]},a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>e+"-"+e+".js?v=ba1cdb83e3d0f3bd12d6",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="nextcloud:",a.l=(e,o,n,i)=>{if(r[e])r[e].push(o);else{var l,d;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var s=c[u];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")==t+n){l=s;break}}l||(d=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",t+n),l.src=e),r[e]=[o];var p=(t,o)=>{l.onerror=l.onload=null,clearTimeout(f);var n=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),t)return t(o)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),d&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=8876,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var r=a.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={8876:0};a.f.j=(r,t)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var n=new Promise(((t,n)=>o=e[r]=[t,n]));t.push(o[2]=n);var i=a.p+a.u(r),l=new Error;a.l(i,(t=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,o[1](l)}}),"chunk-"+r,r)}},a.O.j=r=>0===e[r];var r=(r,t)=>{var o,n,i=t[0],l=t[1],d=t[2],c=0;if(i.some((r=>0!==e[r]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);if(d)var u=d(a)}for(r&&r(t);c<i.length;c++)n=i[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(u)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),a.nc=void 0;var i=a.O(void 0,[7874],(()=>a(66592)));i=a.O(i)})();
//# sourceMappingURL=core-unsupported-browser-redirect.js.map?v=36ec78cb28e91c7d26a5
(()=>{"use strict";var e,r,t,o={66592:(e,r,t)=>{var o,n,a=t(77958);t.nc=btoa((0,a.IH)()),window.TESTING||null!==(o=OC)&&void 0!==o&&null!==(n=o.config)&&void 0!==n&&n.no_unsupported_browser_warning||window.addEventListener("DOMContentLoaded",(async function(){const{testSupportedBrowser:e}=await Promise.all([t.e(7874),t.e(7816)]).then(t.bind(t,77816));e()}))}},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var t=n[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,a),t.loaded=!0,t.exports}a.m=o,e=[],a.O=(r,t,o,n)=>{if(!t){var i=1/0;for(u=0;u<e.length;u++){t=e[u][0],o=e[u][1],n=e[u][2];for(var l=!0,d=0;d<t.length;d++)(!1&n||i>=n)&&Object.keys(a.O).every((e=>a.O[e](t[d])))?t.splice(d--,1):(l=!1,n<i&&(i=n));if(l){e.splice(u--,1);var c=o();void 0!==c&&(r=c)}}return r}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[t,o,n]},a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>e+"-"+e+".js?v=ca086714b73daadbb582",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="nextcloud:",a.l=(e,o,n,i)=>{if(r[e])r[e].push(o);else{var l,d;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var s=c[u];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")==t+n){l=s;break}}l||(d=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",t+n),l.src=e),r[e]=[o];var p=(t,o)=>{l.onerror=l.onload=null,clearTimeout(f);var n=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),t)return t(o)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),d&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=8876,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var r=a.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&!e;)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={8876:0};a.f.j=(r,t)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var n=new Promise(((t,n)=>o=e[r]=[t,n]));t.push(o[2]=n);var i=a.p+a.u(r),l=new Error;a.l(i,(t=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,o[1](l)}}),"chunk-"+r,r)}},a.O.j=r=>0===e[r];var r=(r,t)=>{var o,n,i=t[0],l=t[1],d=t[2],c=0;if(i.some((r=>0!==e[r]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);if(d)var u=d(a)}for(r&&r(t);c<i.length;c++)n=i[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(u)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),a.nc=void 0;var i=a.O(void 0,[7874],(()=>a(66592)));i=a.O(i)})();
//# sourceMappingURL=core-unsupported-browser-redirect.js.map?v=585c80fa4814aca8c0a2

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

@ -21,7 +21,7 @@
*/
/*!
* pinia v2.0.35
* pinia v2.1.4
* (c) 2023 Eduardo San Martin Morote
* @license MIT
*/
@ -32,6 +32,8 @@
* @license MIT
*/
/*! @license DOMPurify 2.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.5/LICENSE */
/*! For license information please see NcAppSettingsDialog.js.LICENSE.txt */
/*! For license information please see NcBreadcrumb.js.LICENSE.txt */

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

@ -1,3 +1,5 @@
/*! @license DOMPurify 2.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.5/LICENSE */
/*! For license information please see NcAppNavigationSpacer.js.LICENSE.txt */
/*! For license information please see NcAppSidebar.js.LICENSE.txt */

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

@ -1,3 +1,3 @@
/*! For license information please see sharebymail-vue-settings-admin-sharebymail.js.LICENSE.txt */
(()=>{"use strict";var e,a={27113:(e,a,i)=>{var o=i(20144),r=i(77958),n=i(31352),s=(i(36144),i(20571)),d=i.n(s),l=i(13299),c=i.n(l),u=i(79954),y=i(64024),p=i(26937),h=i(79753),g=i(10128),m=(i(65509),i(25108));const v={name:"AdminSettings",components:{NcCheckboxRadioSwitch:d(),NcSettingsSection:c()},data:()=>({sendPasswordMail:(0,u.j)("sharebymail","sendPasswordMail"),replyToInitiator:(0,u.j)("sharebymail","replyToInitiator")}),methods:{async update(e,a){await(0,g.confirmPassword)();const i=(0,h.generateOcsUrl)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:e}),o=a?"yes":"no";try{var r,n;const{data:e}=await p.Z.post(i,{value:o});this.handleResponse({status:null===(r=e.ocs)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.status})}catch(e){this.handleResponse({errorMessage:t("sharebymail","Unable to update share by mail config"),error:e})}},async handleResponse(e){let{status:t,errorMessage:a,error:i}=e;"ok"!==t&&((0,y.x2)(a),m.error(a,i))}}},b=(0,i(51900).Z)(v,(function(){var e=this,t=e._self._c;return t("NcSettingsSection",{attrs:{title:e.t("sharebymail","Share by mail"),description:e.t("sharebymail","Allows users to share a personalized link to a file or folder by putting in an email address.")}},[t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.sendPasswordMail},on:{"update:checked":[function(t){e.sendPasswordMail=t},function(t){return e.update("sendpasswordmail",e.sendPasswordMail)}]}},[e._v("\n\t\t"+e._s(e.t("sharebymail","Send password by mail"))+"\n\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.replyToInitiator},on:{"update:checked":[function(t){e.replyToInitiator=t},function(t){return e.update("replyToInitiator",e.replyToInitiator)}]}},[e._v("\n\t\t"+e._s(e.t("sharebymail","Reply to initiator"))+"\n\t")])],1)}),[],!1,null,null,null).exports;i.nc=btoa((0,r.IH)()),o.default.mixin({methods:{t:n.Iu}}),(new(o.default.extend(b))).$mount("#vue-admin-sharebymail")},81490:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo="},90888:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return a[e].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}o.m=a,e=[],o.O=(t,a,i,r)=>{if(!a){var n=1/0;for(c=0;c<e.length;c++){a=e[c][0],i=e[c][1],r=e[c][2];for(var s=!0,d=0;d<a.length;d++)(!1&r||n>=r)&&Object.keys(o.O).every((e=>o.O[e](a[d])))?a.splice(d--,1):(s=!1,r<n&&(n=r));if(s){e.splice(c--,1);var l=i();void 0!==l&&(t=l)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[a,i,r]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=3173,(()=>{o.b=document.baseURI||self.location.href;var e={3173:0};o.O.j=t=>0===e[t];var t=(t,a)=>{var i,r,n=a[0],s=a[1],d=a[2],l=0;if(n.some((t=>0!==e[t]))){for(i in s)o.o(s,i)&&(o.m[i]=s[i]);if(d)var c=d(o)}for(t&&t(a);l<n.length;l++)r=n[l],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return o.O(c)},a=self.webpackChunknextcloud=self.webpackChunknextcloud||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})(),o.nc=void 0;var r=o.O(void 0,[7874],(()=>o(27113)));r=o.O(r)})();
//# sourceMappingURL=sharebymail-vue-settings-admin-sharebymail.js.map?v=afd205e9a4e1f5d1f09a
(()=>{"use strict";var e,a={27113:(e,a,i)=>{var o=i(20144),r=i(77958),n=i(31352),s=(i(36144),i(20571)),d=i.n(s),l=i(13299),c=i.n(l),u=i(79954),y=i(3255),p=i(26937),h=i(79753),g=i(10128),m=(i(65509),i(25108));const v={name:"AdminSettings",components:{NcCheckboxRadioSwitch:d(),NcSettingsSection:c()},data:()=>({sendPasswordMail:(0,u.j)("sharebymail","sendPasswordMail"),replyToInitiator:(0,u.j)("sharebymail","replyToInitiator")}),methods:{async update(e,a){await(0,g.confirmPassword)();const i=(0,h.generateOcsUrl)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:e}),o=a?"yes":"no";try{var r,n;const{data:e}=await p.Z.post(i,{value:o});this.handleResponse({status:null===(r=e.ocs)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.status})}catch(e){this.handleResponse({errorMessage:t("sharebymail","Unable to update share by mail config"),error:e})}},async handleResponse(e){let{status:t,errorMessage:a,error:i}=e;"ok"!==t&&((0,y.x2)(a),m.error(a,i))}}},b=(0,i(51900).Z)(v,(function(){var e=this,t=e._self._c;return t("NcSettingsSection",{attrs:{title:e.t("sharebymail","Share by mail"),description:e.t("sharebymail","Allows users to share a personalized link to a file or folder by putting in an email address.")}},[t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.sendPasswordMail},on:{"update:checked":[function(t){e.sendPasswordMail=t},function(t){return e.update("sendpasswordmail",e.sendPasswordMail)}]}},[e._v("\n\t\t"+e._s(e.t("sharebymail","Send password by mail"))+"\n\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.replyToInitiator},on:{"update:checked":[function(t){e.replyToInitiator=t},function(t){return e.update("replyToInitiator",e.replyToInitiator)}]}},[e._v("\n\t\t"+e._s(e.t("sharebymail","Reply to initiator"))+"\n\t")])],1)}),[],!1,null,null,null).exports;i.nc=btoa((0,r.IH)()),o.default.mixin({methods:{t:n.Iu}}),(new(o.default.extend(b))).$mount("#vue-admin-sharebymail")},81490:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo="},90888:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return a[e].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}o.m=a,e=[],o.O=(t,a,i,r)=>{if(!a){var n=1/0;for(c=0;c<e.length;c++){a=e[c][0],i=e[c][1],r=e[c][2];for(var s=!0,d=0;d<a.length;d++)(!1&r||n>=r)&&Object.keys(o.O).every((e=>o.O[e](a[d])))?a.splice(d--,1):(s=!1,r<n&&(n=r));if(s){e.splice(c--,1);var l=i();void 0!==l&&(t=l)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[a,i,r]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=3173,(()=>{o.b=document.baseURI||self.location.href;var e={3173:0};o.O.j=t=>0===e[t];var t=(t,a)=>{var i,r,n=a[0],s=a[1],d=a[2],l=0;if(n.some((t=>0!==e[t]))){for(i in s)o.o(s,i)&&(o.m[i]=s[i]);if(d)var c=d(o)}for(t&&t(a);l<n.length;l++)r=n[l],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return o.O(c)},a=self.webpackChunknextcloud=self.webpackChunknextcloud||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})(),o.nc=void 0;var r=o.O(void 0,[7874],(()=>o(27113)));r=o.O(r)})();
//# sourceMappingURL=sharebymail-vue-settings-admin-sharebymail.js.map?v=242bb3fff9dc29bfd141

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