Fix eslint and update bundles

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/28115/head
John Molakvoæ (skjnldsv) 3 years ago
parent 49b490ce6d
commit 7ca81f360f
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF

@ -13,5 +13,8 @@ module.exports = {
extends: ['@nextcloud'],
rules: {
'no-tabs': 'warn',
}
// TODO: make sure we fix this as this is bad vue coding style.
// Use proper sync modifier
'vue/no-mutating-props': 'warn',
},
}

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

@ -24,23 +24,27 @@
</template>
<script>
import ItemPreview from './components/ItemPreview'
import axios from '@nextcloud/axios'
import { generateUrl, generateOcsUrl } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
import axios from '@nextcloud/axios'
import ItemPreview from './components/ItemPreview'
const availableConfig = loadState('accessibility', 'available-config')
const userConfig = loadState('accessibility', 'user-config')
export default {
name: 'Accessibility',
components: { ItemPreview },
props: {
availableConfig: {
type: Object,
required: true,
},
userConfig: {
type: Object,
required: true,
},
components: {
ItemPreview,
},
data() {
return {
availableConfig,
userConfig,
}
},
computed: {
themes() {
return this.availableConfig.themes

@ -21,21 +21,12 @@
*/
import Vue from 'vue'
import { loadState } from '@nextcloud/initial-state'
import App from './Accessibility.vue'
// bind to window
Vue.prototype.OC = OC
Vue.prototype.t = t
const availableConfig = loadState('accessibility', 'available-config')
const userConfig = loadState('accessibility', 'user-config')
const View = Vue.extend(App)
const accessibility = new View({
propsData: {
availableConfig,
userConfig,
},
})
const accessibility = new View()
accessibility.$mount('#accessibility')

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,4 +1,4 @@
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/js/",t(t.s=709)}({709:function(e,n){function r(e,n,t,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void t(e)}c.done?n(a):Promise.resolve(a).then(r,o)}
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/js/",t(t.s=682)}({682:function(e,n){function r(e,n,t,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void t(e)}c.done?n(a):Promise.resolve(a).then(r,o)}
/**
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
*

File diff suppressed because one or more lines are too long

@ -1,4 +1,4 @@
!function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(o,i,function(n){return e[n]}.bind(null,i));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/js/",t(t.s=430)}({430:function(e,n,t){"use strict";t.r(n);t(431),t(432),t(433),t(434);
!function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(o,i,function(n){return e[n]}.bind(null,i));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/js/",t(t.s=422)}({422:function(e,n,t){"use strict";t.r(n);t(423),t(424),t(425),t(426);
/**
* @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl>
*
@ -21,7 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
window.OCA.Comments=OCA.Comments},431:function(e,n){
window.OCA.Comments=OCA.Comments},423:function(e,n){
/**
* Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>
*
@ -44,5 +44,5 @@ window.OCA.Comments=OCA.Comments},431:function(e,n){
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
OCA.Comments||(OCA.Comments={})},432:function(e,n){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;o=Handlebars.template,(OCA.Comments.Templates=OCA.Comments.Templates||{}).filesplugin=o({compiler:[8,">= 4.3.0"],main:function(e,n,o,i,r){var s,a=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,m=e.escapeExpression,c=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'<a class="action action-comment permanent" title="'+m("function"===t(s=null!=(s=c(o,"countMessage")||(null!=n?c(n,"countMessage"):n))?s:l)?s.call(a,{name:"countMessage",hash:{},data:r,loc:{start:{line:1,column:50},end:{line:1,column:66}}}):s)+'" href="#">\n\t<img class="svg" src="'+m("function"===t(s=null!=(s=c(o,"iconUrl")||(null!=n?c(n,"iconUrl"):n))?s:l)?s.call(a,{name:"iconUrl",hash:{},data:r,loc:{start:{line:2,column:23},end:{line:2,column:34}}}):s)+'"/>\n</a>\n'},useData:!0})},433:function(e,o){_.extend(OC.Files.Client,{PROPERTY_COMMENTS_UNREAD:"{"+OC.Files.Client.NS_OWNCLOUD+"}comments-unread"}),OCA.Comments=_.extend({},OCA.Comments),OCA.Comments||(OCA.Comments={}),OCA.Comments.FilesPlugin={ignoreLists:["trashbin","files.public"],_formatCommentCount:function(e){return OCA.Comments.Templates.filesplugin({count:e,countMessage:n("comments","%n unread comment","%n unread comments",e),iconUrl:OC.imagePath("core","actions/comment")})},attach:function(e){var o=this;if(!(this.ignoreLists.indexOf(e.id)>=0)){var i=e._getWebdavProperties;e._getWebdavProperties=function(){var e=i.apply(this,arguments);return e.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD),e},e.filesClient.addFileInfoParser((function(e){var n={},t=e.propStat[0].properties[OC.Files.Client.PROPERTY_COMMENTS_UNREAD];return _.isUndefined(t)||""===t||(n.commentsUnread=parseInt(t,10)),n})),e.$el.addClass("has-comments");var r=e._createRow;e._createRow=function(e){var n=r.apply(this,arguments);return e.commentsUnread&&n.attr("data-comments-unread",e.commentsUnread),n},e.fileActions.registerAction({name:"Comment",displayName:function(e){if(e&&e.$file){var o=parseInt(e.$file.data("comments-unread"),10);if(o>=0)return n("comments","1 new comment","{unread} new comments",o,{unread:o})}return t("comments","Comment")},mime:"all",order:-140,iconClass:"icon-comment",permissions:OC.PERMISSION_READ,type:OCA.Files.FileActions.TYPE_INLINE,render:function(e,n,t){var i=t.$file.data("comments-unread");if(i){var r=$(o._formatCommentCount(i));return t.$file.find("a.name>span.fileactions").append(r),r}return""},actionHandler:function(e,n){n.$file.find(".action-comment").tooltip("hide"),OCA.Files.Sidebar.setActiveTab("comments"),OCA.Files.Sidebar.open("/"+e)}});var s=e.elementToFile;e.elementToFile=function(e){var n=s.apply(this,arguments),t=e.data("comments-unread");return t&&(n.commentsUnread=t),n}}}},OC.Plugins.register("OCA.Files.FileList",OCA.Comments.FilesPlugin)},434:function(e,n){OCA.Comments.ActivityTabViewPlugin={prepareModelForDisplay:function(e,n,t){if("comments"===e.get("app")&&"comments"===e.get("type")&&"ActivityTabView"===t&&(n.addClass("comment"),e.get("message")&&this._isLong(e.get("message")))){n.addClass("collapsed");var o=$("<div>").addClass("message-overlay");n.find(".activitymessage").after(o),n.on("click",this._onClickCollapsedComment)}},_onClickCollapsedComment:function(e){var n=$(e.target);n.is(".comment")||(n=n.closest(".comment")),n.removeClass("collapsed")},_isLong:function(e){return e.length>250||(e.match(/\n/g)||[]).length>1}},OC.Plugins.register("OCA.Activity.RenderingPlugins",OCA.Comments.ActivityTabViewPlugin)}});
OCA.Comments||(OCA.Comments={})},424:function(e,n){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;o=Handlebars.template,(OCA.Comments.Templates=OCA.Comments.Templates||{}).filesplugin=o({compiler:[8,">= 4.3.0"],main:function(e,n,o,i,r){var s,a=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,m=e.escapeExpression,c=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'<a class="action action-comment permanent" title="'+m("function"===t(s=null!=(s=c(o,"countMessage")||(null!=n?c(n,"countMessage"):n))?s:l)?s.call(a,{name:"countMessage",hash:{},data:r,loc:{start:{line:1,column:50},end:{line:1,column:66}}}):s)+'" href="#">\n\t<img class="svg" src="'+m("function"===t(s=null!=(s=c(o,"iconUrl")||(null!=n?c(n,"iconUrl"):n))?s:l)?s.call(a,{name:"iconUrl",hash:{},data:r,loc:{start:{line:2,column:23},end:{line:2,column:34}}}):s)+'"/>\n</a>\n'},useData:!0})},425:function(e,o){_.extend(OC.Files.Client,{PROPERTY_COMMENTS_UNREAD:"{"+OC.Files.Client.NS_OWNCLOUD+"}comments-unread"}),OCA.Comments=_.extend({},OCA.Comments),OCA.Comments||(OCA.Comments={}),OCA.Comments.FilesPlugin={ignoreLists:["trashbin","files.public"],_formatCommentCount:function(e){return OCA.Comments.Templates.filesplugin({count:e,countMessage:n("comments","%n unread comment","%n unread comments",e),iconUrl:OC.imagePath("core","actions/comment")})},attach:function(e){var o=this;if(!(this.ignoreLists.indexOf(e.id)>=0)){var i=e._getWebdavProperties;e._getWebdavProperties=function(){var e=i.apply(this,arguments);return e.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD),e},e.filesClient.addFileInfoParser((function(e){var n={},t=e.propStat[0].properties[OC.Files.Client.PROPERTY_COMMENTS_UNREAD];return _.isUndefined(t)||""===t||(n.commentsUnread=parseInt(t,10)),n})),e.$el.addClass("has-comments");var r=e._createRow;e._createRow=function(e){var n=r.apply(this,arguments);return e.commentsUnread&&n.attr("data-comments-unread",e.commentsUnread),n},e.fileActions.registerAction({name:"Comment",displayName:function(e){if(e&&e.$file){var o=parseInt(e.$file.data("comments-unread"),10);if(o>=0)return n("comments","1 new comment","{unread} new comments",o,{unread:o})}return t("comments","Comment")},mime:"all",order:-140,iconClass:"icon-comment",permissions:OC.PERMISSION_READ,type:OCA.Files.FileActions.TYPE_INLINE,render:function(e,n,t){var i=t.$file.data("comments-unread");if(i){var r=$(o._formatCommentCount(i));return t.$file.find("a.name>span.fileactions").append(r),r}return""},actionHandler:function(e,n){n.$file.find(".action-comment").tooltip("hide"),OCA.Files.Sidebar.setActiveTab("comments"),OCA.Files.Sidebar.open("/"+e)}});var s=e.elementToFile;e.elementToFile=function(e){var n=s.apply(this,arguments),t=e.data("comments-unread");return t&&(n.commentsUnread=t),n}}}},OC.Plugins.register("OCA.Files.FileList",OCA.Comments.FilesPlugin)},426:function(e,n){OCA.Comments.ActivityTabViewPlugin={prepareModelForDisplay:function(e,n,t){if("comments"===e.get("app")&&"comments"===e.get("type")&&"ActivityTabView"===t&&(n.addClass("comment"),e.get("message")&&this._isLong(e.get("message")))){n.addClass("collapsed");var o=$("<div>").addClass("message-overlay");n.find(".activitymessage").after(o),n.on("click",this._onClickCollapsedComment)}},_onClickCollapsedComment:function(e){var n=$(e.target);n.is(".comment")||(n=n.closest(".comment")),n.removeClass("collapsed")},_isLong:function(e){return e.length>250||(e.match(/\n/g)||[]).length>1}},OC.Plugins.register("OCA.Activity.RenderingPlugins",OCA.Comments.ActivityTabViewPlugin)}});
//# sourceMappingURL=comments.js.map

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

@ -112,6 +112,7 @@ export default {
* @param {Function} resolve a function to run after the share is added and its component initialized
*/
addShare(share, resolve) {
// eslint-disable-next-line vue/no-mutating-props
this.shares.unshift(share)
this.awaitForShare(share, resolve)
},
@ -140,6 +141,7 @@ export default {
*/
removeShare(share) {
const index = this.shares.findIndex(item => item === share)
// eslint-disable-next-line vue/no-mutating-props
this.shares.splice(index, 1)
},
},

@ -80,6 +80,7 @@ export default {
*/
removeShare(share) {
const index = this.shares.findIndex(item => item === share)
// eslint-disable-next-line vue/no-mutating-props
this.shares.splice(index, 1)
},
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -91,6 +91,7 @@ export default {
deleteClient(id) {
axios.delete(generateUrl('apps/oauth2/clients/{id}', { id }))
.then((response) => {
// eslint-disable-next-line vue/no-mutating-props
this.clients = this.clients.filter(client => client.id !== id)
})
},
@ -104,6 +105,7 @@ export default {
redirectUri: this.newClient.redirectUri,
}
).then(response => {
// eslint-disable-next-line vue/no-mutating-props
this.clients.push(response.data)
this.newClient.name = ''

@ -383,4 +383,4 @@ i.default.use(b.a);var x={setEnforced:function(t,e){i.default.set(t,"enforced",e
*
*/
r.nc=btoa(OC.requestToken),i.default.prototype.t=t,window.OC=window.OC||{},window.OC.Settings=window.OC.Settings||{},w.replaceState(Object(o.loadState)("settings","mandatory2FAState")),new(i.default.extend(y))({store:w}).$mount("#two-factor-auth-settings")}]);
//# sourceMappingURL=vue-settings-admin-security.js.map?v=be49a2ac44968c2ddba1
//# sourceMappingURL=vue-settings-admin-security.js.map?v=1fc687d39cc4634bd5d6

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

@ -222,4 +222,4 @@ r.VTooltip.options.defaultTemplate='<div class="vue-tooltip" role="tooltip" data
*
*/
r.nc=btoa(OC.requestToken),o.default.prototype.t=t,o.default.prototype.logger=i.a;var ht=o.default.extend(mt);n.default=new ht({el:"#vue-emailsection"})}]);
//# sourceMappingURL=vue-settings-personal-info.js.map?v=15eed81bbfb09f00e9d7
//# sourceMappingURL=vue-settings-personal-info.js.map?v=7d443aca148d4b82b7d1

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

@ -201,4 +201,4 @@ r.VTooltip.options.defaultTemplate='<div class="vue-tooltip" role="tooltip" data
*
*/
r.nc=btoa(OC.requestToken),o.default.prototype.t=t,new(o.default.extend(Q))({propsData:{initialDevices:Object(i.loadState)("settings","webauthn-devices"),isHttps:"https:"===window.location.protocol,isLocalhost:"localhost"===window.location.hostname,hasPublicKeyCredential:void 0!==window.PublicKeyCredential}}).$mount("#security-webauthn")}]);
//# sourceMappingURL=vue-settings-personal-webauthn.js.map?v=06e8b9df4aca46e8c31c
//# sourceMappingURL=vue-settings-personal-webauthn.js.map?v=46b2deb69660b2ed86b2

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

@ -94,6 +94,7 @@ export default {
return axios.post(this.baseUrl, data)
.then(resp => resp.data)
.then(tap(() => console.debug('app token created')))
// eslint-disable-next-line vue/no-mutating-props
.then(tap(data => this.tokens.push(data.deviceToken)))
.catch(err => {
console.error.bind('could not create app password', err)
@ -142,6 +143,7 @@ export default {
deleteToken(token) {
console.debug('deleting app token', token)
// eslint-disable-next-line vue/no-mutating-props
this.tokens = this.tokens.filter(t => t !== token)
return axios.delete(this.baseUrl + '/' + token.id)
@ -152,6 +154,7 @@ export default {
OC.Notification.showTemporary(t('core', 'Error while deleting the token'))
// Restore
// eslint-disable-next-line vue/no-mutating-props
this.tokens.push(token)
})
},

@ -574,6 +574,7 @@ export default {
}
},
closeModal() {
// eslint-disable-next-line vue/no-mutating-props
this.showConfig.showNewUserForm = false
},
},

@ -150,11 +150,13 @@
</template>
</AppNavigation>
<AppContent>
<UserList #content
:users="users"
:show-config="showConfig"
:selected-group="selectedGroupDecoded"
:external-actions="externalActions" />
<template #content>
<UserList
:users="users"
:show-config="showConfig"
:selected-group="selectedGroupDecoded"
:external-actions="externalActions" />
</template>
</AppContent>
</Content>
</template>

File diff suppressed because one or more lines are too long

@ -137,7 +137,7 @@
},
})
} else {
// eslint-disable-next-line standard/no-callback-literal
// eslint-disable-next-line node/no-callback-literal
callback([])
}
},

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

@ -24,11 +24,11 @@
id="user-status_panel"
:items="items"
:loading="loading">
<template v-slot:default="{ item }">
<template #default="{ item }">
<DashboardWidgetItem
:main-text="item.mainText"
:sub-text="item.subText">
<template v-slot:avatar>
<template #avatar>
<Avatar
class="item-avatar"
:size="44"
@ -39,7 +39,7 @@
</template>
</DashboardWidgetItem>
</template>
<template v-slot:empty-content>
<template #empty-content>
<EmptyContent
id="user_status-widget-empty-content"
icon="icon-user-status">

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

@ -125,6 +125,7 @@ export default {
if (this.currentOption && this.currentOption.validate) {
this.valid = !!this.currentOption.validate(this.check)
}
// eslint-disable-next-line vue/no-mutating-props
this.check.invalid = !this.valid
this.$emit('validate', this.valid)
},
@ -133,7 +134,9 @@ export default {
if (this.check.class !== this.currentOption.class || matchingOperator === -1) {
this.currentOperator = this.operators[0]
}
// eslint-disable-next-line vue/no-mutating-props
this.check.class = this.currentOption.class
// eslint-disable-next-line vue/no-mutating-props
this.check.operator = this.currentOperator.operator
this.validate()

@ -12,7 +12,7 @@
:auto-limit="false"
:disabled="allEvents.length <= 1"
@input="updateEvent">
<template slot="selection" slot-scope="{ values, search, isOpen }">
<template slot="selection" slot-scope="{ values, isOpen }">
<div v-if="values.length && !isOpen" class="eventlist">
<img class="option__icon" :src="values[0].entity.icon">
<span v-for="(value, index) in values" :key="value.id" class="text option__title option__title_single">{{ value.displayName }} <span v-if="index+1 < values.length">, </span></span>

@ -19,7 +19,7 @@
type="button"
class="check--add"
value="Add a new filter"
@click="rule.checks.push({class: null, operator: null, value: ''})">
@click="onAddFilter">
</p>
</div>
<div class="flow-icon icon-confirm" />
@ -152,6 +152,7 @@ export default {
this.dirty = false
}
},
async removeCheck(check) {
const index = this.rule.checks.findIndex(item => item === check)
if (index > -1) {
@ -159,6 +160,11 @@ export default {
}
this.$store.dispatch('updateRule', this.rule)
},
onAddFilter() {
// eslint-disable-next-line vue/no-mutating-props
this.rule.checks.push({ class: null, operator: null, value: '' })
},
},
}
</script>

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

@ -83,7 +83,7 @@ const deprecate = (func, funcName, version) => {
}
const setDeprecatedProp = (global, cb, msg) => {
(Array.isArray(global) ? global : [global]).map(global => {
(Array.isArray(global) ? global : [global]).forEach(global => {
if (window[global] !== undefined) {
delete window[global]
}

@ -23,8 +23,6 @@
*
*/
import { loadState } from '@nextcloud/initial-state'
import queryString from 'query-string'
import Vue from 'vue'
// eslint-disable-next-line no-unused-vars
@ -32,47 +30,7 @@ import OC from './OC/index' // TODO: Not needed but L10n breaks if removed
import LoginView from './views/Login.vue'
import Nextcloud from './mixins/Nextcloud'
const query = queryString.parse(location.search)
if (query.clear === '1') {
try {
window.localStorage.clear()
window.sessionStorage.clear()
console.debug('Browser storage cleared')
} catch (e) {
console.error('Could not clear browser storage', e)
}
}
Vue.mixin(Nextcloud)
const fromStateOr = (key, orValue) => {
try {
return loadState('core', key)
} catch (e) {
return orValue
}
}
const View = Vue.extend(LoginView)
new View({
propsData: {
errors: fromStateOr('loginErrors', []),
messages: fromStateOr('loginMessages', []),
redirectUrl: fromStateOr('loginRedirectUrl', undefined),
username: fromStateOr('loginUsername', ''),
throttleDelay: fromStateOr('loginThrottleDelay', 0),
invertedColors: OCA.Theming && OCA.Theming.inverted,
canResetPassword: fromStateOr('loginCanResetPassword', false),
resetPasswordLink: fromStateOr('loginResetPasswordLink', ''),
autoCompleteAllowed: fromStateOr('loginAutocomplete', true),
resetPasswordTarget: fromStateOr('resetPasswordTarget', ''),
resetPasswordUser: fromStateOr('resetPasswordUser', ''),
directLogin: query.direct === '1',
hasPasswordless: fromStateOr('webauthn-available', false),
countAlternativeLogins: fromStateOr('countAlternativeLogins', false),
isHttps: window.location.protocol === 'https:',
isLocalhost: window.location.hostname === 'localhost',
hasPublicKeyCredential: typeof (window.PublicKeyCredential) !== 'undefined',
hideLoginForm: fromStateOr('hideLoginForm', false),
},
}).$mount('#login')
new View().$mount('#login')

@ -26,6 +26,6 @@ module.exports = {
sinon: true,
},
rules: {
"node/no-unpublished-import": 'off'
}
'node/no-unpublished-import': 'off',
},
}

@ -111,91 +111,61 @@
</template>
<script>
import { loadState } from '@nextcloud/initial-state'
import queryString from 'query-string'
import LoginForm from '../components/login/LoginForm.vue'
import PasswordLessLoginForm from '../components/login/PasswordLessLoginForm.vue'
import ResetPassword from '../components/login/ResetPassword.vue'
import UpdatePassword from '../components/login/UpdatePassword.vue'
const query = queryString.parse(location.search)
if (query.clear === '1') {
try {
window.localStorage.clear()
window.sessionStorage.clear()
console.debug('Browser storage cleared')
} catch (e) {
console.error('Could not clear browser storage', e)
}
}
export default {
name: 'Login',
components: {
LoginForm,
PasswordLessLoginForm,
ResetPassword,
UpdatePassword,
},
props: {
username: {
type: String,
default: '',
},
redirectUrl: {
type: String,
},
errors: {
type: Array,
default: () => [],
},
messages: {
type: Array,
default: () => [],
},
throttleDelay: {
type: Number,
},
canResetPassword: {
type: Boolean,
default: false,
},
resetPasswordLink: {
type: String,
},
resetPasswordTarget: {
type: String,
},
invertedColors: {
type: Boolean,
default: false,
},
autoCompleteAllowed: {
type: Boolean,
default: true,
},
directLogin: {
type: Boolean,
default: false,
},
hasPasswordless: {
type: Boolean,
default: false,
},
countAlternativeLogins: {
type: Number,
default: 0,
},
isHttps: {
type: Boolean,
default: false,
},
isLocalhost: {
type: Boolean,
default: false,
},
hasPublicKeyCredential: {
type: Boolean,
default: false,
},
hideLoginForm: {
type: Boolean,
default: false,
},
},
data() {
return {
loading: false,
user: this.username,
passwordlessLogin: false,
resetPassword: false,
// Initial data
errors: loadState('core', 'loginErrors', []),
messages: loadState('core', 'loginMessages', []),
redirectUrl: loadState('core', 'loginRedirectUrl', undefined),
username: loadState('core', 'loginUsername', ''),
throttleDelay: loadState('core', 'loginThrottleDelay', 0),
invertedColors: OCA.Theming && OCA.Theming.inverted,
canResetPassword: loadState('core', 'loginCanResetPassword', false),
resetPasswordLink: loadState('core', 'loginResetPasswordLink', ''),
autoCompleteAllowed: loadState('core', 'loginAutocomplete', true),
resetPasswordTarget: loadState('core', 'resetPasswordTarget', ''),
resetPasswordUser: loadState('core', 'resetPasswordUser', ''),
directLogin: query.direct === '1',
hasPasswordless: loadState('core', 'webauthn-available', false),
countAlternativeLogins: loadState('core', 'countAlternativeLogins', false),
isHttps: window.location.protocol === 'https:',
isLocalhost: window.location.hostname === 'localhost',
hasPublicKeyCredential: typeof (window.PublicKeyCredential) !== 'undefined',
hideLoginForm: loadState('core', 'hideLoginForm', false),
}
},
methods: {

Loading…
Cancel
Save