Fix various errors reported by eslint

And also make sure eslint doesn't try to index apps-extra that contains
other repo with not necessarely the same eslint rules

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pull/32558/head
Carl Schwan 2 years ago
parent 45a75c631e
commit 6d883a8572

@ -6,6 +6,7 @@ node_modules/
**/js/* **/js/*
*.config.js *.config.js
tests/lib/ tests/lib/
apps-extra
# TODO: remove when comments files is not using handlebar templates anymore # TODO: remove when comments files is not using handlebar templates anymore
apps/comments/src/templates.js apps/comments/src/templates.js

@ -124,6 +124,6 @@ export default {
console.error(errorMessage, error) console.error(errorMessage, error)
} }
}, },
} },
} }
</script> </script>

@ -117,7 +117,7 @@ window.addEventListener('DOMContentLoaded', () => {
}, },
error: () => { error: () => {
OC.msg.finishedError('#publicShareDisclaimerStatus', t('settings', 'Not saved')) OC.msg.finishedError('#publicShareDisclaimerStatus', t('settings', 'Not saved'))
} },
} }
OC.msg.startSaving('#publicShareDisclaimerStatus') OC.msg.startSaving('#publicShareDisclaimerStatus')
@ -194,7 +194,7 @@ window.addEventListener('DOMContentLoaded', () => {
}, },
error: (xhr) => { error: (xhr) => {
OC.msg.finishedError('#mail_settings_msg', xhr.responseJSON) OC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)
} },
}) })
} }
@ -214,7 +214,7 @@ window.addEventListener('DOMContentLoaded', () => {
}, },
error: (xhr) => { error: (xhr) => {
OC.msg.finishedError('#mail_settings_msg', xhr.responseJSON) OC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)
} },
}) })
} }
@ -239,7 +239,7 @@ window.addEventListener('DOMContentLoaded', () => {
}, },
error: (xhr) => { error: (xhr) => {
OC.msg.finishedError('#sendtestmail_msg', xhr.responseJSON) OC.msg.finishedError('#sendtestmail_msg', xhr.responseJSON)
} },
}) })
}) })

@ -2,5 +2,5 @@ import rebuildNavigation from './service/rebuild-navigation.js'
window.OC.Settings = window.OC.Settings || {} window.OC.Settings = window.OC.Settings || {}
window.OC.Settings.Apps = window.OC.Settings.Apps || { window.OC.Settings.Apps = window.OC.Settings.Apps || {
rebuildNavigation rebuildNavigation,
} }

@ -24,7 +24,6 @@
<SettingsSection :title="t('settings', 'Background jobs')" <SettingsSection :title="t('settings', 'Background jobs')"
:description="t('settings', `For the server to work properly, it's important to configure background jobs correctly. Cron is the recommended setting. Please see the documentation for more information.`)" :description="t('settings', `For the server to work properly, it's important to configure background jobs correctly. Cron is the recommended setting. Please see the documentation for more information.`)"
:doc-url="backgroundJobsDocUrl"> :doc-url="backgroundJobsDocUrl">
<template v-if="lastCron !== 0"> <template v-if="lastCron !== 0">
<span v-if="oldExecution" class="error"> <span v-if="oldExecution" class="error">
{{ t('settings', 'Last job execution ran {time}. Something seems wrong.', {time: relativeTime}) }} {{ t('settings', 'Last job execution ran {time}. Something seems wrong.', {time: relativeTime}) }}
@ -34,7 +33,7 @@
{{ t('settings', "Some jobs havent been executed since {maxAgeRelativeTime}. Please consider increasing the execution frequency.", {maxAgeRelativeTime}) }} {{ t('settings', "Some jobs havent been executed since {maxAgeRelativeTime}. Please consider increasing the execution frequency.", {maxAgeRelativeTime}) }}
</span> </span>
<span class="warning" v-else-if="longExecutionCron"> <span v-else-if="longExecutionCron" class="warning">
{{ t('settings', "Some jobs havent been executed since {maxAgeRelativeTime}. Please consider switching to system cron.", {maxAgeRelativeTime}) }} {{ t('settings', "Some jobs havent been executed since {maxAgeRelativeTime}. Please consider switching to system cron.", {maxAgeRelativeTime}) }}
</span> </span>
@ -43,7 +42,7 @@
</span> </span>
</template> </template>
<span class="error" v-else> <span v-else class="error">
{{ t('settings', 'Background job didnt run yet!') }} {{ t('settings', 'Background job didnt run yet!') }}
</span> </span>
@ -66,11 +65,11 @@
</CheckboxRadioSwitch> </CheckboxRadioSwitch>
<em>{{ t('settings', 'cron.php is registered at a webcron service to call cron.php every 5 minutes over HTTP. Use case: Very small instance (15 users depending on the usage).') }}</em> <em>{{ t('settings', 'cron.php is registered at a webcron service to call cron.php every 5 minutes over HTTP. Use case: Very small instance (15 users depending on the usage).') }}</em>
<CheckboxRadioSwitch type="radio" <CheckboxRadioSwitch v-if="cliBasedCronPossible"
type="radio"
:checked.sync="backgroundJobsMode" :checked.sync="backgroundJobsMode"
value="cron" value="cron"
name="backgroundJobsMode" name="backgroundJobsMode"
v-if="cliBasedCronPossible"
@update:checked="onBackgroundJobModeChanged"> @update:checked="onBackgroundJobModeChanged">
{{ t('settings', 'Cron (Recommended)') }} {{ t('settings', 'Cron (Recommended)') }}
</CheckboxRadioSwitch> </CheckboxRadioSwitch>
@ -137,7 +136,7 @@ export default {
}, },
longExecutionCron() { longExecutionCron() {
return Date.now() / 1000 - this.cronMaxAge > 12 * 3600 && this.backgroundJobsMode === 'cron' return Date.now() / 1000 - this.cronMaxAge > 12 * 3600 && this.backgroundJobsMode === 'cron'
} },
}, },
methods: { methods: {
async onBackgroundJobModeChanged(backgroundJobsMode) { async onBackgroundJobModeChanged(backgroundJobsMode) {
@ -150,10 +149,10 @@ export default {
try { try {
const { data } = await axios.post(url, { const { data } = await axios.post(url, {
value: backgroundJobsMode value: backgroundJobsMode,
}) })
this.handleResponse({ this.handleResponse({
status: data.ocs?.meta?.status status: data.ocs?.meta?.status,
}) })
} catch (e) { } catch (e) {
this.handleResponse({ this.handleResponse({
@ -184,7 +183,7 @@ export default {
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} }
} },
}, },
} }
</script> </script>

@ -71,7 +71,7 @@ export default {
value: stringValue, value: stringValue,
}) })
this.handleResponse({ this.handleResponse({
status: data.ocs?.meta?.status status: data.ocs?.meta?.status,
}) })
} catch (e) { } catch (e) {
this.handleResponse({ this.handleResponse({
@ -86,6 +86,6 @@ export default {
console.error(errorMessage, error) console.error(errorMessage, error)
} }
}, },
} },
} }
</script> </script>

@ -52,7 +52,7 @@
// done if handling the event with the file list already // done if handling the event with the file list already
// created. // created.
shown: true, shown: true,
systemTagIds: initialTags systemTagIds: initialTags,
} }
) )

@ -41,7 +41,7 @@ const propsData = {
preloadedUserStatus: { preloadedUserStatus: {
message: userStatusData.message, message: userStatusData.message,
icon: userStatusData.icon, icon: userStatusData.icon,
status: userStatusData.status status: userStatusData.status,
}, },
user: avatarDiv.dataset.user, user: avatarDiv.dataset.user,
displayName: avatarDiv.dataset.displayname, displayName: avatarDiv.dataset.displayname,

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 */ /*! For license information please see sharebymail-vue-settings-admin-sharebymail.js.LICENSE.txt */
!function(){"use strict";var e,n={92328:function(e,n,r){var o=r(20144),a=r(22200),i=r(9944),s=(r(73317),r(7826)),u=r.n(s),c=r(67776),l=r.n(c),d=r(16453),f=r(26932),p=r(4820),h=r(79753),v=r(10128),m=r.n(v);function y(e,t,n,r,o,a,i){try{var s=e[a](i),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){y(a,r,o,i,s,"next",e)}function s(e){y(a,r,o,i,s,"throw",e)}i(void 0)}))}}var w={name:"AdminSettings",components:{CheckboxRadioSwitch:u(),SettingsSection:l()},data:function(){return{sendPasswordMail:(0,d.loadState)("sharebymail","sendPasswordMail"),replyToInitiator:(0,d.loadState)("sharebymail","replyToInitiator")}},methods:{update:function(e,n){var r=this;return b(regeneratorRuntime.mark((function o(){var a,i,s,u,c,l;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,m()();case 2:return a=(0,h.generateOcsUrl)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:e}),i=n?"yes":"no",o.prev=4,o.next=7,p.default.post(a,{value:i});case 7:c=o.sent,l=c.data,r.handleResponse({status:null===(s=l.ocs)||void 0===s||null===(u=s.meta)||void 0===u?void 0:u.status}),o.next=15;break;case 12:o.prev=12,o.t0=o.catch(4),r.handleResponse({errorMessage:t("sharebymail","Unable to update share by mail config"),error:o.t0});case 15:case"end":return o.stop()}}),o,null,[[4,12]])})))()},handleResponse:function(e){return b(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.status,r=e.errorMessage,o=e.error,"ok"!==n&&((0,f.x2)(r),console.error(r,o));case 2:case"end":return t.stop()}}),t)})))()}}},g=(0,r(51900).Z)(w,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SettingsSection",{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.")}},[n("CheckboxRadioSwitch",{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(" "),n("CheckboxRadioSwitch",{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;r.nc=btoa((0,a.getRequestToken)()),o.default.mixin({methods:{t:i.translate}}),(new(o.default.extend(g))).$mount("#vue-admin-sharebymail")}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=n,o.amdD=function(){throw new Error("define cannot be used indirect")},o.amdO={},e=[],o.O=function(t,n,r,a){if(!n){var i=1/0;for(l=0;l<e.length;l++){n=e[l][0],r=e[l][1],a=e[l][2];for(var s=!0,u=0;u<n.length;u++)(!1&a||i>=a)&&Object.keys(o.O).every((function(e){return o.O[e](n[u])}))?n.splice(u--,1):(s=!1,a<i&&(i=a));if(s){e.splice(l--,1);var c=r();void 0!==c&&(t=c)}}return t}a=a||0;for(var l=e.length;l>0&&e[l-1][2]>a;l--)e[l]=e[l-1];e[l]=[n,r,a]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},o.j=3173,function(){o.b=document.baseURI||self.location.href;var e={3173:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,a,i=n[0],s=n[1],u=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(u)var l=u(o)}for(t&&t(n);c<i.length;c++)a=i[c],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(l)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var a=o.O(void 0,[7874],(function(){return o(92328)}));a=o.O(a)}(); !function(){"use strict";var e,n={23653:function(e,n,r){var o=r(20144),a=r(22200),i=r(9944),s=(r(73317),r(7826)),u=r.n(s),c=r(67776),l=r.n(c),d=r(16453),f=r(26932),p=r(4820),h=r(79753),v=r(10128),m=r.n(v);function y(e,t,n,r,o,a,i){try{var s=e[a](i),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){y(a,r,o,i,s,"next",e)}function s(e){y(a,r,o,i,s,"throw",e)}i(void 0)}))}}var w={name:"AdminSettings",components:{CheckboxRadioSwitch:u(),SettingsSection:l()},data:function(){return{sendPasswordMail:(0,d.loadState)("sharebymail","sendPasswordMail"),replyToInitiator:(0,d.loadState)("sharebymail","replyToInitiator")}},methods:{update:function(e,n){var r=this;return b(regeneratorRuntime.mark((function o(){var a,i,s,u,c,l;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,m()();case 2:return a=(0,h.generateOcsUrl)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:e}),i=n?"yes":"no",o.prev=4,o.next=7,p.default.post(a,{value:i});case 7:c=o.sent,l=c.data,r.handleResponse({status:null===(s=l.ocs)||void 0===s||null===(u=s.meta)||void 0===u?void 0:u.status}),o.next=15;break;case 12:o.prev=12,o.t0=o.catch(4),r.handleResponse({errorMessage:t("sharebymail","Unable to update share by mail config"),error:o.t0});case 15:case"end":return o.stop()}}),o,null,[[4,12]])})))()},handleResponse:function(e){return b(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.status,r=e.errorMessage,o=e.error,"ok"!==n&&((0,f.x2)(r),console.error(r,o));case 2:case"end":return t.stop()}}),t)})))()}}},g=(0,r(51900).Z)(w,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SettingsSection",{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.")}},[n("CheckboxRadioSwitch",{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(" "),n("CheckboxRadioSwitch",{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;r.nc=btoa((0,a.getRequestToken)()),o.default.mixin({methods:{t:i.translate}}),(new(o.default.extend(g))).$mount("#vue-admin-sharebymail")}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=n,o.amdD=function(){throw new Error("define cannot be used indirect")},o.amdO={},e=[],o.O=function(t,n,r,a){if(!n){var i=1/0;for(l=0;l<e.length;l++){n=e[l][0],r=e[l][1],a=e[l][2];for(var s=!0,u=0;u<n.length;u++)(!1&a||i>=a)&&Object.keys(o.O).every((function(e){return o.O[e](n[u])}))?n.splice(u--,1):(s=!1,a<i&&(i=a));if(s){e.splice(l--,1);var c=r();void 0!==c&&(t=c)}}return t}a=a||0;for(var l=e.length;l>0&&e[l-1][2]>a;l--)e[l]=e[l-1];e[l]=[n,r,a]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},o.j=3173,function(){o.b=document.baseURI||self.location.href;var e={3173:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,a,i=n[0],s=n[1],u=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(u)var l=u(o)}for(t&&t(n);c<i.length;c++)a=i[c],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(l)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var a=o.O(void 0,[7874],(function(){return o(23653)}));a=o.O(a)}();
//# sourceMappingURL=sharebymail-vue-settings-admin-sharebymail.js.map?v=ce2293be73e039f5d908 //# sourceMappingURL=sharebymail-vue-settings-admin-sharebymail.js.map?v=b744b09a06a265516a3b

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
Loading…
Cancel
Save