diff --git a/.eslintrc.js b/.eslintrc.js index be6da20033a24e2db9970a9ca63f0f09eefe149b..1f5dd9468f53c91aae9849fd820d5d02cda3a2ef 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,5 +10,8 @@ module.exports = { dayNames: true, firstDay: true }, - extends: ['nextcloud'] + extends: ['nextcloud'], + rules: { + 'no-tabs': 'warn', + } } diff --git a/apps/accessibility/js/accessibility.js.map b/apps/accessibility/js/accessibility.js.map index 6297ccf87a989329b438ec861600fb00016c431b..ccd51efe8bae92193356cd5640f48680d7e0e596 100644 Binary files a/apps/accessibility/js/accessibility.js.map and b/apps/accessibility/js/accessibility.js.map differ diff --git a/apps/accessibility/src/Accessibility.vue b/apps/accessibility/src/Accessibility.vue index 6ba680dc009260b0406254cbed8b42a5311fee68..63cfec20c945597428ad4324a965d9c0b7e13bcc 100644 --- a/apps/accessibility/src/Accessibility.vue +++ b/apps/accessibility/src/Accessibility.vue @@ -34,12 +34,12 @@ export default { props: { availableConfig: { type: Object, - required: true + required: true, }, userConfig: { type: Object, - required: true - } + required: true, + }, }, computed: { themes() { @@ -55,7 +55,7 @@ export default { return { theme: this.userConfig.theme, highcontrast: this.userConfig.highcontrast, - font: this.userConfig.font + font: this.userConfig.font, } }, description() { @@ -87,7 +87,7 @@ export default { }, designteamLink() { return `<a target="_blank" href="https://nextcloud.com/design" rel="noreferrer nofollow">${t('accessibility', 'our design team')}</a>` - } + }, }, methods: { // SELECT handlers @@ -123,17 +123,17 @@ export default { url: generateOcsUrl('apps/accessibility/api/v1/config', 2) + type, method: isDelete ? 'DELETE' : 'PUT', data: { - value: id - } + value: id, + }, }) this.userConfig[type] = id // Remove old link - let link = document.querySelector('link[rel=stylesheet][href*=accessibility][href*=user-]') + const link = document.querySelector('link[rel=stylesheet][href*=accessibility][href*=user-]') if (!link) { // insert new css - let link = document.createElement('link') + const link = document.createElement('link') link.rel = 'stylesheet' link.href = generateUrl('/apps/accessibility/css/user-style.css') + '?v=' + new Date().getTime() document.head.appendChild(link) @@ -157,7 +157,7 @@ export default { console.error(err, err.response) OC.Notification.showTemporary(t('accessibility', err.response.data.ocs.meta.message + '. Unable to apply the setting.')) } - } - } + }, + }, } </script> diff --git a/apps/accessibility/src/components/ItemPreview.vue b/apps/accessibility/src/components/ItemPreview.vue index c0e52cc051367c5cf5616eea39f7d15d26376aef..9c74eb03fd170414598b5b39e1fab6f3a1d07120 100644 --- a/apps/accessibility/src/components/ItemPreview.vue +++ b/apps/accessibility/src/components/ItemPreview.vue @@ -19,12 +19,12 @@ export default { props: { preview: { type: Object, - required: true + required: true, }, selected: { type: String, - default: null - } + default: null, + }, }, computed: { checked: { @@ -33,8 +33,8 @@ export default { }, set(checked) { this.$emit('select', checked ? this.preview.id : '') - } - } - } + }, + }, + }, } </script> diff --git a/apps/accessibility/src/main.js b/apps/accessibility/src/main.js index 0cb5952234bad66691614af2c27e1e0f200b1a7e..2f2db68968d5ee1dec480ece15e6c37bec24d65f 100644 --- a/apps/accessibility/src/main.js +++ b/apps/accessibility/src/main.js @@ -14,7 +14,7 @@ const View = Vue.extend(App) const accessibility = new View({ propsData: { availableConfig, - userConfig - } + userConfig, + }, }) accessibility.$mount('#accessibility') diff --git a/apps/comments/js/comments.js.map b/apps/comments/js/comments.js.map index d9871a2779a970e2fc9176e31653b78a79e50c61..8f7c9551061b5794e72197c99479129488ef82af 100644 Binary files a/apps/comments/js/comments.js.map and b/apps/comments/js/comments.js.map differ diff --git a/apps/comments/src/activitytabviewplugin.js b/apps/comments/src/activitytabviewplugin.js index 2afee4c2be53d63062fe9a36549bd56b09a508de..f7df614766073beb8f339e331936ae357764afe6 100644 --- a/apps/comments/src/activitytabviewplugin.js +++ b/apps/comments/src/activitytabviewplugin.js @@ -27,7 +27,7 @@ $el.addClass('comment') if (model.get('message') && this._isLong(model.get('message'))) { $el.addClass('collapsed') - var $overlay = $('<div>').addClass('message-overlay') + const $overlay = $('<div>').addClass('message-overlay') $el.find('.activitymessage').after($overlay) $el.on('click', this._onClickCollapsedComment) } @@ -38,7 +38,7 @@ * Copy of CommentsTabView._onClickComment() */ _onClickCollapsedComment: function(ev) { - var $row = $(ev.target) + let $row = $(ev.target) if (!$row.is('.comment')) { $row = $row.closest('.comment') } @@ -50,7 +50,7 @@ */ _isLong: function(message) { return message.length > 250 || (message.match(/\n/g) || []).length > 1 - } + }, } })() diff --git a/apps/comments/src/commentmodel.js b/apps/comments/src/commentmodel.js index 804fbdfd3cb2145a105c1e3c65ceff68a8e68689..252cf5dc6606d62e1ca6f7ab5f9bf89c709c7b06 100644 --- a/apps/comments/src/commentmodel.js +++ b/apps/comments/src/commentmodel.js @@ -20,7 +20,7 @@ PROPERTY_OBJECTTYPE: '{' + OC.Files.Client.NS_OWNCLOUD + '}objectType', PROPERTY_ACTORDISPLAYNAME: '{' + OC.Files.Client.NS_OWNCLOUD + '}actorDisplayName', PROPERTY_CREATIONDATETIME: '{' + OC.Files.Client.NS_OWNCLOUD + '}creationDateTime', - PROPERTY_MENTIONS: '{' + OC.Files.Client.NS_OWNCLOUD + '}mentions' + PROPERTY_MENTIONS: '{' + OC.Files.Client.NS_OWNCLOUD + '}mentions', }) /** @@ -30,13 +30,13 @@ * Comment * */ - var CommentModel = OC.Backbone.Model.extend( + const CommentModel = OC.Backbone.Model.extend( /** @lends OCA.Comments.CommentModel.prototype */ { sync: OC.Backbone.davSync, defaults: { actorType: 'users', - objectType: 'files' + objectType: 'files', }, davProperties: { @@ -49,7 +49,7 @@ 'objectType': OC.Files.Client.PROPERTY_OBJECTTYPE, 'objectId': OC.Files.Client.PROPERTY_OBJECTID, 'isUnread': OC.Files.Client.PROPERTY_ISUNREAD, - 'mentions': OC.Files.Client.PROPERTY_MENTIONS + 'mentions': OC.Files.Client.PROPERTY_MENTIONS, }, parse: function(data) { @@ -63,7 +63,7 @@ objectType: data.objectType, objectId: data.objectId, isUnread: (data.isUnread === 'true'), - mentions: this._parseMentions(data.mentions) + mentions: this._parseMentions(data.mentions), } }, @@ -71,14 +71,14 @@ if (_.isUndefined(mentions)) { return {} } - var result = {} - for (var i in mentions) { - var mention = mentions[i] + const result = {} + for (const i in mentions) { + const mention = mentions[i] if (_.isUndefined(mention.localName) || mention.localName !== 'mention') { continue } result[i] = {} - for (var child = mention.firstChild; child; child = child.nextSibling) { + for (let child = mention.firstChild; child; child = child.nextSibling) { if (_.isUndefined(child.localName) || !child.localName.startsWith('mention')) { continue } @@ -86,7 +86,7 @@ } } return result - } + }, }) OCA.Comments.CommentModel = CommentModel diff --git a/apps/comments/src/commentsmodifymenu.js b/apps/comments/src/commentsmodifymenu.js index 7c9470f13b2f6f9007df44dfd5d6d001f9e94a5b..340e71aa5fbfe64a09ace5f0530d33bc230d2c59 100644 --- a/apps/comments/src/commentsmodifymenu.js +++ b/apps/comments/src/commentsmodifymenu.js @@ -16,26 +16,26 @@ * @memberof OC.Comments * @private */ - var CommentsModifyMenu = OC.Backbone.View.extend({ + const CommentsModifyMenu = OC.Backbone.View.extend({ tagName: 'div', className: 'commentsModifyMenu popovermenu bubble menu', _scopes: [ { name: 'edit', displayName: t('comments', 'Edit comment'), - iconClass: 'icon-rename' + iconClass: 'icon-rename', }, { name: 'delete', displayName: t('comments', 'Delete comment'), - iconClass: 'icon-delete' - } + iconClass: 'icon-delete', + }, ], initialize: function() { }, events: { - 'click a.action': '_onClickAction' + 'click a.action': '_onClickAction', }, /** @@ -44,7 +44,7 @@ * @param {Object} event event object */ _onClickAction: function(event) { - var $target = $(event.currentTarget) + let $target = $(event.currentTarget) if (!$target.hasClass('menuitem')) { $target = $target.closest('.menuitem') } @@ -59,7 +59,7 @@ */ render: function() { this.$el.html(OCA.Comments.Templates['commentsmodifymenu']({ - items: this._scopes + items: this._scopes, })) }, @@ -70,19 +70,19 @@ show: function(context) { this._context = context - for (var i in this._scopes) { + for (const i in this._scopes) { this._scopes[i].active = false } - var $el = $(context.target) - var offsetIcon = $el.offset() - var offsetContainer = $el.closest('.authorRow').offset() + const $el = $(context.target) + const offsetIcon = $el.offset() + const offsetContainer = $el.closest('.authorRow').offset() // adding some extra top offset to push the menu below the button. - var position = { + const position = { top: offsetIcon.top - offsetContainer.top + 48, left: '', - right: '' + right: '', } position.left = offsetIcon.left - offsetContainer.left @@ -100,7 +100,7 @@ this.$el.removeClass('hidden') OC.showMenu(null, this.$el) - } + }, }) OCA.Comments = OCA.Comments || {} diff --git a/apps/comments/src/commentsummarymodel.js b/apps/comments/src/commentsummarymodel.js index 1a3002a9f78d64bb4f29f608f2d1598147bea5b7..5589b1807c5ca7392579ab370ed413f5779474dc 100644 --- a/apps/comments/src/commentsummarymodel.js +++ b/apps/comments/src/commentsummarymodel.js @@ -11,7 +11,7 @@ (function(OC, OCA) { _.extend(OC.Files.Client, { - PROPERTY_READMARKER: '{' + OC.Files.Client.NS_OWNCLOUD + '}readMarker' + PROPERTY_READMARKER: '{' + OC.Files.Client.NS_OWNCLOUD + '}readMarker', }) /** @@ -22,7 +22,7 @@ * like the read marker. * */ - var CommentSummaryModel = OC.Backbone.Model.extend( + const CommentSummaryModel = OC.Backbone.Model.extend( /** @lends OCA.Comments.CommentSummaryModel.prototype */ { sync: OC.Backbone.davSync, @@ -41,7 +41,7 @@ _objectId: null, davProperties: { - 'readMarker': OC.Files.Client.PROPERTY_READMARKER + 'readMarker': OC.Files.Client.PROPERTY_READMARKER, }, /** @@ -63,7 +63,7 @@ return OC.linkToRemote('dav') + '/comments/' + encodeURIComponent(this._objectType) + '/' + encodeURIComponent(this.id) + '/' - } + }, }) OCA.Comments.CommentSummaryModel = CommentSummaryModel diff --git a/apps/comments/src/filesplugin.js b/apps/comments/src/filesplugin.js index 3e0cdd7f706b684cb1d67daa24561dd75cf2b822..1a3a2c5348bb3d2458f6ac1c6426cfa3bdca7bc3 100644 --- a/apps/comments/src/filesplugin.js +++ b/apps/comments/src/filesplugin.js @@ -11,7 +11,7 @@ (function() { _.extend(OC.Files.Client, { - PROPERTY_COMMENTS_UNREAD: '{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread' + PROPERTY_COMMENTS_UNREAD: '{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread', }) OCA.Comments = _.extend({}, OCA.Comments) @@ -28,36 +28,36 @@ OCA.Comments.FilesPlugin = { ignoreLists: [ 'trashbin', - 'files.public' + 'files.public', ], _formatCommentCount: function(count) { return OCA.Comments.Templates['filesplugin']({ count: count, countMessage: n('comments', '%n unread comment', '%n unread comments', count), - iconUrl: OC.imagePath('core', 'actions/comment') + iconUrl: OC.imagePath('core', 'actions/comment'), }) }, attach: function(fileList) { - var self = this + const self = this if (this.ignoreLists.indexOf(fileList.id) >= 0) { return } fileList.registerTabView(new OCA.Comments.CommentsTabView('commentsTabView')) - var oldGetWebdavProperties = fileList._getWebdavProperties + const oldGetWebdavProperties = fileList._getWebdavProperties fileList._getWebdavProperties = function() { - var props = oldGetWebdavProperties.apply(this, arguments) + const props = oldGetWebdavProperties.apply(this, arguments) props.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD) return props } fileList.filesClient.addFileInfoParser(function(response) { - var data = {} - var props = response.propStat[0].properties - var commentsUnread = props[OC.Files.Client.PROPERTY_COMMENTS_UNREAD] + const data = {} + const props = response.propStat[0].properties + const commentsUnread = props[OC.Files.Client.PROPERTY_COMMENTS_UNREAD] if (!_.isUndefined(commentsUnread) && commentsUnread !== '') { data.commentsUnread = parseInt(commentsUnread, 10) } @@ -65,9 +65,9 @@ }) fileList.$el.addClass('has-comments') - var oldCreateRow = fileList._createRow + const oldCreateRow = fileList._createRow fileList._createRow = function(fileData) { - var $tr = oldCreateRow.apply(this, arguments) + const $tr = oldCreateRow.apply(this, arguments) if (fileData.commentsUnread) { $tr.attr('data-comments-unread', fileData.commentsUnread) } @@ -79,7 +79,7 @@ name: 'Comment', displayName: function(context) { if (context && context.$file) { - var unread = parseInt(context.$file.data('comments-unread'), 10) + const unread = parseInt(context.$file.data('comments-unread'), 10) if (unread >= 0) { return n('comments', '1 new comment', '{unread} new comments', unread, { unread: unread }) } @@ -92,10 +92,10 @@ permissions: OC.PERMISSION_READ, type: OCA.Files.FileActions.TYPE_INLINE, render: function(actionSpec, isDefault, context) { - var $file = context.$file - var unreadComments = $file.data('comments-unread') + const $file = context.$file + const unreadComments = $file.data('comments-unread') if (unreadComments) { - var $actionLink = $(self._formatCommentCount(unreadComments)) + const $actionLink = $(self._formatCommentCount(unreadComments)) context.$file.find('a.name>span.fileactions').append($actionLink) return $actionLink } @@ -105,20 +105,20 @@ context.$file.find('.action-comment').tooltip('hide') // open sidebar in comments section context.fileList.showDetailsView(fileName, 'comments') - } + }, }) // add attribute to "elementToFile" - var oldElementToFile = fileList.elementToFile + const oldElementToFile = fileList.elementToFile fileList.elementToFile = function($el) { - var fileInfo = oldElementToFile.apply(this, arguments) - var commentsUnread = $el.data('comments-unread') + const fileInfo = oldElementToFile.apply(this, arguments) + const commentsUnread = $el.data('comments-unread') if (commentsUnread) { fileInfo.commentsUnread = commentsUnread } return fileInfo } - } + }, } })() diff --git a/apps/files/js/dist/personal-settings.js b/apps/files/js/dist/personal-settings.js index 191cfd019720f5bf501e67fb31040e270f365798..27fe68f6459dede0efa8125df6d6d04a45a2e8aa 100644 Binary files a/apps/files/js/dist/personal-settings.js and b/apps/files/js/dist/personal-settings.js differ diff --git a/apps/files/js/dist/personal-settings.js.map b/apps/files/js/dist/personal-settings.js.map index a76f0cfabe9370d5c3f0da68f86ea7d021e3d898..5bcc3d98d18f916b56ec11cbd1166f19eda28421 100644 Binary files a/apps/files/js/dist/personal-settings.js.map and b/apps/files/js/dist/personal-settings.js.map differ diff --git a/apps/files/js/dist/sidebar.js b/apps/files/js/dist/sidebar.js index 492fe60d94dcf8babbe381e50377f433616af328..9edd2386295deb235779f7767af7710b4e0b2cb4 100644 Binary files a/apps/files/js/dist/sidebar.js and b/apps/files/js/dist/sidebar.js differ diff --git a/apps/files/js/dist/sidebar.js.map b/apps/files/js/dist/sidebar.js.map index b45098d82f449abe625d699c6f7ce6b90ccab83e..10cfbc076ed8e5774067591d46c5b1153292bf3a 100644 Binary files a/apps/files/js/dist/sidebar.js.map and b/apps/files/js/dist/sidebar.js.map differ diff --git a/apps/files/src/components/LegacyTab.vue b/apps/files/src/components/LegacyTab.vue index 54a24edcdd7dc89e4cc2e896b4fd5e03880dbd4f..2802c9c58f06a327e3c07f38028065b27edaf93a 100644 --- a/apps/files/src/components/LegacyTab.vue +++ b/apps/files/src/components/LegacyTab.vue @@ -31,22 +31,22 @@ import AppSidebarTab from 'nextcloud-vue/dist/Components/AppSidebarTab' export default { name: 'LegacyTab', components: { - AppSidebarTab: AppSidebarTab + AppSidebarTab: AppSidebarTab, }, props: { component: { type: Object, - required: true + required: true, }, name: { type: String, - required: true + required: true, }, fileInfo: { type: Object, default: () => {}, - required: true - } + required: true, + }, }, computed: { icon() { @@ -64,14 +64,14 @@ export default { // needed because AppSidebarTab also uses $parent.activeTab activeTab() { return this.$parent.activeTab - } + }, }, watch: { activeTab(activeTab) { if (activeTab === this.id && this.fileInfo) { this.setFileInfo(this.fileInfo) } - } + }, }, beforeMount() { this.setFileInfo(this.fileInfo) @@ -86,8 +86,8 @@ export default { methods: { setFileInfo(fileInfo) { this.component.setFileInfo(new OCA.Files.FileInfoModel(fileInfo)) - } - } + }, + }, } </script> <style> diff --git a/apps/files/src/components/LegacyView.vue b/apps/files/src/components/LegacyView.vue index e4a07ac3e5ef6a8c5652465bae6e9f7c9880a786..4a50ed558f0cf292e273ed005efa549302c7d906 100644 --- a/apps/files/src/components/LegacyView.vue +++ b/apps/files/src/components/LegacyView.vue @@ -29,19 +29,19 @@ export default { props: { component: { type: Object, - required: true + required: true, }, fileInfo: { type: Object, default: () => {}, - required: true - } + required: true, + }, }, watch: { fileInfo(fileInfo) { // update the backbone model FileInfo this.setFileInfo(fileInfo) - } + }, }, mounted() { // append the backbone element and set the FileInfo @@ -51,8 +51,8 @@ export default { methods: { setFileInfo(fileInfo) { this.component.setFileInfo(new OCA.Files.FileInfoModel(fileInfo)) - } - } + }, + }, } </script> <style> diff --git a/apps/files/src/components/PersonalSettings.vue b/apps/files/src/components/PersonalSettings.vue index b0468ef456070280795bfa5e3be734d90c13ae3c..1431ae4053ac1011e9799e3b8c7eb17965bed5cc 100644 --- a/apps/files/src/components/PersonalSettings.vue +++ b/apps/files/src/components/PersonalSettings.vue @@ -32,7 +32,7 @@ import TransferOwnershipDialogue from './TransferOwnershipDialogue' export default { name: 'PersonalSettings', components: { - TransferOwnershipDialogue - } + TransferOwnershipDialogue, + }, } </script> diff --git a/apps/files/src/components/TransferOwnershipDialogue.vue b/apps/files/src/components/TransferOwnershipDialogue.vue index 52fcbc5fb07dc50d67bafc6d94b53d0982465544..5d69ed0dbf1cae90415037f8eb523e66a16542f2 100644 --- a/apps/files/src/components/TransferOwnershipDialogue.vue +++ b/apps/files/src/components/TransferOwnershipDialogue.vue @@ -50,8 +50,8 @@ :internal-search="false" :clear-on-select="false" :user-select="true" - @search-change="findUserDebounced" - class="middle-align" /> + class="middle-align" + @search-change="findUserDebounced" /> </label> </p> <p> @@ -85,7 +85,7 @@ const picker = getFilePickerBuilder(t('files', 'Choose a file or folder to trans export default { name: 'TransferOwnershipDialogue', components: { - Multiselect + Multiselect, }, data() { return { @@ -94,7 +94,7 @@ export default { submitError: undefined, loadingUsers: false, selectedUser: null, - userSuggestions: {} + userSuggestions: {}, } }, computed: { @@ -107,7 +107,7 @@ export default { return { user: user.uid, displayName: user.displayName, - icon: 'icon-user' + icon: 'icon-user', } }) }, @@ -123,7 +123,7 @@ export default { return '' } return this.directory.substring(1) - } + }, }, created() { this.findUserDebounced = debounce(this.findUser, 300) @@ -163,8 +163,8 @@ export default { itemType: 'file', search: query, perPage: 20, - lookup: false - } + lookup: false, + }, }) if (response.data.ocs.meta.statuscode !== 100) { @@ -175,7 +175,7 @@ export default { response.data.ocs.data.users.forEach(user => { Vue.set(this.userSuggestions, user.value.shareWith, { uid: user.value.shareWith, - displayName: user.label + displayName: user.label, }) }) } catch (error) { @@ -192,7 +192,7 @@ export default { this.submitError = undefined const data = { path: this.directory, - recipient: this.selectedUser.user + recipient: this.selectedUser.user, } logger.debug('submit transfer ownership form', data) @@ -212,8 +212,8 @@ export default { this.submitError = error.message || t('files', 'Unknown error') }) - } - } + }, + }, } </script> diff --git a/apps/files/src/services/FileInfo.js b/apps/files/src/services/FileInfo.js index aa026df1445bb621ebf0a145dfec1f37c8006c9e..de97be2d9c3cc115ecb2cb11a5cf202a01b0b7d2 100644 --- a/apps/files/src/services/FileInfo.js +++ b/apps/files/src/services/FileInfo.js @@ -51,7 +51,7 @@ export default async function(url) { <oc:owner-display-name /> <oc:share-types /> </d:prop> - </d:propfind>` + </d:propfind>`, }) // TODO: create new parser or use cdav-lib when available diff --git a/apps/files/src/sidebar.js b/apps/files/src/sidebar.js index 2f6b898f3281ab6e364d6f908321dcb3ad41973e..717e659e6613b83de47ba0d8fa0795c991e83ece 100644 --- a/apps/files/src/sidebar.js +++ b/apps/files/src/sidebar.js @@ -44,8 +44,8 @@ window.addEventListener('DOMContentLoaded', () => { // Make sure we have a mountpoint if (!document.getElementById('app-sidebar')) { - var contentElement = document.getElementById('content') - var sidebarElement = document.createElement('div') + const contentElement = document.getElementById('content') + const sidebarElement = document.createElement('div') sidebarElement.id = 'app-sidebar' contentElement.appendChild(sidebarElement) } @@ -55,7 +55,7 @@ window.addEventListener('DOMContentLoaded', () => { const AppSidebar = new Vue({ // eslint-disable-next-line vue/match-component-file-name name: 'SidebarRoot', - render: h => h(SidebarView) + render: h => h(SidebarView), }) AppSidebar.$mount('#app-sidebar') }) diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue index 97958afa902d52a79594c58a7c004a48a1078206..e5908cd3ab341be5e557baa2428c4131639445f4 100644 --- a/apps/files/src/views/Sidebar.vue +++ b/apps/files/src/views/Sidebar.vue @@ -69,7 +69,7 @@ export default { components: { AppSidebar, - LegacyView + LegacyView, }, data() { @@ -78,7 +78,7 @@ export default { Sidebar: OCA.Files.Sidebar.state, error: null, fileInfo: null, - starLoading: false + starLoading: false, } }, @@ -174,19 +174,19 @@ export default { 'star-loading': this.starLoading, starred: this.fileInfo.isFavourited, subtitle: this.subtitle, - title: this.fileInfo.name + title: this.fileInfo.name, } } else if (this.error) { return { key: 'error', // force key to re-render subtitle: '', - title: '' + title: '', } } else { return { class: 'icon-loading', subtitle: '', - title: '' + title: '', } } }, @@ -215,7 +215,7 @@ export default { */ defaultActionListener() { return this.defaultAction ? 'figure-click' : null - } + }, }, watch: { @@ -244,7 +244,7 @@ export default { console.error('Error while loading the file data', error) } } - } + }, }, methods: { @@ -286,7 +286,7 @@ export default { * @returns {string} Url to the icon for mimeType */ getIconUrl(fileInfo) { - var mimeType = fileInfo.mimetype || 'application/octet-stream' + const mimeType = fileInfo.mimetype || 'application/octet-stream' if (mimeType === 'httpd/unix-directory') { // use default folder icon if (fileInfo.mountType === 'shared' || fileInfo.mountType === 'shared-root') { @@ -312,11 +312,11 @@ export default { if (tab.isLegacyTab) { return { is: LegacyTab, - component: tab.component + component: tab.component, } } return { - is: tab.component + is: tab.component, } }, @@ -348,7 +348,7 @@ export default { <oc:favorite>1</oc:favorite> </d:prop> ${state ? '</d:set>' : '</d:remove>'} - </d:propertyupdate>` + </d:propertyupdate>`, }) // TODO: Obliterate as soon as possible and use events with new files app @@ -371,11 +371,11 @@ export default { fileInfo: this.fileInfo, dir: this.fileInfo.dir, fileList: OCA.Files.App.fileList, - $file: $('body') + $file: $('body'), }) } - } - } + }, + }, } </script> <style lang="scss" scoped> diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js index 29cd3385c3ae18275d1c8ab8e86d9f4589b9b221..6cf7a805ada0137f2dd8adc8825dcf22d8ff74e4 100644 --- a/apps/files_sharing/js/app.js +++ b/apps/files_sharing/js/app.js @@ -38,7 +38,7 @@ OCA.Sharing.App = { // The file list is created when a "show" event is handled, so // it should be marked as "shown" like it would have been done // if handling the event with the file list already created. - shown: true + shown: true, } ) @@ -64,7 +64,7 @@ OCA.Sharing.App = { // The file list is created when a "show" event is handled, so // it should be marked as "shown" like it would have been done // if handling the event with the file list already created. - shown: true + shown: true, } ) @@ -90,7 +90,7 @@ OCA.Sharing.App = { // The file list is created when a "show" event is handled, so // it should be marked as "shown" like it would have been done // if handling the event with the file list already created. - shown: true + shown: true, } ) @@ -117,7 +117,7 @@ OCA.Sharing.App = { // The file list is created when a "show" event is handled, so // it should be marked as "shown" like it would have been done // if handling the event with the file list already created. - shown: true + shown: true, } ) @@ -142,7 +142,7 @@ OCA.Sharing.App = { // The file list is created when a "show" event is handled, so // it should be marked as "shown" like it would have been done // if handling the event with the file list already created. - shown: true + shown: true, } ) @@ -202,7 +202,7 @@ OCA.Sharing.App = { _createFileActions: function() { // inherit file actions from the files app - var fileActions = new OCA.Files.FileActions() + const fileActions = new OCA.Files.FileActions() // note: not merging the legacy actions because legacy apps are not // compatible with the sharing overview and need to be adapted first fileActions.registerDefaultActions() @@ -227,7 +227,7 @@ OCA.Sharing.App = { }, _restoreShareAction: function() { - var fileActions = new OCA.Files.FileActions() + const fileActions = new OCA.Files.FileActions() fileActions.registerAction({ name: 'Restore', displayName: '', @@ -237,14 +237,14 @@ OCA.Sharing.App = { iconClass: 'icon-history', type: OCA.Files.FileActions.TYPE_INLINE, actionHandler: function(fileName, context) { - var shareId = context.$file.data('shareId') + const shareId = context.$file.data('shareId') $.post(OC.linkToOCS('apps/files_sharing/api/v1/deletedshares', 2) + shareId) .success(function(result) { context.fileList.remove(context.fileInfoModel.attributes.name) }).fail(function() { OC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to restore the share.')) }) - } + }, }) return fileActions }, @@ -269,7 +269,7 @@ OCA.Sharing.App = { _extendFileList: function(fileList) { // remove size column from summary fileList.fileSummary.$el.find('.filesize').remove() - } + }, } $(document).ready(function() { diff --git a/apps/files_sharing/js/dist/additionalScripts.js.map b/apps/files_sharing/js/dist/additionalScripts.js.map index 29dcd4501ab6122c058f628f6bd996378232a44b..c264b5f00c4bb63ca6289d1592f0bd6ce5fdcee9 100644 Binary files a/apps/files_sharing/js/dist/additionalScripts.js.map and b/apps/files_sharing/js/dist/additionalScripts.js.map differ diff --git a/apps/files_sharing/js/dist/collaboration.js.map b/apps/files_sharing/js/dist/collaboration.js.map index f83c7826f0438ea2522e192438d19f1e38acc639..b7da653af456137ad7f789cc25b057a1b1b01786 100644 Binary files a/apps/files_sharing/js/dist/collaboration.js.map and b/apps/files_sharing/js/dist/collaboration.js.map differ diff --git a/apps/files_sharing/js/dist/files_sharing.js.map b/apps/files_sharing/js/dist/files_sharing.js.map index d9732726bcf5114b3bd09e7127de8cdc769a25e3..ecf386795664851b236f03f6fed1ff6a4665ca2e 100644 Binary files a/apps/files_sharing/js/dist/files_sharing.js.map and b/apps/files_sharing/js/dist/files_sharing.js.map differ diff --git a/apps/files_sharing/js/dist/files_sharing_tab.js b/apps/files_sharing/js/dist/files_sharing_tab.js index f947a90f49535f284deb8bfe44706c40b3710063..9987b4363e6099f94c5eba00b5c20583343bb6bf 100644 Binary files a/apps/files_sharing/js/dist/files_sharing_tab.js and b/apps/files_sharing/js/dist/files_sharing_tab.js differ diff --git a/apps/files_sharing/js/dist/files_sharing_tab.js.map b/apps/files_sharing/js/dist/files_sharing_tab.js.map index a946a7e1cb46292aed564abb935b753d7d156356..b1bc871d6b20da355b1dee0570e8e896ef170028 100644 Binary files a/apps/files_sharing/js/dist/files_sharing_tab.js.map and b/apps/files_sharing/js/dist/files_sharing_tab.js.map differ diff --git a/apps/files_sharing/js/dist/main.js.map b/apps/files_sharing/js/dist/main.js.map index 7a7fea63475acd8f1f2f421f4457a4b14c8e2fb9..3deaf3031d6355f50118d6101addf3046c68aabd 100644 Binary files a/apps/files_sharing/js/dist/main.js.map and b/apps/files_sharing/js/dist/main.js.map differ diff --git a/apps/files_sharing/js/dist/personal-settings.js.map b/apps/files_sharing/js/dist/personal-settings.js.map index efe93c40cead699305df47ec03b1ed7b778368c2..3917ceb39605ba94884492bffa6f6d2ff067fe5c 100644 Binary files a/apps/files_sharing/js/dist/personal-settings.js.map and b/apps/files_sharing/js/dist/personal-settings.js.map differ diff --git a/apps/files_sharing/src/collaborationresourceshandler.js b/apps/files_sharing/src/collaborationresourceshandler.js index 1e1ebe5b541a581f43c603161fdd9a0e799303a6..ceb9234cd2bdbda454f718ec1e5f9588f2b924ec 100644 --- a/apps/files_sharing/src/collaborationresourceshandler.js +++ b/apps/files_sharing/src/collaborationresourceshandler.js @@ -17,5 +17,5 @@ window.OCP.Collaboration.registerType('file', { }) }, typeString: t('files_sharing', 'Link to a file'), - typeIconClass: 'icon-files-dark' + typeIconClass: 'icon-files-dark', }) diff --git a/apps/files_sharing/src/components/PersonalSettings.vue b/apps/files_sharing/src/components/PersonalSettings.vue index 6f5f6bf082f534e10d834239228ee35dfbfafbc1..b7839e3d0df2d8d135d0c976377d15705ddb32fe 100644 --- a/apps/files_sharing/src/components/PersonalSettings.vue +++ b/apps/files_sharing/src/components/PersonalSettings.vue @@ -39,7 +39,7 @@ export default { name: 'PersonalSettings', data() { return { - accepting: true + accepting: true, } }, mounted() { @@ -50,10 +50,10 @@ export default { axios.put( generateUrl('/apps/files_sharing/settings/defaultAccept'), { - accept: this.accepting + accept: this.accepting, } ) - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index 4d7f60cfa617fdd7156e5c489a43bbf70b7aab3e..2174708975300683fa9b2aefa1f6a19be827278d 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -130,11 +130,11 @@ export default { ActionCheckbox, ActionInput, ActionTextEditable, - Avatar + Avatar, }, directives: { - Tooltip + Tooltip, }, mixins: [SharesMixin], @@ -143,7 +143,7 @@ export default { return { permissionsEdit: OC.PERMISSION_UPDATE, permissionsRead: OC.PERMISSION_READ, - permissionsShare: OC.PERMISSION_SHARE + permissionsShare: OC.PERMISSION_SHARE, } }, @@ -170,7 +170,7 @@ export default { // todo: strong or italic? // but the t function escape any html from the data :/ user: this.share.shareWithDisplayName, - owner: this.share.owner + owner: this.share.owner, } if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_GROUP) { @@ -198,7 +198,7 @@ export default { }, set: function(checked) { this.updatePermissions(checked, this.canReshare) - } + }, }, /** @@ -210,7 +210,7 @@ export default { }, set: function(checked) { this.updatePermissions(this.canEdit, checked) - } + }, }, /** @@ -227,13 +227,13 @@ export default { ? this.config.defaultInternalExpirationDateString : moment().format('YYYY-MM-DD') : '' - } + }, }, dateMaxEnforced() { return this.config.isDefaultInternalExpireDateEnforced && moment().add(1 + this.config.defaultInternalExpireDate, 'days') - } + }, }, @@ -246,8 +246,8 @@ export default { this.share.permissions = permissions this.queueUpdate('permissions') - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/components/SharingEntryInherited.vue b/apps/files_sharing/src/components/SharingEntryInherited.vue index b402ddd08be0b8262c27bce562f657ddf0379db9..d0c75c817ce38f693f9d0b26f78c7ad574b204ac 100644 --- a/apps/files_sharing/src/components/SharingEntryInherited.vue +++ b/apps/files_sharing/src/components/SharingEntryInherited.vue @@ -68,7 +68,7 @@ export default { ActionLink, ActionText, Avatar, - SharingEntrySimple + SharingEntrySimple, }, mixins: [SharesMixin], @@ -76,17 +76,17 @@ export default { props: { share: { type: Share, - required: true - } + required: true, + }, }, computed: { fileTargetUrl() { return generateUrl('/f/{fileid}', { - fileid: this.share.fileSource + fileid: this.share.fileSource, }) - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/components/SharingEntryInternal.vue b/apps/files_sharing/src/components/SharingEntryInternal.vue index 720c016b82e46980e61e331e48fb1982a3bce992..d727e6b9e5450c8dc7cb9cbee6e517c353740444 100644 --- a/apps/files_sharing/src/components/SharingEntryInternal.vue +++ b/apps/files_sharing/src/components/SharingEntryInternal.vue @@ -28,21 +28,21 @@ export default { components: { ActionLink, - SharingEntrySimple + SharingEntrySimple, }, props: { fileInfo: { type: Object, default: () => {}, - required: true - } + required: true, + }, }, data() { return { copied: false, - copySuccess: false + copySuccess: false, } }, @@ -73,7 +73,7 @@ export default { return t('files_sharing', 'Only works for users with access to this folder') } return t('files_sharing', 'Only works for users with access to this file') - } + }, }, methods: { @@ -94,8 +94,8 @@ export default { this.copied = false }, 4000) } - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index ddfe953e3397e7263ca87b1d622e6ac33a545b66..7b86d9952ec9ea8b7e8edfd781a381a827c4b9b6 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -316,11 +316,11 @@ export default { ActionLink, ActionText, ActionTextEditable, - Avatar + Avatar, }, directives: { - Tooltip + Tooltip, }, mixins: [SharesMixin], @@ -328,8 +328,8 @@ export default { props: { canReshare: { type: Boolean, - default: true - } + default: true, + }, }, data() { @@ -341,7 +341,7 @@ export default { publicUploadRValue: OC.PERMISSION_READ, publicUploadWValue: OC.PERMISSION_CREATE, - ExternalLinkActions: OCA.Sharing.ExternalLinkActions.state + ExternalLinkActions: OCA.Sharing.ExternalLinkActions.state, } }, @@ -366,7 +366,7 @@ export default { if (this.share && this.share.id) { if (!this.isShareOwner && this.share.ownerDisplayName) { return t('files_sharing', 'Shared via link by {initiator}', { - initiator: this.share.ownerDisplayName + initiator: this.share.ownerDisplayName, }) } if (this.share.label && this.share.label.trim() !== '') { @@ -393,7 +393,7 @@ export default { ? this.config.defaultExpirationDateString : moment().format('YYYY-MM-DD') : '' - } + }, }, dateMaxEnforced() { @@ -414,7 +414,7 @@ export default { // TODO: directly save after generation to make sure the share is always protected this.share.password = enabled ? await this.generatePassword() : '' this.share.newPassword = this.share.password - } + }, }, /** @@ -452,7 +452,7 @@ export default { this.share.permissions = enabled ? OC.PERMISSION_READ | OC.PERMISSION_UPDATE : OC.PERMISSION_READ - } + }, }, // if newPassword exists, but is empty, it means @@ -510,7 +510,7 @@ export default { isPasswordPolicyEnabled() { return typeof this.config.passwordPolicy === 'object' - } + }, }, methods: { @@ -519,7 +519,7 @@ export default { */ async onNewLinkShare() { const shareDefaults = { - share_type: OC.Share.SHARE_TYPE_LINK + share_type: OC.Share.SHARE_TYPE_LINK, } if (this.config.isDefaultExpireDateEnforced) { // default is empty string if not set @@ -588,7 +588,7 @@ export default { path, shareType: OC.Share.SHARE_TYPE_LINK, password: share.password, - expireDate: share.expireDate + expireDate: share.expireDate, // we do not allow setting the publicUpload // before the share creation. // Todo: We also need to fix the createShare method in @@ -747,8 +747,8 @@ export default { // but is incomplete as not pushed to server // YET. We can safely delete the share :) this.$emit('remove:share', this.share) - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/components/SharingEntrySimple.vue b/apps/files_sharing/src/components/SharingEntrySimple.vue index 4abc5e52a907686237a1563d8fcd1fe50b4b5b9f..78fa865d1389d60edc73dd0a2485b5263c022397 100644 --- a/apps/files_sharing/src/components/SharingEntrySimple.vue +++ b/apps/files_sharing/src/components/SharingEntrySimple.vue @@ -43,28 +43,28 @@ export default { name: 'SharingEntrySimple', components: { - Actions + Actions, }, directives: { - Tooltip + Tooltip, }, props: { title: { type: String, default: '', - required: true + required: true, }, tooltip: { type: String, - default: '' + default: '', }, subtitle: { type: String, - default: '' - } - } + default: '', + }, + }, } </script> diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index 80ef2ccb2add6d3dcba792c0baae40af609dd4ba..bcb69703548f96dd856b67459ba9ebe4a83bcbca 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -61,7 +61,7 @@ export default { name: 'SharingInput', components: { - Multiselect + Multiselect, }, mixins: [ShareTypes, ShareRequests], @@ -70,26 +70,26 @@ export default { shares: { type: Array, default: () => [], - required: true + required: true, }, linkShares: { type: Array, default: () => [], - required: true + required: true, }, fileInfo: { type: Object, default: () => {}, - required: true + required: true, }, reshare: { type: Share, - default: null + default: null, }, canReshare: { type: Boolean, - required: true - } + required: true, + }, }, data() { @@ -99,7 +99,7 @@ export default { query: '', recommendations: [], ShareSearch: OCA.Sharing.ShareSearch.state, - suggestions: [] + suggestions: [], } }, @@ -151,7 +151,7 @@ export default { return t('files_sharing', 'Searching …') } return t('files_sharing', 'No elements found.') - } + }, }, mounted() { @@ -190,8 +190,8 @@ export default { itemType: this.fileInfo.type === 'dir' ? 'folder' : 'file', search, lookup, - perPage: this.config.maxAutocompleteResults - } + perPage: this.config.maxAutocompleteResults, + }, }) if (request.data.ocs.meta.statuscode !== 100) { @@ -224,7 +224,7 @@ export default { lookupEntry.push({ isNoUser: true, displayName: t('files_sharing', 'Search globally'), - lookup: true + lookup: true, }) } @@ -255,8 +255,8 @@ export default { const request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1') + 'sharees_recommended', { params: { format: 'json', - itemType: this.fileInfo.type - } + itemType: this.fileInfo.type, + }, }) if (request.data.ocs.meta.statuscode !== 100) { @@ -382,7 +382,7 @@ export default { isNoUser: !result.uuid, displayName: result.name || result.label, desc, - icon: this.shareTypeToIcon(result.value.shareType) + icon: this.shareTypeToIcon(result.value.shareType), } }, @@ -417,7 +417,7 @@ export default { const share = await this.createShare({ path, shareType: value.shareType, - shareWith: value.shareWith + shareWith: value.shareWith, }) this.$emit('add:share', share) @@ -433,8 +433,8 @@ export default { } finally { this.loading = false } - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/index.js b/apps/files_sharing/src/index.js index cc2e1c6e69842b3733e17ab58cc44020c2a1c71e..786b648aea1c7d74a6a027694ae853f3ba6959b0 100644 --- a/apps/files_sharing/src/index.js +++ b/apps/files_sharing/src/index.js @@ -31,6 +31,6 @@ Object.assign(OC, { SHARE_TYPE_CIRCLE: 7, SHARE_TYPE_GUEST: 8, SHARE_TYPE_REMOTE_GROUP: 9, - SHARE_TYPE_ROOM: 10 - } + SHARE_TYPE_ROOM: 10, + }, }) diff --git a/apps/files_sharing/src/mixins/ShareRequests.js b/apps/files_sharing/src/mixins/ShareRequests.js index c534e8607073a1071c39324d96b978dc4e4135d2..bad59da6593a7b20cbbc7b7b02b3ec637b136705 100644 --- a/apps/files_sharing/src/mixins/ShareRequests.js +++ b/apps/files_sharing/src/mixins/ShareRequests.js @@ -29,7 +29,7 @@ import Share from '../models/Share' const shareUrl = generateOcsUrl('apps/files_sharing/api/v1', 2) + 'shares' const headers = { - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', } export default { @@ -109,6 +109,6 @@ export default { const message = error.response.data.ocs.meta.message throw new Error(`${property}, ${message}`) } - } - } + }, + }, } diff --git a/apps/files_sharing/src/mixins/ShareTypes.js b/apps/files_sharing/src/mixins/ShareTypes.js index 81e6af7d97c2b1f600289d65da2b5dd4b2cc2663..b84dbf96d98333c49474d9bbf6845d8604a51132 100644 --- a/apps/files_sharing/src/mixins/ShareTypes.js +++ b/apps/files_sharing/src/mixins/ShareTypes.js @@ -32,8 +32,8 @@ export default { SHARE_TYPE_CIRCLE: OC.Share.SHARE_TYPE_CIRCLE, SHARE_TYPE_GUEST: OC.Share.SHARE_TYPE_GUEST, SHARE_TYPE_REMOTE_GROUP: OC.Share.SHARE_TYPE_REMOTE_GROUP, - SHARE_TYPE_ROOM: OC.Share.SHARE_TYPE_ROOM - } + SHARE_TYPE_ROOM: OC.Share.SHARE_TYPE_ROOM, + }, } - } + }, } diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index a0ec0748951f81c78f94d9c32eeb36b159d3bb37..c8ffbd6f5c57e5269a0000785a6c650b996d03d4 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -36,12 +36,12 @@ export default { fileInfo: { type: Object, default: () => {}, - required: true + required: true, }, share: { type: Share, - default: null - } + default: null, + }, }, data() { @@ -75,8 +75,8 @@ export default { SHARE_TYPE_CIRCLE: OC.Share.SHARE_TYPE_CIRCLE, SHARE_TYPE_GUEST: OC.Share.SHARE_TYPE_GUEST, SHARE_TYPE_REMOTE_GROUP: OC.Share.SHARE_TYPE_REMOTE_GROUP, - SHARE_TYPE_ROOM: OC.Share.SHARE_TYPE_ROOM - } + SHARE_TYPE_ROOM: OC.Share.SHARE_TYPE_ROOM, + }, } }, @@ -94,7 +94,7 @@ export default { this.share.note = enabled ? t('files_sharing', 'Enter a note for the share recipient') : '' - } + }, }, dateTomorrow() { @@ -123,14 +123,14 @@ export default { ? window.monthNamesShort // provided by nextcloud : ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'], placeholder: { - date: 'Select Date' // TODO: Translate - } + date: 'Select Date', // TODO: Translate + }, } }, isShareOwner() { return this.share && this.share.owner === getCurrentUser().uid - } + }, }, @@ -217,7 +217,7 @@ export default { try { await this.updateShare(this.share.id, { property, - value + value, }) // clear any previous errors @@ -276,6 +276,6 @@ export default { */ debounceQueueUpdate: debounce(function(property) { this.queueUpdate(property) - }, 500) - } + }, 500), + }, } diff --git a/apps/files_sharing/src/sharebreadcrumbview.js b/apps/files_sharing/src/sharebreadcrumbview.js index d3b56ff853a33219cdd7dee1297bee1676dffe73..dadc0a48fb85d94faa94b8283b2d7746f684d1e9 100644 --- a/apps/files_sharing/src/sharebreadcrumbview.js +++ b/apps/files_sharing/src/sharebreadcrumbview.js @@ -23,10 +23,10 @@ (function() { 'use strict' - var BreadCrumbView = OC.Backbone.View.extend({ + const BreadCrumbView = OC.Backbone.View.extend({ tagName: 'span', events: { - click: '_onClick' + click: '_onClick', }, _dirInfo: undefined, @@ -34,7 +34,7 @@ this._dirInfo = data.dirInfo || null if (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) { - var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0 + const isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0 this.$el.removeClass('shared icon-public icon-shared') if (isShared) { this.$el.addClass('shared') @@ -58,18 +58,18 @@ _onClick: function(e) { e.preventDefault() - var fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo) - var self = this + const fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo) + const self = this fileInfoModel.on('change', function() { self.render({ - dirInfo: self._dirInfo + dirInfo: self._dirInfo, }) }) - var path = fileInfoModel.attributes.path + '/' + fileInfoModel.attributes.name + const path = fileInfoModel.attributes.path + '/' + fileInfoModel.attributes.name OCA.Files.Sidebar.open(path) OCA.Files.Sidebar.setActiveTab('sharing') - } + }, }) OCA.Sharing.ShareBreadCrumbView = BreadCrumbView diff --git a/apps/files_sharing/src/utils/SharedWithMe.js b/apps/files_sharing/src/utils/SharedWithMe.js index 43abddc36b416ed41fc27aae4a26cf4405bde76f..e1bc12ffed1924a801b4467404db4cac088415f1 100644 --- a/apps/files_sharing/src/utils/SharedWithMe.js +++ b/apps/files_sharing/src/utils/SharedWithMe.js @@ -33,7 +33,7 @@ const shareWithTitle = function(share) { 'Shared with you and the group {group} by {owner}', { group: share.shareWithDisplayName, - owner: share.ownerDisplayName + owner: share.ownerDisplayName, }, undefined, { escape: false } @@ -44,7 +44,7 @@ const shareWithTitle = function(share) { 'Shared with you and {circle} by {owner}', { circle: share.shareWithDisplayName, - owner: share.ownerDisplayName + owner: share.ownerDisplayName, }, undefined, { escape: false } @@ -56,7 +56,7 @@ const shareWithTitle = function(share) { 'Shared with you and the conversation {conversation} by {owner}', { conversation: share.shareWithDisplayName, - owner: share.ownerDisplayName + owner: share.ownerDisplayName, }, undefined, { escape: false } @@ -66,7 +66,7 @@ const shareWithTitle = function(share) { 'files_sharing', 'Shared with you in a conversation by {owner}', { - owner: share.ownerDisplayName + owner: share.ownerDisplayName, }, undefined, { escape: false } diff --git a/apps/files_sharing/src/views/SharingInherited.vue b/apps/files_sharing/src/views/SharingInherited.vue index 64c69301267fcc245359c03df567ae6afe45b394..64c0132e05e6c7150fb0e2e7c5e9c12d22214e2c 100644 --- a/apps/files_sharing/src/views/SharingInherited.vue +++ b/apps/files_sharing/src/views/SharingInherited.vue @@ -56,15 +56,15 @@ export default { components: { ActionButton, SharingEntryInherited, - SharingEntrySimple + SharingEntrySimple, }, props: { fileInfo: { type: Object, default: () => {}, - required: true - } + required: true, + }, }, data() { @@ -72,7 +72,7 @@ export default { loaded: false, loading: false, showInheritedShares: false, - shares: [] + shares: [], } }, computed: { @@ -96,12 +96,12 @@ export default { fullPath() { const path = `${this.fileInfo.path}/${this.fileInfo.name}` return path.replace('//', '/') - } + }, }, watch: { fileInfo() { this.resetState() - } + }, }, methods: { /** @@ -142,8 +142,8 @@ export default { this.loading = false this.showInheritedShares = false this.shares = [] - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/views/SharingLinkList.vue b/apps/files_sharing/src/views/SharingLinkList.vue index 1c01886ca4687d4f2986075c82f0a607a96237da..5063f1c0da410d41dcd7a98e4a3e2bc2fed2ff81 100644 --- a/apps/files_sharing/src/views/SharingLinkList.vue +++ b/apps/files_sharing/src/views/SharingLinkList.vue @@ -53,7 +53,7 @@ export default { name: 'SharingLinkList', components: { - SharingEntryLink + SharingEntryLink, }, mixins: [ShareTypes], @@ -62,17 +62,17 @@ export default { fileInfo: { type: Object, default: () => {}, - required: true + required: true, }, shares: { type: Array, default: () => [], - required: true + required: true, }, canReshare: { type: Boolean, - required: true - } + required: true, + }, }, computed: { @@ -94,7 +94,7 @@ export default { */ hasShares() { return this.shares.length > 0 - } + }, }, methods: { @@ -135,7 +135,7 @@ export default { removeShare(share) { const index = this.shares.findIndex(item => item === share) this.shares.splice(index, 1) - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/views/SharingList.vue b/apps/files_sharing/src/views/SharingList.vue index c2ecbbbd1aa3365ca3d5e2a3c955ddb5f12cdfff..b8f12f6ef157b325590e385748b68f0bc5f7b6e6 100644 --- a/apps/files_sharing/src/views/SharingList.vue +++ b/apps/files_sharing/src/views/SharingList.vue @@ -39,26 +39,26 @@ export default { name: 'SharingList', components: { - SharingEntry + SharingEntry, }, props: { fileInfo: { type: Object, default: () => {}, - required: true + required: true, }, shares: { type: Array, default: () => [], - required: true - } + required: true, + }, }, computed: { hasShares() { return this.shares.length === 0 - } + }, }, methods: { @@ -70,7 +70,7 @@ export default { removeShare(share) { const index = this.shares.findIndex(item => item === share) this.shares.splice(index, 1) - } - } + }, + }, } </script> diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue index b15ec5e9a649440fb131be4a2ee42de2fc37877a..54c5a69a90ca560a8ee64dae5ef730be96c1b3c3 100644 --- a/apps/files_sharing/src/views/SharingTab.vue +++ b/apps/files_sharing/src/views/SharingTab.vue @@ -114,7 +114,7 @@ export default { SharingInput, SharingLinkList, SharingList, - Tab + Tab, }, mixins: [ShareTypes], @@ -123,8 +123,8 @@ export default { fileInfo: { type: Object, default: () => {}, - required: true - } + required: true, + }, }, data() { @@ -139,7 +139,7 @@ export default { sharedWithMe: {}, shares: [], linkShares: [], - sections: OCA.Sharing.ShareTabSections.getSections() + sections: OCA.Sharing.ShareTabSections.getSections(), } }, @@ -176,14 +176,14 @@ export default { canReshare() { return !!(this.fileInfo.permissions & OC.PERMISSION_SHARE) || !!(this.reshare && this.reshare.hasSharePermission) - } + }, }, watch: { fileInfo() { this.resetState() this.getShares() - } + }, }, beforeMount() { @@ -209,15 +209,15 @@ export default { params: { format, path, - reshares: true - } + reshares: true, + }, }) const fetchSharedWithMe = axios.get(shareUrl, { params: { format, path, - shared_with_me: true - } + shared_with_me: true, + }, }) // wait for data @@ -254,7 +254,7 @@ export default { updateExpirationSubtitle(share) { const expiration = moment(share.expireDate).unix() this.$set(this.sharedWithMe, 'subtitle', t('files_sharing', 'Expires {relativetime}', { - relativetime: OC.Util.relativeModifiedDate(expiration * 1000) + relativetime: OC.Util.relativeModifiedDate(expiration * 1000), })) // share have expired @@ -301,7 +301,7 @@ export default { this.sharedWithMe = { displayName, title, - user + user, } this.reshare = share @@ -329,8 +329,8 @@ export default { } else { this.shares.unshift(share) } - } - } + }, + }, } </script> diff --git a/apps/files_trashbin/js/files_trashbin.js.map b/apps/files_trashbin/js/files_trashbin.js.map index 579e01f5b554a28629eda1f5babc1148d0403b98..0d500de0e225aa919983245378cded0316595fbc 100644 Binary files a/apps/files_trashbin/js/files_trashbin.js.map and b/apps/files_trashbin/js/files_trashbin.js.map differ diff --git a/apps/files_trashbin/src/app.js b/apps/files_trashbin/src/app.js index 3405f79b15f92d18d6b5e230d275152397cdb5a7..db810ef88053c7f82e410ebd68d8f6ca441062e2 100644 --- a/apps/files_trashbin/src/app.js +++ b/apps/files_trashbin/src/app.js @@ -30,9 +30,9 @@ OCA.Trashbin.App = { host: OC.getHost(), port: OC.getPort(), root: OC.linkToRemoteBase('dav') + '/trashbin/' + OC.getCurrentUser().uid, - useHTTPS: OC.getProtocol() === 'https' + useHTTPS: OC.getProtocol() === 'https', }) - var urlParams = OC.Util.History.parseUrlQuery() + const urlParams = OC.Util.History.parseUrlQuery() this.fileList = new OCA.Trashbin.FileList( $('#app-content-trashbin'), { fileActions: this._createFileActions(), @@ -43,28 +43,28 @@ OCA.Trashbin.App = { { name: 'restore', displayName: t('files_trashbin', 'Restore'), - iconClass: 'icon-history' + iconClass: 'icon-history', }, { name: 'delete', displayName: t('files_trashbin', 'Delete permanently'), - iconClass: 'icon-delete' - } + iconClass: 'icon-delete', + }, ], client: this.client, // The file list is created when a "show" event is handled, so // it should be marked as "shown" like it would have been done // if handling the event with the file list already created. - shown: true + shown: true, } ) }, _createFileActions: function() { - var client = this.client - var fileActions = new OCA.Files.FileActions() + const client = this.client + const fileActions = new OCA.Files.FileActions() fileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) { - var dir = context.fileList.getCurrentDirectory() + const dir = context.fileList.getCurrentDirectory() context.fileList.changeDirectory(OC.joinPaths(dir, filename)) }) @@ -78,10 +78,10 @@ OCA.Trashbin.App = { permissions: OC.PERMISSION_READ, iconClass: 'icon-history', actionHandler: function(filename, context) { - var fileList = context.fileList - var tr = fileList.findFileEl(filename) + const fileList = context.fileList + const tr = fileList.findFileEl(filename) fileList.showFileBusyState(tr, true) - var dir = context.fileList.getCurrentDirectory() + const dir = context.fileList.getCurrentDirectory() client.move(OC.joinPaths('trash', dir, filename), OC.joinPaths('restore', filename), true) .then( fileList._removeCallback.bind(fileList, [filename]), @@ -90,7 +90,7 @@ OCA.Trashbin.App = { OC.Notification.show(t('files_trashbin', 'Error while restoring file from trashbin')) } ) - } + }, }) fileActions.registerAction({ @@ -100,18 +100,18 @@ OCA.Trashbin.App = { permissions: OC.PERMISSION_READ, iconClass: 'icon-delete', render: function(actionSpec, isDefault, context) { - var $actionLink = fileActions._makeActionLink(actionSpec, context) + const $actionLink = fileActions._makeActionLink(actionSpec, context) $actionLink.attr('original-title', t('files_trashbin', 'Delete permanently')) $actionLink.children('img').attr('alt', t('files_trashbin', 'Delete permanently')) context.$file.find('td:last').append($actionLink) return $actionLink }, actionHandler: function(filename, context) { - var fileList = context.fileList + const fileList = context.fileList $('.tipsy').remove() - var tr = fileList.findFileEl(filename) + const tr = fileList.findFileEl(filename) fileList.showFileBusyState(tr, true) - var dir = context.fileList.getCurrentDirectory() + const dir = context.fileList.getCurrentDirectory() client.remove(OC.joinPaths('trash', dir, filename)) .then( fileList._removeCallback.bind(fileList, [filename]), @@ -120,15 +120,15 @@ OCA.Trashbin.App = { OC.Notification.show(t('files_trashbin', 'Error while removing file from trashbin')) } ) - } + }, }) return fileActions - } + }, } $(document).ready(function() { $('#app-content-trashbin').one('show', function() { - var App = OCA.Trashbin.App + const App = OCA.Trashbin.App App.initialize($('#app-content-trashbin')) // force breadcrumb init // App.fileList.changeDirectory(App.fileList.getCurrentDirectory(), false, true); diff --git a/apps/files_versions/js/files_versions.js b/apps/files_versions/js/files_versions.js index d35d97e1ecaf22ef806ddf4c66a7f863b3d5d181..083b955623f56b7dbdcace6466ee1aabc7ddaf86 100644 Binary files a/apps/files_versions/js/files_versions.js and b/apps/files_versions/js/files_versions.js differ diff --git a/apps/files_versions/js/files_versions.js.map b/apps/files_versions/js/files_versions.js.map index 8c1c120183430e11eb4b5298688d945e415d7891..25613fcf178cab849d6551e5e8c946b78d16c3d5 100644 Binary files a/apps/files_versions/js/files_versions.js.map and b/apps/files_versions/js/files_versions.js.map differ diff --git a/apps/files_versions/src/filesplugin.js b/apps/files_versions/src/filesplugin.js index e47003d661102df1a64632659af9479200e49a47..845e70a542582fe3e61478130c99e1baa3eb31b1 100644 --- a/apps/files_versions/src/filesplugin.js +++ b/apps/files_versions/src/filesplugin.js @@ -26,7 +26,7 @@ } fileList.registerTabView(new OCA.Versions.VersionsTabView('versionsTabView', { order: -10 })) - } + }, } })() diff --git a/apps/files_versions/src/versioncollection.js b/apps/files_versions/src/versioncollection.js index 1f3356e43d3a40c5dac6ac168753ae00b11cc23f..9fdcde886026ca9dafc9a85635d76475a0ffa0dd 100644 --- a/apps/files_versions/src/versioncollection.js +++ b/apps/files_versions/src/versioncollection.js @@ -12,7 +12,7 @@ /** * @memberof OCA.Versions */ - var VersionCollection = OC.Backbone.Collection.extend({ + const VersionCollection = OC.Backbone.Collection.extend({ model: OCA.Versions.VersionModel, sync: OC.Backbone.davSync, @@ -49,7 +49,7 @@ return this._client || new OC.Files.Client({ host: OC.getHost(), root: OC.linkToRemoteBase('dav') + '/versions/' + this.getCurrentUser(), - useHTTPS: OC.getProtocol() === 'https' + useHTTPS: OC.getProtocol() === 'https', }) }, @@ -58,11 +58,11 @@ }, parse: function(result) { - var fullPath = this._fileInfo.getFullPath() - var fileId = this._fileInfo.get('id') - var name = this._fileInfo.get('name') - var user = this.getCurrentUser() - var client = this.getClient() + const fullPath = this._fileInfo.getFullPath() + const fileId = this._fileInfo.get('id') + const name = this._fileInfo.get('name') + const user = this.getCurrentUser() + const client = this.getClient() return _.map(result, function(version) { version.fullPath = fullPath version.fileId = fileId @@ -74,7 +74,7 @@ version.client = client return version }) - } + }, }) OCA.Versions = OCA.Versions || {} diff --git a/apps/files_versions/src/versionmodel.js b/apps/files_versions/src/versionmodel.js index e36e59ac046e90301c2be92305d849e49246994b..9ad4ffd839dbacd857384fb8c53d3d45005dffaf 100644 --- a/apps/files_versions/src/versionmodel.js +++ b/apps/files_versions/src/versionmodel.js @@ -12,13 +12,13 @@ /** * @memberof OCA.Versions */ - var VersionModel = OC.Backbone.Model.extend({ + const VersionModel = OC.Backbone.Model.extend({ sync: OC.Backbone.davSync, davProperties: { 'size': '{DAV:}getcontentlength', 'mimetype': '{DAV:}getcontenttype', - 'timestamp': '{DAV:}getlastmodified' + 'timestamp': '{DAV:}getlastmodified', }, /** @@ -29,9 +29,9 @@ */ revert: function(options) { options = options ? _.clone(options) : {} - var model = this + const model = this - var client = this.get('client') + const client = this.get('client') return client.move('/versions/' + this.get('fileId') + '/' + this.get('id'), '/restore/target', true) .done(function() { @@ -53,17 +53,17 @@ }, getPreviewUrl: function() { - var url = OC.generateUrl('/apps/files_versions/preview') - var params = { + const url = OC.generateUrl('/apps/files_versions/preview') + const params = { file: this.get('fullPath'), - version: this.get('id') + version: this.get('id'), } return url + '?' + OC.buildQueryString(params) }, getDownloadUrl: function() { return OC.linkToRemoteBase('dav') + '/versions/' + this.get('user') + '/versions/' + this.get('fileId') + '/' + this.get('id') - } + }, }) OCA.Versions = OCA.Versions || {} diff --git a/apps/files_versions/src/versionstabview.js b/apps/files_versions/src/versionstabview.js index b85cb6b08f58c48c1ca8346e54c07e7ce1aad308..4617a2861c1e71ae8103e96e375baa9a3d13f1e7 100644 --- a/apps/files_versions/src/versionstabview.js +++ b/apps/files_versions/src/versionstabview.js @@ -15,7 +15,7 @@ import Template from './templates/template.handlebars'; /** * @memberof OCA.Versions */ - var VersionsTabView = OCA.Files.DetailTabView.extend(/** @lends OCA.Versions.VersionsTabView.prototype */{ + const VersionsTabView = OCA.Files.DetailTabView.extend(/** @lends OCA.Versions.VersionsTabView.prototype */{ id: 'versionsTabView', className: 'tab versionsTabView', @@ -24,7 +24,7 @@ import Template from './templates/template.handlebars'; $versionsContainer: null, events: { - 'click .revertVersion': '_onClickRevertVersion' + 'click .revertVersion': '_onClickRevertVersion', }, initialize: function() { @@ -57,18 +57,17 @@ import Template from './templates/template.handlebars'; }, _onClickRevertVersion: function(ev) { - var self = this - var $target = $(ev.target) - var fileInfoModel = this.collection.getFileInfo() - var revision + const self = this + let $target = $(ev.target) + const fileInfoModel = this.collection.getFileInfo() if (!$target.is('li')) { $target = $target.closest('li') } ev.preventDefault() - revision = $target.attr('data-revision') + const revision = $target.attr('data-revision') - var versionModel = this.collection.get(revision) + const versionModel = this.collection.get(revision) versionModel.revert({ success: function() { // reset and re-fetch the updated collection @@ -85,7 +84,7 @@ import Template from './templates/template.handlebars'; size: versionModel.get('size'), mtime: versionModel.get('timestamp') * 1000, // temp dummy, until we can do a PROPFIND - etag: versionModel.get('id') + versionModel.get('timestamp') + etag: versionModel.get('id') + versionModel.get('timestamp'), }) }, @@ -96,13 +95,13 @@ import Template from './templates/template.handlebars'; OC.Notification.show(t('files_version', 'Failed to revert {file} to revision {timestamp}.', { file: versionModel.getFullPath(), - timestamp: OC.Util.formatDate(versionModel.get('timestamp') * 1000) + timestamp: OC.Util.formatDate(versionModel.get('timestamp') * 1000), }), { - type: 'error' + type: 'error', } ) - } + }, }) // spinner @@ -125,7 +124,7 @@ import Template from './templates/template.handlebars'; }, _onAddModel: function(model) { - var $el = $(this.itemTemplate(this._formatItem(model))) + const $el = $(this.itemTemplate(this._formatItem(model))) this.$versionsContainer.append($el) $el.find('.has-tooltip').tooltip() }, @@ -151,10 +150,10 @@ import Template from './templates/template.handlebars'; }, _formatItem: function(version) { - var timestamp = version.get('timestamp') * 1000 - var size = version.has('size') ? version.get('size') : 0 - var preview = OC.MimeType.getIconUrl(version.get('mimetype')) - var img = new Image() + const timestamp = version.get('timestamp') * 1000 + const size = version.has('size') ? version.get('size') : 0 + const preview = OC.MimeType.getIconUrl(version.get('mimetype')) + const img = new Image() img.onload = function() { $('li[data-revision=' + version.get('id') + '] .preview').attr('src', version.getPreviewUrl()) } @@ -174,7 +173,7 @@ import Template from './templates/template.handlebars'; revertIconUrl: OC.imagePath('core', 'actions/history'), previewUrl: preview, revertLabel: t('files_versions', 'Restore'), - canRevert: (this.collection.getFileInfo().get('permissions') & OC.PERMISSION_UPDATE) !== 0 + canRevert: (this.collection.getFileInfo().get('permissions') & OC.PERMISSION_UPDATE) !== 0, }, version.attributes) }, @@ -183,7 +182,7 @@ import Template from './templates/template.handlebars'; */ render: function() { this.$el.html(this.template({ - emptyResultLabel: t('files_versions', 'No other versions available') + emptyResultLabel: t('files_versions', 'No other versions available'), })) this.$el.find('.has-tooltip').tooltip() this.$versionsContainer = this.$el.find('ul.versions') @@ -200,7 +199,7 @@ import Template from './templates/template.handlebars'; return false } return !fileInfo.isDirectory() - } + }, }) OCA.Versions = OCA.Versions || {} diff --git a/apps/oauth2/js/oauth2.js b/apps/oauth2/js/oauth2.js index 4c6ef9724763dc4b8d38ed324c5fd288c7ea88bb..1e0a5407a73c42d88549f3c83eaaadbe1cb1695a 100644 Binary files a/apps/oauth2/js/oauth2.js and b/apps/oauth2/js/oauth2.js differ diff --git a/apps/oauth2/js/oauth2.js.map b/apps/oauth2/js/oauth2.js.map index 5a7cda5c46be41b3ce0b437d9915ea7a90414e0d..4e523d83f24907a96edc0b9a097605b152eda6c4 100644 Binary files a/apps/oauth2/js/oauth2.js.map and b/apps/oauth2/js/oauth2.js.map differ diff --git a/apps/oauth2/src/App.vue b/apps/oauth2/src/App.vue index 9f720be796e812948087db5f28157682aaa4066a..e18502ee6f3c763375629b512992d3fdecdb74ca 100644 --- a/apps/oauth2/src/App.vue +++ b/apps/oauth2/src/App.vue @@ -80,13 +80,13 @@ import { generateUrl } from '@nextcloud/router' export default { name: 'App', components: { - OAuthItem + OAuthItem, }, props: { clients: { type: Array, - required: true - } + required: true, + }, }, data: function() { return { @@ -94,8 +94,8 @@ export default { name: '', redirectUri: '', errorMsg: '', - error: false - } + error: false, + }, } }, methods: { @@ -112,7 +112,7 @@ export default { generateUrl('apps/oauth2/clients'), { name: this.newClient.name, - redirectUri: this.newClient.redirectUri + redirectUri: this.newClient.redirectUri, } ).then(response => { this.clients.push(response.data) @@ -123,7 +123,7 @@ export default { this.newClient.error = true this.newClient.errorMsg = reason.response.data.message }) - } - } + }, + }, } </script> diff --git a/apps/oauth2/src/components/OAuthItem.vue b/apps/oauth2/src/components/OAuthItem.vue index 2d670447d72b66b2403f8b352ac30717a9fa5519..8da5442ab5e87e4686db6d7c4ba2c0a515a12fa7 100644 --- a/apps/oauth2/src/components/OAuthItem.vue +++ b/apps/oauth2/src/components/OAuthItem.vue @@ -37,8 +37,8 @@ export default { props: { client: { type: Object, - required: true - } + required: true, + }, }, data: function() { return { @@ -47,7 +47,7 @@ export default { redirectUri: this.client.redirectUri, clientId: this.client.clientId, clientSecret: this.client.clientSecret, - renderSecret: false + renderSecret: false, } }, computed: { @@ -57,13 +57,13 @@ export default { } else { return '****' } - } + }, }, methods: { toggleSecret() { this.renderSecret = !this.renderSecret - } - } + }, + }, } </script> diff --git a/apps/oauth2/src/main.js b/apps/oauth2/src/main.js index 61aea381151e5b2392b76b2082ea9ca38bd99f85..42fcb522eca7326f6a7597b5cd93c56876c52dea 100644 --- a/apps/oauth2/src/main.js +++ b/apps/oauth2/src/main.js @@ -32,7 +32,7 @@ const clients = loadState('oauth2', 'clients') const View = Vue.extend(App) const oauth = new View({ propsData: { - clients - } + clients, + }, }) oauth.$mount('#oauth2') diff --git a/apps/settings/js/vue-4.js b/apps/settings/js/vue-4.js index d780463dc542324b2baab645d32019a760f733b9..270cb4164fa7a66be8475cdf4fc5b7940baa17f5 100644 Binary files a/apps/settings/js/vue-4.js and b/apps/settings/js/vue-4.js differ diff --git a/apps/settings/js/vue-4.js.map b/apps/settings/js/vue-4.js.map index 62ce2a46be699c408e3d804a3b6aca7bdbb921a6..800f87cb2d62d89a57e3ea6116714f177a12c879 100644 Binary files a/apps/settings/js/vue-4.js.map and b/apps/settings/js/vue-4.js.map differ diff --git a/apps/settings/js/vue-6.js b/apps/settings/js/vue-6.js index f93e3355b69e6b5800eb9aaca519e7dca39e04f0..69dd6f26d2630f514ad79c79fd9b6fc921e67286 100644 Binary files a/apps/settings/js/vue-6.js and b/apps/settings/js/vue-6.js differ diff --git a/apps/settings/js/vue-6.js.map b/apps/settings/js/vue-6.js.map index 2ae447645f28375d70a6582b546e1ca251189dc5..6ca0eb22ff177bdeb5c50ccf67e9692a5f6969c3 100644 Binary files a/apps/settings/js/vue-6.js.map and b/apps/settings/js/vue-6.js.map differ diff --git a/apps/settings/js/vue-settings-admin-security.js b/apps/settings/js/vue-settings-admin-security.js index 456e590eb34ad0f0c7a2330905bb0f2ab0d371be..684ee7cd1e078ee18f70360e1b35c52d8d64b567 100644 Binary files a/apps/settings/js/vue-settings-admin-security.js and b/apps/settings/js/vue-settings-admin-security.js differ diff --git a/apps/settings/js/vue-settings-admin-security.js.map b/apps/settings/js/vue-settings-admin-security.js.map index 513ac2e5fa807ae5e4ab53b94de8f349a7a75f85..3f4ba4f396ef3ddbeae1d34de60bdf55be8dcea3 100644 Binary files a/apps/settings/js/vue-settings-admin-security.js.map and b/apps/settings/js/vue-settings-admin-security.js.map differ diff --git a/apps/settings/js/vue-settings-apps-users-management.js b/apps/settings/js/vue-settings-apps-users-management.js index 386c318de314e67edb7ade7ee927608a54370195..560030e9913f6bf10ff6ac3e407894992255dce2 100644 Binary files a/apps/settings/js/vue-settings-apps-users-management.js and b/apps/settings/js/vue-settings-apps-users-management.js differ diff --git a/apps/settings/js/vue-settings-apps-users-management.js.map b/apps/settings/js/vue-settings-apps-users-management.js.map index 729f914e1b8b8b2405738c1d7a4fc91a535a8de0..a051f2ac840836aa6748fbefe26e143dfe685adb 100644 Binary files a/apps/settings/js/vue-settings-apps-users-management.js.map and b/apps/settings/js/vue-settings-apps-users-management.js.map differ diff --git a/apps/settings/js/vue-settings-personal-security.js b/apps/settings/js/vue-settings-personal-security.js index ca9a50a24f553006779f75e0e9dc7561cdfda512..57e9fe2e2486f0905e56da028dade95b9e5915ac 100644 Binary files a/apps/settings/js/vue-settings-personal-security.js and b/apps/settings/js/vue-settings-personal-security.js differ diff --git a/apps/settings/js/vue-settings-personal-security.js.map b/apps/settings/js/vue-settings-personal-security.js.map index a91c8f66abbecc3fd9be95e94246d923009d046c..186db0b393e03f2a85eea382d87d2865bae1e7a3 100644 Binary files a/apps/settings/js/vue-settings-personal-security.js.map and b/apps/settings/js/vue-settings-personal-security.js.map differ diff --git a/apps/settings/src/App.vue b/apps/settings/src/App.vue index 591a784c02a34a9248670e06fc5e45294079f2f7..ed0441fa40aedcebe62a709bf297915dc0b69e1b 100644 --- a/apps/settings/src/App.vue +++ b/apps/settings/src/App.vue @@ -33,6 +33,6 @@ export default { if (serverDataElmt !== null) { this.$store.commit('setServerData', JSON.parse(document.getElementById('serverData').dataset.server)) } - } + }, } </script> diff --git a/apps/settings/src/components/AdminTwoFactor.vue b/apps/settings/src/components/AdminTwoFactor.vue index 7a9645527c1c8f84f6afb532bdc01aaaa3c20b1d..45643dc84b6d71758bdff9c990e86f9930c19c7f 100644 --- a/apps/settings/src/components/AdminTwoFactor.vue +++ b/apps/settings/src/components/AdminTwoFactor.vue @@ -73,14 +73,14 @@ import _ from 'lodash' export default { name: 'AdminTwoFactor', components: { - Multiselect + Multiselect, }, data() { return { loading: false, dirty: false, groups: [], - loadingGroups: false + loadingGroups: false, } }, computed: { @@ -91,7 +91,7 @@ export default { set: function(val) { this.dirty = true this.$store.commit('setEnforced', val) - } + }, }, enforcedGroups: { get: function() { @@ -100,7 +100,7 @@ export default { set: function(val) { this.dirty = true this.$store.commit('setEnforcedGroups', val) - } + }, }, excludedGroups: { get: function() { @@ -109,8 +109,8 @@ export default { set: function(val) { this.dirty = true this.$store.commit('setExcludedGroups', val) - } - } + }, + }, }, mounted() { // Groups are loaded dynamically, but the assigned ones *should* @@ -138,7 +138,7 @@ export default { const data = { enforced: this.enforced, enforcedGroups: this.enforcedGroups, - excludedGroups: this.excludedGroups + excludedGroups: this.excludedGroups, } axios.put(OC.generateUrl('/settings/api/admin/twofactorauth'), data) .then(resp => resp.data) @@ -150,8 +150,8 @@ export default { console.error('could not save changes', err) }) .then(() => { this.loading = false }) - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/AppDetails.vue b/apps/settings/src/components/AppDetails.vue index 4300ccf067374948338a77e3b3faf078f29125ad..c20819f297e91dff57bef57103efeb9a71680ee0 100644 --- a/apps/settings/src/components/AppDetails.vue +++ b/apps/settings/src/components/AppDetails.vue @@ -200,13 +200,13 @@ export default { name: 'AppDetails', components: { Multiselect, - AppScore + AppScore, }, mixins: [AppManagement, PrefixMixin, SvgFilterMixin], props: ['category', 'app'], data() { return { - groupCheckedAppsData: false + groupCheckedAppsData: false, } }, computed: { @@ -226,8 +226,8 @@ export default { if (typeof this.app.author === 'string') { return [ { - '@value': this.app.author - } + '@value': this.app.author, + }, ] } if (this.app.author['@value']) { @@ -244,10 +244,11 @@ export default { .sort((a, b) => a.name.localeCompare(b.name)) }, renderMarkdown() { - var renderer = new marked.Renderer() + const renderer = new marked.Renderer() renderer.link = function(href, title, text) { + let prot try { - var prot = decodeURIComponent(unescape(href)) + prot = decodeURIComponent(unescape(href)) .replace(/[^\w:]/g, '') .toLowerCase() } catch (e) { @@ -258,7 +259,7 @@ export default { return '' } - var out = '<a href="' + href + '" rel="noreferrer noopener"' + let out = '<a href="' + href + '" rel="noreferrer noopener"' if (title) { out += ' title="' + title + '"' } @@ -284,7 +285,7 @@ export default { pedantic: false, sanitize: true, smartLists: true, - smartypants: false + smartypants: false, }), { SAFE_FOR_JQUERY: true, @@ -297,17 +298,17 @@ export default { 'li', 'em', 'del', - 'blockquote' - ] + 'blockquote', + ], } ) - } + }, }, mounted() { if (this.app.groups.length > 0) { this.groupCheckedAppsData = true } - } + }, } </script> diff --git a/apps/settings/src/components/AppList.vue b/apps/settings/src/components/AppList.vue index 3259011497aa99b4d54c421d5d99f1e2aab73340..2fecf137dd8492f25a63c6d610464f3b3c683c8f 100644 --- a/apps/settings/src/components/AppList.vue +++ b/apps/settings/src/components/AppList.vue @@ -105,7 +105,7 @@ import pLimit from 'p-limit' export default { name: 'AppList', components: { - AppItem + AppItem, }, mixins: [PrefixMixin], props: ['category', 'app', 'search'], @@ -123,7 +123,7 @@ export default { return this.hasPendingUpdate && ['installed', 'updates'].includes(this.category) }, apps() { - let apps = this.$store.getters.getAllApps + const apps = this.$store.getters.getAllApps .filter(app => app.name.toLowerCase().search(this.search.toLowerCase()) !== -1) .sort(function(a, b) { const sortStringA = '' + (a.active ? 0 : 1) + (a.update ? 0 : 1) + a.name @@ -183,20 +183,20 @@ export default { return (this.category === 'app-bundles') }, allBundlesEnabled() { - let self = this + const self = this return function(id) { return self.bundleApps(id).filter(app => !app.active).length === 0 } }, bundleToggleText() { - let self = this + const self = this return function(id) { if (self.allBundlesEnabled(id)) { return t('settings', 'Disable all') } return t('settings', 'Enable all') } - } + }, }, methods: { toggleBundle(id) { @@ -206,7 +206,7 @@ export default { return this.enableBundle(id) }, enableBundle(id) { - let apps = this.bundleApps(id).map(app => app.id) + const apps = this.bundleApps(id).map(app => app.id) this.$store.dispatch('enableApp', { appId: apps, groups: [] }) .catch((error) => { console.error(error) @@ -214,7 +214,7 @@ export default { }) }, disableBundle(id) { - let apps = this.bundleApps(id).map(app => app.id) + const apps = this.bundleApps(id).map(app => app.id) this.$store.dispatch('disableApp', { appId: apps, groups: [] }) .catch((error) => { OC.Notification.show(error) @@ -226,7 +226,7 @@ export default { .filter(app => app.update) .map(app => limit(() => this.$store.dispatch('updateApp', { appId: app.id })) ) - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/AppList/AppItem.vue b/apps/settings/src/components/AppList/AppItem.vue index d6d27cc6f8c35fada910e310c8fc2a7092126911..d00c62910f7f45ca1d3c594c535d8b66f9bfa3ba 100644 --- a/apps/settings/src/components/AppList/AppItem.vue +++ b/apps/settings/src/components/AppList/AppItem.vue @@ -114,7 +114,7 @@ import SvgFilterMixin from '../SvgFilterMixin' export default { name: 'AppItem', components: { - AppScore + AppScore, }, mixins: [AppManagement, SvgFilterMixin], props: { @@ -122,24 +122,24 @@ export default { category: {}, listView: { type: Boolean, - default: true - } + default: true, + }, }, data() { return { isSelected: false, - scrolled: false + scrolled: false, } }, computed: { hasRating() { return this.app.appstoreData && this.app.appstoreData.ratingNumOverall > 5 - } + }, }, watch: { '$route.params.id': function(id) { this.isSelected = (this.app.id === id) - } + }, }, mounted() { this.isSelected = (this.app.id === this.$route.params.id) @@ -155,7 +155,7 @@ export default { try { await this.$router.push({ name: 'apps-details', - params: { category: this.category, id: this.app.id } + params: { category: this.category, id: this.app.id }, }) } catch (e) { // we already view this app @@ -163,8 +163,8 @@ export default { }, prefix(prefix, content) { return prefix + '_' + content - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/AppList/AppScore.vue b/apps/settings/src/components/AppList/AppScore.vue index 810a8b54e8f25f162495155174eb8f4bae0a9438..f3ff80b7792526ca241b7f9c7ddd40e66f4dba87 100644 --- a/apps/settings/src/components/AppList/AppScore.vue +++ b/apps/settings/src/components/AppList/AppScore.vue @@ -29,10 +29,10 @@ export default { props: ['score'], computed: { scoreImage() { - let score = Math.round(this.score * 10) - let imageName = 'rating/s' + score + '.svg' + const score = Math.round(this.score * 10) + const imageName = 'rating/s' + score + '.svg' return OC.imagePath('core', imageName) - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/AppManagement.vue b/apps/settings/src/components/AppManagement.vue index 4de40728c5d4b8d04b2a5dbf2e6269d360823a22..8d9ebed5e42d617d406ce351eecb2a74fca30509 100644 --- a/apps/settings/src/components/AppManagement.vue +++ b/apps/settings/src/components/AppManagement.vue @@ -27,7 +27,7 @@ export default { return this.app.groups.map(group => { return { id: group, name: group } }) }, loading() { - let self = this + const self = this return function(id) { return self.$store.getters.loading(id) } @@ -59,7 +59,7 @@ export default { return base + ' ' + t('settings', 'The app will be downloaded from the app store') } return base - } + }, }, mounted() { if (this.app.groups.length > 0) { @@ -92,12 +92,12 @@ export default { return true }, addGroupLimitation(group) { - let groups = this.app.groups.concat([]).concat([group.id]) + const groups = this.app.groups.concat([]).concat([group.id]) this.$store.dispatch('enableApp', { appId: this.app.id, groups: groups }) }, removeGroupLimitation(group) { - let currentGroups = this.app.groups.concat([]) - let index = currentGroups.indexOf(group.id) + const currentGroups = this.app.groups.concat([]) + const index = currentGroups.indexOf(group.id) if (index > -1) { currentGroups.splice(index, 1) } @@ -132,7 +132,7 @@ export default { this.$store.dispatch('updateApp', { appId: appId }) .then((response) => { OC.Settings.Apps.rebuildNavigation() }) .catch((error) => { OC.Notification.show(error) }) - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/AuthToken.vue b/apps/settings/src/components/AuthToken.vue index 034efc4b6a878ec2641d6506549b52aaf6528219..7486aa6089acc8fb210c5acd26f6c4dae0552ae1 100644 --- a/apps/settings/src/components/AuthToken.vue +++ b/apps/settings/src/components/AuthToken.vue @@ -88,7 +88,7 @@ import { Actions, ActionButton, - ActionCheckbox + ActionCheckbox, } from 'nextcloud-vue' const userAgentMap = { @@ -114,7 +114,7 @@ const userAgentMap = { // Mozilla/5.0 (U; Linux; Maemo; Jolla; Sailfish; like Android 4.3) AppleWebKit/538.1 (KHTML, like Gecko) WebPirate/2.0 like Mobile Safari/538.1 (compatible) webPirate: /(Sailfish).*WebPirate\/(\d+)/, // Mozilla/5.0 (Maemo; Linux; U; Jolla; Sailfish; Mobile; rv:31.0) Gecko/31.0 Firefox/31.0 SailfishBrowser/1.0 - sailfishBrowser: /(Sailfish).*SailfishBrowser\/(\d+)/ + sailfishBrowser: /(Sailfish).*SailfishBrowser\/(\d+)/, } const nameMap = { ie: t('setting', 'Internet Explorer'), @@ -131,7 +131,7 @@ const nameMap = { androidTalkClient: t('setting', 'Nextcloud Talk for Android'), davDroid: 'DAVdroid', webPirate: 'WebPirate', - sailfishBrowser: 'SailfishBrowser' + sailfishBrowser: 'SailfishBrowser', } const iconMap = { ie: 'icon-desktop', @@ -148,7 +148,7 @@ const iconMap = { androidTalkClient: 'icon-phone', davDroid: 'icon-phone', webPirate: 'icon-link', - sailfishBrowser: 'icon-link' + sailfishBrowser: 'icon-link', } export default { @@ -156,20 +156,20 @@ export default { components: { Actions, ActionButton, - ActionCheckbox + ActionCheckbox, }, props: { token: { type: Object, - required: true - } + required: true, + }, }, data() { return { showMore: this.token.canScope || this.token.canDelete, renaming: false, newName: '', - actionOpen: false + actionOpen: false, } }, computed: { @@ -181,14 +181,14 @@ export default { }, iconName() { // pretty format sync client user agent - let matches = this.token.name.match(/Mozilla\/5\.0 \((\w+)\) (?:mirall|csyncoC)\/(\d+\.\d+\.\d+)/) + const matches = this.token.name.match(/Mozilla\/5\.0 \((\w+)\) (?:mirall|csyncoC)\/(\d+\.\d+\.\d+)/) let icon = '' if (matches) { /* eslint-disable-next-line */ this.token.name = t('settings', 'Sync client - {os}', { os: matches[1], - version: matches[2] + version: matches[2], }) icon = 'icon-desktop' } @@ -196,7 +196,7 @@ export default { // preserve title for cases where we format it further const title = this.token.name let name = this.token.name - for (let client in userAgentMap) { + for (const client in userAgentMap) { const matches = title.match(userAgentMap[client]) if (matches) { if (matches[2] && matches[1]) { // version number and os @@ -216,12 +216,12 @@ export default { return { icon, - name + name, } }, wiping() { return this.token.type === 2 - } + }, }, methods: { startRename() { @@ -248,8 +248,8 @@ export default { wipe() { this.actionOpen = false this.$emit('wipe', this.token) - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/AuthTokenList.vue b/apps/settings/src/components/AuthTokenList.vue index 65f42197eda000592bdda562c88b2660a65a3e16..d0dfa6d92fc0b0645683a935beae0278263fa5fe 100644 --- a/apps/settings/src/components/AuthTokenList.vue +++ b/apps/settings/src/components/AuthTokenList.vue @@ -47,22 +47,22 @@ import AuthToken from './AuthToken' export default { name: 'AuthTokenList', components: { - AuthToken + AuthToken, }, props: { tokens: { type: Array, - required: true - } + required: true, + }, }, computed: { sortedTokens() { return this.tokens.slice().sort((t1, t2) => { - var ts1 = parseInt(t1.lastActivity, 10) - var ts2 = parseInt(t2.lastActivity, 10) + const ts1 = parseInt(t1.lastActivity, 10) + const ts2 = parseInt(t2.lastActivity, 10) return ts2 - ts1 }) - } + }, }, methods: { toggleScope(token, scope, value) { @@ -80,8 +80,8 @@ export default { onWipe(token) { // Just pass it on this.$emit('wipe', token) - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/AuthTokenSection.vue b/apps/settings/src/components/AuthTokenSection.vue index 72fadcd2fe2be14e406453764c1b5d8649afb211..e6643903cdc71b34d420a7f809dab05f9343f0dc 100644 --- a/apps/settings/src/components/AuthTokenSection.vue +++ b/apps/settings/src/components/AuthTokenSection.vue @@ -66,21 +66,21 @@ export default { name: 'AuthTokenSection', components: { AuthTokenSetupDialogue, - AuthTokenList + AuthTokenList, }, props: { tokens: { type: Array, - required: true + required: true, }, canCreateToken: { type: Boolean, - required: true - } + required: true, + }, }, data() { return { - baseUrl: OC.generateUrl('/settings/personal/authtokens') + baseUrl: OC.generateUrl('/settings/personal/authtokens'), } }, methods: { @@ -88,7 +88,7 @@ export default { console.debug('creating a new app token', name) const data = { - name + name, } return axios.post(this.baseUrl, data) .then(resp => resp.data) @@ -172,8 +172,8 @@ export default { console.error('could not wipe app token', err) OC.Notification.showTemporary(t('core', 'Error while wiping the device with the token')) } - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/AuthTokenSetupDialogue.vue b/apps/settings/src/components/AuthTokenSetupDialogue.vue index 22c867b3c96e3963d426b87b3faf4880eb18909a..0ffd0f25323f4dc2e4b95d1e3a79064dca10ca4d 100644 --- a/apps/settings/src/components/AuthTokenSetupDialogue.vue +++ b/apps/settings/src/components/AuthTokenSetupDialogue.vue @@ -83,13 +83,13 @@ import confirmPassword from 'nextcloud-password-confirmation' export default { name: 'AuthTokenSetupDialogue', components: { - QR + QR, }, props: { add: { type: Function, - required: true - } + required: true, + }, }, data() { return { @@ -101,30 +101,30 @@ export default { passwordCopied: false, showQR: false, qrUrl: '', - hoveringCopyButton: false + hoveringCopyButton: false, } }, computed: { copyTooltipOptions() { const base = { hideOnTargetClick: false, - trigger: 'manual' + trigger: 'manual', } if (this.passwordCopied) { return { ...base, content: t('core', 'Copied!'), - show: true + show: true, } } else { return { ...base, content: t('core', 'Copy'), - show: this.hoveringCopyButton + show: this.hoveringCopyButton, } } - } + }, }, methods: { selectInput(e) { @@ -171,8 +171,8 @@ export default { this.deviceName = '' this.appPassword = '' this.loginName = '' - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/PrefixMixin.vue b/apps/settings/src/components/PrefixMixin.vue index e43063d25b038f0d1a5d8821071a5b84be75435f..cd37416b27f565552211ae408b41c73c289d8d4d 100644 --- a/apps/settings/src/components/PrefixMixin.vue +++ b/apps/settings/src/components/PrefixMixin.vue @@ -26,7 +26,7 @@ export default { methods: { prefix(prefix, content) { return prefix + '_' + content - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/SvgFilterMixin.vue b/apps/settings/src/components/SvgFilterMixin.vue index eab5bee973b15132f39286d75a4a92d00280778a..228b574f3c492586718b5756ec598049a98b127f 100644 --- a/apps/settings/src/components/SvgFilterMixin.vue +++ b/apps/settings/src/components/SvgFilterMixin.vue @@ -25,16 +25,16 @@ export default { name: 'SvgFilterMixin', data() { return { - filterId: '' + filterId: '', } }, computed: { filterUrl() { return `url(#${this.filterId})` - } + }, }, mounted() { this.filterId = 'invertIconApps' + Math.floor((Math.random() * 100)) + new Date().getSeconds() + new Date().getMilliseconds() - } + }, } </script> diff --git a/apps/settings/src/components/UserList.vue b/apps/settings/src/components/UserList.vue index fc3ee47065a79c46fef116c5d2bc3c3001a5ba89..0fb1d09fbf72387b8317120dad5a6e8349a5628f 100644 --- a/apps/settings/src/components/UserList.vue +++ b/apps/settings/src/components/UserList.vue @@ -242,11 +242,11 @@ import Vue from 'vue' const unlimitedQuota = { id: 'none', - label: t('settings', 'Unlimited') + label: t('settings', 'Unlimited'), } const defaultQuota = { id: 'default', - label: t('settings', 'Default quota') + label: t('settings', 'Default quota'), } const newUser = { id: '', @@ -258,8 +258,8 @@ const newUser = { quota: defaultQuota, language: { code: 'en', - name: t('settings', 'Default language') - } + name: t('settings', 'Default language'), + }, } export default { @@ -267,25 +267,25 @@ export default { components: { userRow, Multiselect, - InfiniteLoading + InfiniteLoading, }, props: { users: { type: Array, - default: () => [] + default: () => [], }, showConfig: { type: Object, - required: true + required: true, }, selectedGroup: { type: String, - default: null + default: null, }, externalActions: { type: Array, - default: () => [] - } + default: () => [], + }, }, data() { return { @@ -293,11 +293,11 @@ export default { defaultQuota, loading: { all: false, - groups: false + groups: false, }, scrolled: false, searchQuery: '', - newUser: Object.assign({}, newUser) + newUser: Object.assign({}, newUser), } }, computed: { @@ -336,9 +336,9 @@ export default { }, quotaOptions() { // convert the preset array into objects - let quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({ + const quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({ id: cur, - label: cur + label: cur, }), []) // add default presets quotaPreset.unshift(this.unlimitedQuota) @@ -363,14 +363,14 @@ export default { return [ { label: t('settings', 'Common languages'), - languages: this.settings.languages.commonlanguages + languages: this.settings.languages.commonlanguages, }, { label: t('settings', 'All languages'), - languages: this.settings.languages.languages - } + languages: this.settings.languages.languages, + }, ] - } + }, }, watch: { // watch url change and group select @@ -394,7 +394,7 @@ export default { } else if (val === 1 && old === 0) { this.$refs.infiniteLoading.stateChanger.loaded() } - } + }, }, mounted() { if (!this.settings.canChangePassword) { @@ -429,7 +429,7 @@ export default { */ validateQuota(quota) { // only used for new presets sent through @Tag - let validQuota = OC.Util.computerFileSize(quota) + const validQuota = OC.Util.computerFileSize(quota) if (validQuota !== null && validQuota >= 0) { // unify format output quota = OC.Util.humanFileSize(OC.Util.computerFileSize(quota)) @@ -446,7 +446,7 @@ export default { offset: this.usersOffset, limit: this.usersLimit, group: this.selectedGroup !== 'disabled' ? this.selectedGroup : '', - search: this.searchQuery + search: this.searchQuery, }) .then((response) => { response ? $state.loaded() : $state.complete() @@ -494,7 +494,7 @@ export default { groups: this.newUser.groups.map(group => group.id), subadmin: this.newUser.subAdminsGroups.map(group => group.id), quota: this.newUser.quota.id, - language: this.newUser.language.code + language: this.newUser.language.code, }) .then(() => { this.resetForm() @@ -517,7 +517,7 @@ export default { setNewUserDefaultGroup(value) { if (value && value.length > 0) { // setting new user default group to the current selected one - let currentGroup = this.groups.find(group => group.id === value) + const currentGroup = this.groups.find(group => group.id === value) if (currentGroup) { this.newUser.groups = [currentGroup] return @@ -560,7 +560,7 @@ export default { this.$router.push({ name: 'users' }) this.$refs.infiniteLoading.stateChanger.reset() } - } - } + }, + }, } </script> diff --git a/apps/settings/src/components/UserList/UserRow.vue b/apps/settings/src/components/UserList/UserRow.vue index c818cc3e73382220ad47246735fe1b420a031f08..39d98f46f97471fbb5c33a4fbb66c1df943bf312 100644 --- a/apps/settings/src/components/UserList/UserRow.vue +++ b/apps/settings/src/components/UserList/UserRow.vue @@ -241,7 +241,7 @@ import { PopoverMenu, Multiselect, Actions, - ActionButton + ActionButton, } from 'nextcloud-vue' import UserRowSimple from './UserRowSimple' import UserRowMixin from '../../mixins/UserRowMixin' @@ -255,45 +255,45 @@ export default { PopoverMenu, Actions, ActionButton, - Multiselect + Multiselect, }, directives: { - ClickOutside + ClickOutside, }, mixins: [UserRowMixin], props: { user: { type: Object, - required: true + required: true, }, settings: { type: Object, - default: () => ({}) + default: () => ({}), }, groups: { type: Array, - default: () => [] + default: () => [], }, subAdminsGroups: { type: Array, - default: () => [] + default: () => [], }, quotaOptions: { type: Array, - default: () => [] + default: () => [], }, showConfig: { type: Object, - default: () => ({}) + default: () => ({}), }, languages: { type: Array, - required: true + required: true, }, externalActions: { type: Array, - default: () => [] - } + default: () => [], + }, }, data() { return { @@ -312,39 +312,39 @@ export default { delete: false, disable: false, languages: false, - wipe: false - } + wipe: false, + }, } }, computed: { /* USER POPOVERMENU ACTIONS */ userActions() { - let actions = [ + const actions = [ { icon: 'icon-delete', text: t('settings', 'Delete user'), - action: this.deleteUser + action: this.deleteUser, }, { icon: 'icon-delete', text: t('settings', 'Wipe all devices'), - action: this.wipeUserDevices + action: this.wipeUserDevices, }, { icon: this.user.enabled ? 'icon-close' : 'icon-add', text: this.user.enabled ? t('settings', 'Disable user') : t('settings', 'Enable user'), - action: this.enableDisableUser - } + action: this.enableDisableUser, + }, ] if (this.user.email !== null && this.user.email !== '') { actions.push({ icon: 'icon-mail', text: t('settings', 'Resend welcome email'), - action: this.sendWelcomeMail + action: this.sendWelcomeMail, }) } return actions.concat(this.externalActions) - } + }, }, methods: { @@ -357,7 +357,7 @@ export default { }, wipeUserDevices() { - let userid = this.user.id + const userid = this.user.id OC.dialogs.confirmDestructive( t('settings', 'In case of lost device or exiting the organization, this can remotely wipe the Nextcloud data from all devices associated with {userid}. Only works if the devices are connected to the internet.', { userid: userid }), t('settings', 'Remote wipe of devices'), @@ -365,7 +365,7 @@ export default { type: OC.dialogs.YES_NO_BUTTONS, confirm: t('settings', 'Wipe {userid}\'s devices', { userid: userid }), confirmClasses: 'error', - cancel: t('settings', 'Cancel') + cancel: t('settings', 'Cancel'), }, (result) => { if (result) { @@ -383,7 +383,7 @@ export default { }, deleteUser() { - let userid = this.user.id + const userid = this.user.id OC.dialogs.confirmDestructive( t('settings', 'Fully delete {userid}\'s account including all their personal files, app data, etc.', { userid: userid }), t('settings', 'Account deletion'), @@ -391,7 +391,7 @@ export default { type: OC.dialogs.YES_NO_BUTTONS, confirm: t('settings', 'Delete {userid}\'s account', { userid: userid }), confirmClasses: 'error', - cancel: t('settings', 'Cancel') + cancel: t('settings', 'Cancel'), }, (result) => { if (result) { @@ -411,11 +411,11 @@ export default { enableDisableUser() { this.loading.delete = true this.loading.all = true - let userid = this.user.id - let enabled = !this.user.enabled + const userid = this.user.id + const enabled = !this.user.enabled return this.$store.dispatch('enableDisableUser', { userid, - enabled + enabled, }) .then(() => { this.loading.delete = false @@ -429,12 +429,12 @@ export default { * @param {string} displayName The display name */ updateDisplayName() { - let displayName = this.$refs.displayName.value + const displayName = this.$refs.displayName.value this.loading.displayName = true this.$store.dispatch('setUserData', { userid: this.user.id, key: 'displayname', - value: displayName + value: displayName, }).then(() => { this.loading.displayName = false this.$refs.displayName.value = displayName @@ -447,12 +447,12 @@ export default { * @param {string} password The email adress */ updatePassword() { - let password = this.$refs.password.value + const password = this.$refs.password.value this.loading.password = true this.$store.dispatch('setUserData', { userid: this.user.id, key: 'password', - value: password + value: password, }).then(() => { this.loading.password = false this.$refs.password.value = '' // empty & show placeholder @@ -465,12 +465,12 @@ export default { * @param {string} mailAddress The email adress */ updateEmail() { - let mailAddress = this.$refs.mailAddress.value + const mailAddress = this.$refs.mailAddress.value this.loading.mailAddress = true this.$store.dispatch('setUserData', { userid: this.user.id, key: 'email', - value: mailAddress + value: mailAddress, }).then(() => { this.loading.mailAddress = false this.$refs.mailAddress.value = mailAddress @@ -486,7 +486,7 @@ export default { this.loading = { groups: true, subadmins: true } try { await this.$store.dispatch('addGroup', gid) - let userid = this.user.id + const userid = this.user.id await this.$store.dispatch('addUserGroup', { userid, gid }) } catch (error) { console.error(error) @@ -506,8 +506,8 @@ export default { return false } this.loading.groups = true - let userid = this.user.id - let gid = group.id + const userid = this.user.id + const gid = group.id try { await this.$store.dispatch('addUserGroup', { userid, gid }) } catch (error) { @@ -528,13 +528,13 @@ export default { } this.loading.groups = true - let userid = this.user.id - let gid = group.id + const userid = this.user.id + const gid = group.id try { await this.$store.dispatch('removeUserGroup', { userid, - gid + gid, }) this.loading.groups = false // remove user from current list if current list is the removed group @@ -553,13 +553,13 @@ export default { */ async addUserSubAdmin(group) { this.loading.subadmins = true - let userid = this.user.id - let gid = group.id + const userid = this.user.id + const gid = group.id try { await this.$store.dispatch('addUserSubAdmin', { userid, - gid + gid, }) this.loading.subadmins = false } catch (error) { @@ -574,13 +574,13 @@ export default { */ async removeUserSubAdmin(group) { this.loading.subadmins = true - let userid = this.user.id - let gid = group.id + const userid = this.user.id + const gid = group.id try { await this.$store.dispatch('removeUserSubAdmin', { userid, - gid + gid, }) } catch (error) { console.error(error) @@ -604,7 +604,7 @@ export default { await this.$store.dispatch('setUserData', { userid: this.user.id, key: 'quota', - value: quota + value: quota, }) } catch (error) { console.error(error) @@ -622,7 +622,7 @@ export default { */ validateQuota(quota) { // only used for new presets sent through @Tag - let validQuota = OC.Util.computerFileSize(quota) + const validQuota = OC.Util.computerFileSize(quota) if (validQuota !== null && validQuota >= 0) { // unify format output return this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota))) @@ -644,7 +644,7 @@ export default { await this.$store.dispatch('setUserData', { userid: this.user.id, key: 'language', - value: lang.code + value: lang.code, }) } catch (error) { console.error(error) @@ -670,8 +670,8 @@ export default { } this.loading.all = false }) - } + }, - } + }, } </script> diff --git a/apps/settings/src/components/UserList/UserRowSimple.vue b/apps/settings/src/components/UserList/UserRowSimple.vue index 247bfb063cebdf0188a063bb13f8570491a9f348..008fcc557f32600f433a7231eb596dd7ca550408 100644 --- a/apps/settings/src/components/UserList/UserRowSimple.vue +++ b/apps/settings/src/components/UserList/UserRowSimple.vue @@ -81,45 +81,45 @@ export default { components: { PopoverMenu, ActionButton, - Actions + Actions, }, directives: { - ClickOutside + ClickOutside, }, mixins: [UserRowMixin], props: { user: { type: Object, - required: true + required: true, }, loading: { type: Object, - required: true + required: true, }, showConfig: { type: Object, - required: true + required: true, }, userActions: { type: Array, - required: true + required: true, }, openedMenu: { type: Boolean, - required: true + required: true, }, feedbackMessage: { type: String, - required: true + required: true, }, subAdminsGroups: { type: Array, - required: true + required: true, }, settings: { type: Object, - required: true - } + required: true, + }, }, computed: { userGroupsLabels() { @@ -140,7 +140,7 @@ export default { }, canEdit() { return getCurrentUser().uid !== this.user.id && this.user.id !== 'admin' - } + }, }, methods: { @@ -149,8 +149,8 @@ export default { }, toggleEdit() { this.$emit('update:editing', true) - } - } + }, + }, } </script> diff --git a/apps/settings/src/main-admin-security.js b/apps/settings/src/main-admin-security.js index 345d1b3407b782e6ac6b188c3c92f7e12a64c8ae..5be21450fd26555fd7faae957d196046100095b8 100644 --- a/apps/settings/src/main-admin-security.js +++ b/apps/settings/src/main-admin-security.js @@ -19,5 +19,5 @@ store.replaceState( const View = Vue.extend(AdminTwoFactor) new View({ - store + store, }).$mount('#two-factor-auth-settings') diff --git a/apps/settings/src/main-apps-users-management.js b/apps/settings/src/main-apps-users-management.js index e7d5b4e91c3fb82744e26c06028476d800ad6160..0847ed870622e29508f9c079425db7ff715d9d52 100644 --- a/apps/settings/src/main-apps-users-management.js +++ b/apps/settings/src/main-apps-users-management.js @@ -52,7 +52,7 @@ Vue.prototype.oc_userconfig = oc_userconfig const app = new Vue({ router, store, - render: h => h(App) + render: h => h(App), }).$mount('#content') export { app, router, store } diff --git a/apps/settings/src/main-personal-security.js b/apps/settings/src/main-personal-security.js index 85a88bf8f1de7ed20ee320a896cb86e16737fd10..958c9da5e39c85f810ef6ecb5d4b03777c9f1434 100644 --- a/apps/settings/src/main-personal-security.js +++ b/apps/settings/src/main-personal-security.js @@ -37,6 +37,6 @@ const View = Vue.extend(AuthTokenSection) new View({ propsData: { tokens: loadState('settings', 'app_tokens'), - canCreateToken: loadState('settings', 'can_create_app_token') - } + canCreateToken: loadState('settings', 'can_create_app_token'), + }, }).$mount('#security-authtokens') diff --git a/apps/settings/src/mixins/UserRowMixin.js b/apps/settings/src/mixins/UserRowMixin.js index ff1276fdd1599adc4ae53def8c38a284b0b82585..c997d2ea9454465fa99b9716aa9458896f113bfa 100644 --- a/apps/settings/src/mixins/UserRowMixin.js +++ b/apps/settings/src/mixins/UserRowMixin.js @@ -24,36 +24,36 @@ export default { props: { user: { type: Object, - required: true + required: true, }, settings: { type: Object, - default: () => ({}) + default: () => ({}), }, groups: { type: Array, - default: () => [] + default: () => [], }, subAdminsGroups: { type: Array, - default: () => [] + default: () => [], }, quotaOptions: { type: Array, - default: () => [] + default: () => [], }, showConfig: { type: Object, - default: () => ({}) + default: () => ({}), }, languages: { type: Array, - required: true + required: true, }, externalActions: { type: Array, - default: () => [] - } + default: () => [], + }, }, computed: { /* GROUPS MANAGEMENT */ @@ -69,7 +69,7 @@ export default { return this.groups.map((group) => { // clone object because we don't want // to edit the original groups - let groupClone = Object.assign({}, group) + const groupClone = Object.assign({}, group) // two settings here: // 1. user NOT in group but no permission to add @@ -95,7 +95,7 @@ export default { if (quota > 0) { quota = Math.min(100, Math.round(this.user.quota.used / quota * 100)) } else { - var usedInGB = this.user.quota.used / (10 * Math.pow(2, 30)) + const usedInGB = this.user.quota.used / (10 * Math.pow(2, 30)) // asymptotic curve approaching 50% at 10GB to visualize used stace with infinite quota quota = 95 * (1 - (1 / (usedInGB + 1))) } @@ -105,8 +105,8 @@ export default { userQuota() { if (this.user.quota.quota >= 0) { // if value is valid, let's map the quotaOptions or return custom quota - let humanQuota = OC.Util.humanFileSize(this.user.quota.quota) - let userQuota = this.quotaOptions.find(quota => quota.id === humanQuota) + const humanQuota = OC.Util.humanFileSize(this.user.quota.quota) + const userQuota = this.quotaOptions.find(quota => quota.id === humanQuota) return userQuota || { id: humanQuota, label: humanQuota } } else if (this.user.quota.quota === 'default') { // default quota is replaced by the proper value on load @@ -122,12 +122,12 @@ export default { /* LANGUAGE */ userLanguage() { - let availableLanguages = this.languages[0].languages.concat(this.languages[1].languages) - let userLang = availableLanguages.find(lang => lang.code === this.user.language) + const availableLanguages = this.languages[0].languages.concat(this.languages[1].languages) + const userLang = availableLanguages.find(lang => lang.code === this.user.language) if (typeof userLang !== 'object' && this.user.language !== '') { return { code: this.user.language, - name: this.user.language + name: this.user.language, } } else if (this.user.language === '') { return false @@ -147,7 +147,7 @@ export default { return OC.Util.relativeModifiedDate(this.user.lastLogin) } return t('settings', 'Never') - } + }, }, methods: { /** @@ -163,9 +163,9 @@ export default { { user: user, size: size, - version: oc_userconfig.avatar.version + version: oc_userconfig.avatar.version, } ) - } - } + }, + }, } diff --git a/apps/settings/src/router.js b/apps/settings/src/router.js index 7612fdea8953ec0b745bcf397d19c72c7e59afaf..c11c74ac163878e5dc44e019af969fdbcb4b72ba 100644 --- a/apps/settings/src/router.js +++ b/apps/settings/src/router.js @@ -55,9 +55,9 @@ export default new Router({ { path: ':selectedGroup(.*)', name: 'group', - component: Users - } - ] + component: Users, + }, + ], }, { path: '/:index(index.php/)?settings/apps', @@ -73,11 +73,11 @@ export default new Router({ { path: ':id', name: 'apps-details', - component: Apps - } - ] - } - ] - } - ] + component: Apps, + }, + ], + }, + ], + }, + ], }) diff --git a/apps/settings/src/store/admin-security.js b/apps/settings/src/store/admin-security.js index e86783557f232b128cbdef95664fa77f55bfea14..c71f40a1e857bb1edf331771306964eb8c29b5e9 100644 --- a/apps/settings/src/store/admin-security.js +++ b/apps/settings/src/store/admin-security.js @@ -27,7 +27,7 @@ Vue.use(Vuex) const state = { enforced: false, enforcedGroups: [], - excludedGroups: [] + excludedGroups: [], } const mutations = { @@ -39,11 +39,11 @@ const mutations = { }, setExcludedGroups(state, used) { Vue.set(state, 'excludedGroups', used) - } + }, } export default new Vuex.Store({ strict: process.env.NODE_ENV !== 'production', state, - mutations + mutations, }) diff --git a/apps/settings/src/store/api.js b/apps/settings/src/store/api.js index 313ef7d0d23f69333145442f7e72ed0265eef2d0..ec29c8fa87fa64e1b36caef0760e7d0618d54b00 100644 --- a/apps/settings/src/store/api.js +++ b/apps/settings/src/store/api.js @@ -77,5 +77,5 @@ export default { }, delete(url, data) { return axios.delete(sanitize(url), { data: data }) - } + }, } diff --git a/apps/settings/src/store/apps.js b/apps/settings/src/store/apps.js index 47698382904abd38776118612efbde218a7fc997..309932ada0821b8018b6190dfa811c65c27b59fa 100644 --- a/apps/settings/src/store/apps.js +++ b/apps/settings/src/store/apps.js @@ -28,7 +28,7 @@ const state = { categories: [], updateCount: 0, loading: {}, - loadingList: false + loadingList: false, } const mutations = { @@ -65,24 +65,24 @@ const mutations = { appId = [appId] } appId.forEach((_id) => { - let app = state.apps.find(app => app.id === _id) + const app = state.apps.find(app => app.id === _id) app.error = error }) }, clearError(state, { appId, error }) { - let app = state.apps.find(app => app.id === appId) + const app = state.apps.find(app => app.id === appId) app.error = null }, enableApp(state, { appId, groups }) { - let app = state.apps.find(app => app.id === appId) + const app = state.apps.find(app => app.id === appId) app.active = true app.groups = groups }, disableApp(state, appId) { - let app = state.apps.find(app => app.id === appId) + const app = state.apps.find(app => app.id === appId) app.active = false app.groups = [] if (app.removable) { @@ -100,8 +100,8 @@ const mutations = { }, updateApp(state, appId) { - let app = state.apps.find(app => app.id === appId) - let version = app.update + const app = state.apps.find(app => app.id === appId) + const version = app.update app.update = null app.version = version state.updateCount-- @@ -133,7 +133,7 @@ const mutations = { } else { Vue.set(state.loading, id, false) } - } + }, } const getters = { @@ -150,7 +150,7 @@ const getters = { }, getUpdateCount(state) { return state.updateCount - } + }, } const actions = { @@ -197,7 +197,7 @@ const actions = { if (!Array.isArray(appId)) { context.commit('setError', { appId: apps, - error: t('settings', 'Error: This app can not be enabled because it makes the server unstable') + error: t('settings', 'Error: This app can not be enabled because it makes the server unstable'), }) } }) @@ -207,7 +207,7 @@ const actions = { context.commit('stopLoading', 'install') context.commit('setError', { appId: apps, - error: error.response.data.data.message + error: error.response.data.data.message, }) context.commit('APPS_API_FAILURE', { appId, error }) }) @@ -233,7 +233,7 @@ const actions = { context.commit('stopLoading', 'install') context.commit('setError', { appId: apps, - error: error.response.data.data.message + error: error.response.data.data.message, }) context.commit('APPS_API_FAILURE', { appId, error }) }) @@ -320,7 +320,7 @@ const actions = { return false }) .catch((error) => context.commit('API_FAILURE', error)) - } + }, } diff --git a/apps/settings/src/store/index.js b/apps/settings/src/store/index.js index c640d32cd6accd678e026e1bc3051f4972386131..9f4313413ebe740ddb3595e454c1efa789f46226 100644 --- a/apps/settings/src/store/index.js +++ b/apps/settings/src/store/index.js @@ -35,13 +35,13 @@ const debug = process.env.NODE_ENV !== 'production' const mutations = { API_FAILURE(state, error) { try { - let message = error.error.response.data.ocs.meta.message + const message = error.error.response.data.ocs.meta.message OC.Notification.showHtml(t('settings', 'An error occured during the request. Unable to proceed.') + '<br>' + message, { timeout: 7 }) } catch (e) { OC.Notification.showTemporary(t('settings', 'An error occured during the request. Unable to proceed.')) } console.error(state, error) - } + }, } export default new Vuex.Store({ @@ -49,9 +49,9 @@ export default new Vuex.Store({ users, apps, settings, - oc + oc, }, strict: debug, - mutations + mutations, }) diff --git a/apps/settings/src/store/oc.js b/apps/settings/src/store/oc.js index ff14f8ae7e3914a536ad33436ae8abb1df54b116..b416d684e6379442fe494bc1c77a51355fdc82b2 100644 --- a/apps/settings/src/store/oc.js +++ b/apps/settings/src/store/oc.js @@ -41,7 +41,7 @@ const actions = { return api.post(OC.linkToOCS(`apps/provisioning_api/api/v1/config/apps/${app}/${key}`, 2), { value: value }) .catch((error) => { throw error }) }).catch((error) => context.commit('API_FAILURE', { app, key, value, error })) - } + }, } export default { state, mutations, getters, actions } diff --git a/apps/settings/src/store/settings.js b/apps/settings/src/store/settings.js index 88086910c39fad0c0ff5fb5c0740fb424619fe14..cab7a811b3302df34727aa7f336f0be464bf3703 100644 --- a/apps/settings/src/store/settings.js +++ b/apps/settings/src/store/settings.js @@ -21,17 +21,17 @@ */ const state = { - serverData: {} + serverData: {}, } const mutations = { setServerData(state, data) { state.serverData = data - } + }, } const getters = { getServerData(state) { return state.serverData - } + }, } const actions = {} diff --git a/apps/settings/src/store/users.js b/apps/settings/src/store/users.js index 981ac66373440b9b4a7fba9f435494fdae26470c..52131fbfd63781937d2c4f64527d596f0c190366 100644 --- a/apps/settings/src/store/users.js +++ b/apps/settings/src/store/users.js @@ -41,8 +41,8 @@ const defaults = { usercount: 0, disabled: 0, canAdd: true, - canRemove: true - } + canRemove: true, + }, } const state = { @@ -52,13 +52,13 @@ const state = { minPasswordLength: 0, usersOffset: 0, usersLimit: 25, - userCount: 0 + userCount: 0, } const mutations = { appendUsers(state, usersObj) { // convert obj to array - let users = state.users.concat(Object.keys(usersObj).map(userid => usersObj[userid])) + const users = state.users.concat(Object.keys(usersObj).map(userid => usersObj[userid])) state.usersOffset += state.usersLimit state.users = users }, @@ -78,9 +78,9 @@ const mutations = { return } // extend group to default values - let group = Object.assign({}, defaults.group, { + const group = Object.assign({}, defaults.group, { id: gid, - name: displayName + name: displayName, }) state.groups.push(group) state.groups = orderGroups(state.groups, state.orderBy) @@ -89,50 +89,50 @@ const mutations = { } }, removeGroup(state, gid) { - let groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid) + const groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid) if (groupIndex >= 0) { state.groups.splice(groupIndex, 1) } }, addUserGroup(state, { userid, gid }) { - let group = state.groups.find(groupSearch => groupSearch.id === gid) - let user = state.users.find(user => user.id === userid) + const group = state.groups.find(groupSearch => groupSearch.id === gid) + const user = state.users.find(user => user.id === userid) // increase count if user is enabled if (group && user.enabled && state.userCount > 0) { group.usercount++ } - let groups = user.groups + const groups = user.groups groups.push(gid) state.groups = orderGroups(state.groups, state.orderBy) }, removeUserGroup(state, { userid, gid }) { - let group = state.groups.find(groupSearch => groupSearch.id === gid) - let user = state.users.find(user => user.id === userid) + const group = state.groups.find(groupSearch => groupSearch.id === gid) + const user = state.users.find(user => user.id === userid) // lower count if user is enabled if (group && user.enabled && state.userCount > 0) { group.usercount-- } - let groups = user.groups + const groups = user.groups groups.splice(groups.indexOf(gid), 1) state.groups = orderGroups(state.groups, state.orderBy) }, addUserSubAdmin(state, { userid, gid }) { - let groups = state.users.find(user => user.id === userid).subadmin + const groups = state.users.find(user => user.id === userid).subadmin groups.push(gid) }, removeUserSubAdmin(state, { userid, gid }) { - let groups = state.users.find(user => user.id === userid).subadmin + const groups = state.users.find(user => user.id === userid).subadmin groups.splice(groups.indexOf(gid), 1) }, deleteUser(state, userid) { - let userIndex = state.users.findIndex(user => user.id === userid) + const userIndex = state.users.findIndex(user => user.id === userid) state.users.splice(userIndex, 1) }, addUserData(state, response) { state.users.push(response.data.ocs.data) }, enableDisableUser(state, { userid, enabled }) { - let user = state.users.find(user => user.id === userid) + const user = state.users.find(user => user.id === userid) user.enabled = enabled // increment or not if (state.userCount > 0) { @@ -146,7 +146,7 @@ const mutations = { }, setUserData(state, { userid, key, value }) { if (key === 'quota') { - let humanValue = OC.Util.computerFileSize(value) + const humanValue = OC.Util.computerFileSize(value) state.users.find(user => user.id === userid)[key][key] = humanValue !== null ? humanValue : value } else { state.users.find(user => user.id === userid)[key] = value @@ -160,7 +160,7 @@ const mutations = { resetUsers(state) { state.users = [] state.usersOffset = 0 - } + }, } const getters = { @@ -185,7 +185,7 @@ const getters = { }, getUserCount(state) { return state.userCount - } + }, } const actions = { @@ -229,7 +229,7 @@ const actions = { getGroups(context, { offset, limit, search }) { search = typeof search === 'string' ? search : '' - let limitParam = limit === -1 ? '' : `&limit=${limit}` + const limitParam = limit === -1 ? '' : `&limit=${limit}` return api.get(OC.linkToOCS(`cloud/groups?offset=${offset}&search=${search}${limitParam}`, 2)) .then((response) => { if (Object.keys(response.data.ocs.data.groups).length > 0) { @@ -477,7 +477,7 @@ const actions = { * @returns {Promise} */ enableDisableUser(context, { userid, enabled = true }) { - let userStatus = enabled ? 'enable' : 'disable' + const userStatus = enabled ? 'enable' : 'disable' return api.requireAdmin().then((response) => { return api.put(OC.linkToOCS(`cloud/users/${userid}/${userStatus}`, 2)) .then((response) => context.commit('enableDisableUser', { userid, enabled })) @@ -496,7 +496,7 @@ const actions = { * @returns {Promise} */ setUserData(context, { userid, key, value }) { - let allowedEmpty = ['email', 'displayname'] + const allowedEmpty = ['email', 'displayname'] if (['email', 'language', 'quota', 'displayname', 'password'].indexOf(key) !== -1) { // We allow empty email or displayname if (typeof value === 'string' @@ -528,7 +528,7 @@ const actions = { .then(response => true) .catch((error) => { throw error }) }).catch((error) => context.commit('API_FAILURE', { userid, error })) - } + }, } export default { state, mutations, getters, actions } diff --git a/apps/settings/src/views/Apps.vue b/apps/settings/src/views/Apps.vue index 2e0649f7f56555c5f350990ee3890377796301f6..74b5fbde0fa4e48901ddc913b1cae49947e3a118 100644 --- a/apps/settings/src/views/Apps.vue +++ b/apps/settings/src/views/Apps.vue @@ -45,7 +45,7 @@ import { AppNavigation, AppNavigationItem, AppSidebar, - Content + Content, } from 'nextcloud-vue' import AppList from '../components/AppList' import Vue from 'vue' @@ -63,21 +63,21 @@ export default { AppSidebar, Content, AppDetails, - AppList + AppList, }, props: { category: { type: String, - default: 'installed' + default: 'installed', }, id: { type: String, - default: '' - } + default: '', + }, }, data() { return { - searchQuery: '' + searchQuery: '', } }, computed: { @@ -111,13 +111,13 @@ export default { // Map groups categories = categories.map(category => { - let item = {} + const item = {} item.id = 'app-category-' + category.ident item.icon = 'icon-category-' + category.ident item.classes = [] // empty classes, active will be set later item.router = { // router link to name: 'apps-category', - params: { category: category.ident } + params: { category: category.ident }, } item.text = category.displayName @@ -125,27 +125,27 @@ export default { }) // Add everyone group - let defaultCategories = [ + const defaultCategories = [ { id: 'app-category-your-apps', classes: [], router: { name: 'apps' }, icon: 'icon-category-installed', - text: t('settings', 'Your apps') + text: t('settings', 'Your apps'), }, { id: 'app-category-enabled', classes: [], icon: 'icon-category-enabled', router: { name: 'apps-category', params: { category: 'enabled' } }, - text: t('settings', 'Active apps') + text: t('settings', 'Active apps'), }, { id: 'app-category-disabled', classes: [], icon: 'icon-category-disabled', router: { name: 'apps-category', params: { category: 'disabled' } }, - text: t('settings', 'Disabled apps') - } + text: t('settings', 'Disabled apps'), + }, ] if (!this.settings.appstoreEnabled) { @@ -159,7 +159,7 @@ export default { icon: 'icon-download', router: { name: 'apps-category', params: { category: 'updates' } }, text: t('settings', 'Updates'), - utils: { counter: this.$store.getters.getUpdateCount } + utils: { counter: this.$store.getters.getUpdateCount }, }) } @@ -168,13 +168,13 @@ export default { classes: [], icon: 'icon-category-app-bundles', router: { name: 'apps-category', params: { category: 'app-bundles' } }, - text: t('settings', 'App bundles') + text: t('settings', 'App bundles'), }) categories = defaultCategories.concat(categories) // Set current group as active - let activeGroup = categories.findIndex(group => group.id === 'app-category-' + this.category) + const activeGroup = categories.findIndex(group => group.id === 'app-category-' + this.category) if (activeGroup >= 0) { categories[activeGroup].classes.push('active') } else { @@ -185,17 +185,17 @@ export default { id: 'app-developer-docs', classes: [], href: this.settings.developerDocumentation, - text: t('settings', 'Developer documentation') + ' ↗' + text: t('settings', 'Developer documentation') + ' ↗', }) // Return return categories - } + }, }, watch: { category: function(val, old) { this.setSearch('') - } + }, }, beforeMount() { this.$store.dispatch('getCategories') @@ -219,9 +219,9 @@ export default { hideAppDetails() { this.$router.push({ name: 'apps-category', - params: { category: this.category } + params: { category: this.category }, }) - } - } + }, + }, } </script> diff --git a/apps/settings/src/views/Users.vue b/apps/settings/src/views/Users.vue index eb52fa4ba16f697456fa80bd79bb71dac8271e36..7954cf429058467bb0a7e2bf23ac3f3f1ecf8fe7 100644 --- a/apps/settings/src/views/Users.vue +++ b/apps/settings/src/views/Users.vue @@ -94,7 +94,7 @@ import { AppNavigationNew, AppNavigationSettings, Content, - Multiselect + Multiselect, } from 'nextcloud-vue' import UserList from '../components/UserList' @@ -110,13 +110,13 @@ export default { AppNavigationSettings, Content, UserList, - Multiselect + Multiselect, }, props: { selectedGroup: { type: String, - default: null - } + default: null, + }, }, data() { return { @@ -132,8 +132,8 @@ export default { showUserBackend: false, showLastLogin: false, showNewUserForm: false, - showLanguages: false - } + showLanguages: false, + }, } }, computed: { @@ -152,25 +152,25 @@ export default { get: function() { return this.getLocalstorage('showLanguages') }, set: function(status) { this.setLocalStorage('showLanguages', status) - } + }, }, showLastLogin: { get: function() { return this.getLocalstorage('showLastLogin') }, set: function(status) { this.setLocalStorage('showLastLogin', status) - } + }, }, showUserBackend: { get: function() { return this.getLocalstorage('showUserBackend') }, set: function(status) { this.setLocalStorage('showUserBackend', status) - } + }, }, showStoragePath: { get: function() { return this.getLocalstorage('showStoragePath') }, set: function(status) { this.setLocalStorage('showStoragePath', status) - } + }, }, userCount() { @@ -183,7 +183,7 @@ export default { // default quota quotaOptions() { // convert the preset array into objects - let quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({ id: cur, label: cur }), []) + const quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({ id: cur, label: cur }), []) // add default presets quotaPreset.unshift(this.unlimitedQuota) return quotaPreset @@ -202,20 +202,20 @@ export default { }, set: function(quota) { this.selectedQuota = quota - } + }, }, // BUILD APP NAVIGATION MENU OBJECT menu() { // Data provided php side - let self = this + const self = this let groups = this.$store.getters.getGroups groups = Array.isArray(groups) ? groups : [] // Map groups groups = groups.map(group => { - let item = {} + const item = {} item.id = group.id.replace(' ', '_') item.key = item.id item.utils = {} @@ -223,7 +223,7 @@ export default { // router link to item.router = { name: 'group', - params: { selectedGroup: group.id } + params: { selectedGroup: group.id }, } // group name @@ -242,7 +242,7 @@ export default { text: t('settings', 'Remove group'), action: function() { self.removeGroup(group.id) - } + }, }] } return item @@ -256,16 +256,16 @@ export default { realGroups = typeof realGroups === 'undefined' ? [] : realGroups realGroups = Array.isArray(realGroups) ? realGroups : [realGroups] if (realGroups.length > 0) { - let separator = { + const separator = { caption: true, - text: t('settings', 'Groups') + text: t('settings', 'Groups'), } groups.unshift(separator) } // Adjust admin and disabled groups - let adminGroup = groups.find(group => group.id === 'admin') - let disabledGroup = groups.find(group => group.id === 'disabled') + const adminGroup = groups.find(group => group.id === 'admin') + const disabledGroup = groups.find(group => group.id === 'disabled') // filter out admin and disabled groups = groups.filter(group => ['admin', 'disabled'].indexOf(group.id) === -1) @@ -291,27 +291,27 @@ export default { } // Add everyone group - let everyoneGroup = { + const everyoneGroup = { id: 'everyone', key: 'everyone', icon: 'icon-contacts-dark', router: { name: 'users' }, - text: t('settings', 'Everyone') + text: t('settings', 'Everyone'), } // users count if (this.userCount > 0) { Vue.set(everyoneGroup, 'utils', { - counter: this.userCount + counter: this.userCount, }) } groups.unshift(everyoneGroup) - let addGroup = { + const addGroup = { id: 'addgroup', key: 'addgroup', icon: 'icon-add', text: t('settings', 'Add group'), - classes: this.loadingAddGroup ? 'icon-loading-small' : '' + classes: this.loadingAddGroup ? 'icon-loading-small' : '', } if (this.showAddGroupEntry) { Vue.set(addGroup, 'edit', { @@ -319,7 +319,7 @@ export default { action: this.createGroup, reset: function() { self.showAddGroupEntry = false - } + }, }) addGroup.classes = 'editing' } else { @@ -334,13 +334,13 @@ export default { groups.unshift(addGroup) return groups - } + }, }, beforeMount() { this.$store.commit('initGroups', { groups: this.$store.getters.getServerData.groups, orderBy: this.$store.getters.getServerData.sortGroups, - userCount: this.$store.getters.getServerData.userCount + userCount: this.$store.getters.getServerData.userCount, }) this.$store.dispatch('getPasswordPolicyMinLength') }, @@ -350,9 +350,9 @@ export default { Object.assign(OCA, { Settings: { UserList: { - registerAction: this.registerAction - } - } + registerAction: this.registerAction, + }, + }, }) }, methods: { @@ -366,7 +366,7 @@ export default { }, getLocalstorage(key) { // force initialization - let localConfig = this.$localStorage.get(key) + const localConfig = this.$localStorage.get(key) // if localstorage is null, fallback to original values this.showConfig[key] = localConfig !== null ? localConfig === 'true' : this.showConfig[key] return this.showConfig[key] @@ -377,7 +377,7 @@ export default { return status }, removeGroup(groupid) { - let self = this + 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 }), @@ -400,7 +400,7 @@ export default { app: 'files', key: 'default_quota', // ensure we only send the preset id - value: quota.id ? quota.id : quota + value: quota.id ? quota.id : quota, }).then(() => { if (typeof quota !== 'object') { quota = { id: quota, label: quota } @@ -417,7 +417,7 @@ export default { */ validateQuota(quota) { // only used for new presets sent through @Tag - let validQuota = OC.Util.computerFileSize(quota) + const validQuota = OC.Util.computerFileSize(quota) if (validQuota === null) { return this.setDefaultQuota('none') } else { @@ -438,7 +438,7 @@ export default { this.externalActions.push({ icon: icon, text: text, - action: action + action: action, }) return this.externalActions }, @@ -449,7 +449,7 @@ export default { * @param {Object} event The form submit event */ createGroup(event) { - let gid = event.target[0].value + const gid = event.target[0].value this.loadingAddGroup = true this.$store.dispatch('addGroup', gid) .then(() => { @@ -458,14 +458,14 @@ export default { this.$router.push({ name: 'group', params: { - selectedGroup: gid - } + selectedGroup: gid, + }, }) }) .catch(() => { this.loadingAddGroup = false }) - } - } + }, + }, } </script> diff --git a/apps/systemtags/js/systemtags.js.map b/apps/systemtags/js/systemtags.js.map index 64c80070afe65f4de5af420484b96d249ccb7b67..d0f781c0281d989cd9ce33b8bb90446cbfbfd46f 100644 Binary files a/apps/systemtags/js/systemtags.js.map and b/apps/systemtags/js/systemtags.js.map differ diff --git a/apps/systemtags/src/app.js b/apps/systemtags/src/app.js index ee836907b0ddbc7f1ca2d1dd4bdb303e2dae127d..e28bfbf8a2f27aea21bed067370cb01d0441b5cd 100644 --- a/apps/systemtags/src/app.js +++ b/apps/systemtags/src/app.js @@ -33,7 +33,7 @@ // so it should be marked as "shown" like it would have been // done if handling the event with the file list already // created. - shown: true + shown: true, } ) @@ -49,7 +49,7 @@ _createFileActions: function() { // inherit file actions from the files app - var fileActions = new OCA.Files.FileActions() + const fileActions = new OCA.Files.FileActions() // note: not merging the legacy actions because legacy apps are not // compatible with the sharing overview and need to be adapted first fileActions.registerDefaultActions() @@ -97,7 +97,7 @@ this.removeFileList() this._fileList = null delete this._globalActionsInitialized - } + }, } })() diff --git a/apps/systemtags/src/filesplugin.js b/apps/systemtags/src/filesplugin.js index ec2734fa9725fafeb6db8e0bf77f3bba798afe85..41f95e65c9e17663709bf3bb452863d162966217 100644 --- a/apps/systemtags/src/filesplugin.js +++ b/apps/systemtags/src/filesplugin.js @@ -23,7 +23,7 @@ OCA.SystemTags.FilesPlugin = { ignoreLists: [ 'trashbin', - 'files.public' + 'files.public', ], attach: function(fileList) { @@ -31,14 +31,14 @@ return } - var systemTagsInfoView = new OCA.SystemTags.SystemTagsInfoView() + const systemTagsInfoView = new OCA.SystemTags.SystemTagsInfoView() fileList.registerDetailView(systemTagsInfoView) _.each(fileList.getRegisteredDetailViews(), function(detailView) { if (detailView instanceof OCA.Files.MainFileInfoDetailView) { - var systemTagsInfoViewToggleView + const systemTagsInfoViewToggleView = new OCA.SystemTags.SystemTagsInfoViewToggleView({ - systemTagsInfoView: systemTagsInfoView + systemTagsInfoView: systemTagsInfoView, }) systemTagsInfoViewToggleView.render() @@ -54,7 +54,7 @@ } }) - } + }, } })() diff --git a/apps/systemtags/src/systemtagsfilelist.js b/apps/systemtags/src/systemtagsfilelist.js index 373ab650b9ebfd52a4fed190fc9928983b13e362..24f731143c6428d4cd8b9c1ca97c1d7e3c168884 100644 --- a/apps/systemtags/src/systemtagsfilelist.js +++ b/apps/systemtags/src/systemtagsfilelist.js @@ -20,7 +20,7 @@ * @param {Array.<string>} [options.systemTagIds] array of system tag ids to * filter by */ - var FileList = function($el, options) { + const FileList = function($el, options) { this.initialize($el, options) } FileList.prototype = _.extend( @@ -60,7 +60,7 @@ OC.Plugins.attach('OCA.SystemTags.FileList', this) - var $controls = this.$el.find('#controls').empty() + const $controls = this.$el.find('#controls').empty() _.defer(_.bind(this._getLastUsedTags, this)) this._initFilterField($controls) @@ -73,18 +73,18 @@ }, _getLastUsedTags: function() { - var self = this + const self = this $.ajax({ type: 'GET', url: OC.generateUrl('/apps/systemtags/lastused'), success: function(response) { self._lastUsedTags = response - } + }, }) }, _initFilterField: function($container) { - var self = this + const self = this this.$filterField = $('<input type="hidden" name="tags"/>') $container.append(this.$filterField) this.$filterField.select2({ @@ -100,17 +100,17 @@ }, initSelection: function(element, callback) { - var val = $(element) + const val = $(element) .val() .trim() if (val) { - var tagIds = val.split(',') - var tags = [] + const tagIds = val.split(',') + const tags = [] OC.SystemTags.collection.fetch({ success: function() { _.each(tagIds, function(tagId) { - var tag = OC.SystemTags.collection.get( + const tag = OC.SystemTags.collection.get( tagId ) if (!_.isUndefined(tag)) { @@ -119,7 +119,7 @@ }) callback(tags) - } + }, }) } else { // eslint-disable-next-line standard/no-callback-literal @@ -138,8 +138,8 @@ sortResults: function(results) { results.sort(function(a, b) { - var aLastUsed = self._lastUsedTags.indexOf(a.id) - var bLastUsed = self._lastUsedTags.indexOf(b.id) + const aLastUsed = self._lastUsedTags.indexOf(a.id) + const bLastUsed = self._lastUsedTags.indexOf(b.id) if (aLastUsed !== bLastUsed) { if (bLastUsed === -1) { @@ -163,7 +163,7 @@ }, formatNoMatches: function() { return t('systemtags', 'No tags found') - } + }, }) this.$filterField.on( 'change', @@ -180,14 +180,14 @@ _queryTagsAutocomplete: function(query) { OC.SystemTags.collection.fetch({ success: function() { - var results = OC.SystemTags.collection.filterByName( + const results = OC.SystemTags.collection.filterByName( query.term ) query.callback({ - results: _.invoke(results, 'toJSON') + results: _.invoke(results, 'toJSON'), }) - } + }, }) }, @@ -198,7 +198,7 @@ */ _onUrlChanged: function(e) { if (e.dir) { - var tags = _.filter(e.dir.split('/'), function(val) { + const tags = _.filter(e.dir.split('/'), function(val) { return val.trim() !== '' }) this.$filterField.select2('val', tags || []) @@ -208,7 +208,7 @@ }, _onTagsChanged: function(ev) { - var val = $(ev.target) + const val = $(ev.target) .val() .trim() if (val !== '') { @@ -219,14 +219,14 @@ this.$el.trigger( $.Event('changeDirectory', { - dir: this._systemTagIds.join('/') + dir: this._systemTagIds.join('/'), }) ) this.reload() }, updateEmptyContent: function() { - var dir = this.getCurrentDirectory() + const dir = this.getCurrentDirectory() if (dir === '/') { // root has special permissions if (!this._systemTagIds.length) { @@ -300,17 +300,17 @@ this.showMask() this._reloadCall = this.filesClient.getFilteredFiles( { - systemTagIds: this._systemTagIds + systemTagIds: this._systemTagIds, }, { - properties: this._getWebdavProperties() + properties: this._getWebdavProperties(), } ) if (this._detailsView) { // close sidebar this._updateDetailsView(null) } - var callBack = this.reloadCallback.bind(this) + const callBack = this.reloadCallback.bind(this) return this._reloadCall.then(callBack, callBack) }, @@ -325,7 +325,7 @@ status, result ) - } + }, } ) diff --git a/apps/systemtags/src/systemtagsinfoview.js b/apps/systemtags/src/systemtagsinfoview.js index d5b8b2f27209df995f893bac1f05467a71fa180b..1da346882b36f8c6a083e7dbc3bff861a324b64c 100644 --- a/apps/systemtags/src/systemtagsinfoview.js +++ b/apps/systemtags/src/systemtagsinfoview.js @@ -11,7 +11,7 @@ (function(OCA) { function modelToSelection(model) { - var data = model.toJSON() + const data = model.toJSON() if (!OC.isUserAdmin() && !data.canAssign) { data.locked = true } @@ -25,7 +25,7 @@ * Displays a file's system tags * */ - var SystemTagsInfoView = OCA.Files.DetailFileInfoView.extend( + const SystemTagsInfoView = OCA.Files.DetailFileInfoView.extend( /** @lends OCA.SystemTags.SystemTagsInfoView.prototype */ { _rendered: false, @@ -39,7 +39,7 @@ _inputView: null, initialize: function(options) { - var self = this + const self = this options = options || {} this._inputView = new OC.SystemTags.SystemTagsInputField({ @@ -49,7 +49,7 @@ isAdmin: OC.isUserAdmin(), initSelection: function(element, callback) { callback(self.selectedTagsCollection.map(modelToSelection)) - } + }, }) this.selectedTagsCollection = new OC.SystemTags.SystemTagsMappingCollection([], { objectType: 'files' }) @@ -90,7 +90,7 @@ */ _onTagRenamedGlobally: function(changedTag) { // also rename it in the selection, if applicable - var selectedTagMapping = this.selectedTagsCollection.get(changedTag.id) + const selectedTagMapping = this.selectedTagsCollection.get(changedTag.id) if (selectedTagMapping) { selectedTagMapping.set(changedTag.toJSON()) } @@ -110,7 +110,7 @@ }, setFileInfo: function(fileInfo) { - var self = this + const self = this if (!this._rendered) { this.render() } @@ -121,11 +121,11 @@ success: function(collection) { collection.fetched = true - var appliedTags = collection.map(modelToSelection) + const appliedTags = collection.map(modelToSelection) self._inputView.setData(appliedTags) self.show() - } + }, }) } @@ -158,7 +158,7 @@ remove: function() { this._inputView.remove() - } + }, }) OCA.SystemTags.SystemTagsInfoView = SystemTagsInfoView diff --git a/apps/systemtags/src/systemtagsinfoviewtoggleview.js b/apps/systemtags/src/systemtagsinfoviewtoggleview.js index 1d10ebf67da5b07ab4975c7293155013fe9d67f4..d0c35550e5dabe088978312ffa93101a7ba21927 100644 --- a/apps/systemtags/src/systemtagsinfoviewtoggleview.js +++ b/apps/systemtags/src/systemtagsinfoviewtoggleview.js @@ -29,7 +29,7 @@ * * This toggle view must be explicitly rendered before it is used. */ - var SystemTagsInfoViewToggleView = OC.Backbone.View.extend( + const SystemTagsInfoViewToggleView = OC.Backbone.View.extend( /** @lends OC.Backbone.View.prototype */ { tagName: 'span', @@ -37,7 +37,7 @@ className: 'tag-label', events: { - 'click': 'click' + 'click': 'click', }, /** @@ -88,7 +88,7 @@ this.$el.html(this.template()) return this - } + }, }) diff --git a/apps/twofactor_backupcodes/js/settings.js b/apps/twofactor_backupcodes/js/settings.js index d5c266ada3b85f1c3739f278ab6101d3ace58171..ea00b3f9e0a75a9fdf3f32fa48486a1dc09025a6 100644 Binary files a/apps/twofactor_backupcodes/js/settings.js and b/apps/twofactor_backupcodes/js/settings.js differ diff --git a/apps/twofactor_backupcodes/js/settings.js.map b/apps/twofactor_backupcodes/js/settings.js.map index ac4b8163acd74b7795b5f8e0b4ede17308e3b00d..501f532fb4b51d759a5c1deffc6f439fd6324f5e 100644 Binary files a/apps/twofactor_backupcodes/js/settings.js.map and b/apps/twofactor_backupcodes/js/settings.js.map differ diff --git a/apps/twofactor_backupcodes/src/settings.js b/apps/twofactor_backupcodes/src/settings.js index 32eb37fa91a37ee00e17a22d0282907f564e0e0a..12f118ae0075516d5742d5d86862b093b3b76952 100644 --- a/apps/twofactor_backupcodes/src/settings.js +++ b/apps/twofactor_backupcodes/src/settings.js @@ -11,5 +11,5 @@ store.replaceState(initialState) const View = Vue.extend(PersonalSettings) new View({ - store + store, }).$mount('#twofactor-backupcodes-settings') diff --git a/apps/twofactor_backupcodes/src/store.js b/apps/twofactor_backupcodes/src/store.js index 18f2d26bc18c69dd14d4da79259200a0fb9f9f23..99c327ec362dc94af0e0755212e8bad0586f9278 100644 --- a/apps/twofactor_backupcodes/src/store.js +++ b/apps/twofactor_backupcodes/src/store.js @@ -29,7 +29,7 @@ const state = { enabled: false, total: 0, used: 0, - codes: [] + codes: [], } const mutations = { @@ -44,7 +44,7 @@ const mutations = { }, setCodes(state, codes) { Vue.set(state, 'codes', codes) - } + }, } const actions = { @@ -58,12 +58,12 @@ const actions = { commit('setCodes', codes) return true }) - } + }, } export default new Vuex.Store({ strict: process.env.NODE_ENV !== 'production', state, mutations, - actions + actions, }) diff --git a/apps/twofactor_backupcodes/src/views/PersonalSettings.vue b/apps/twofactor_backupcodes/src/views/PersonalSettings.vue index d05e8b360afb377e67fa793014b00178d08d4db4..fa03aae2f13171018fbef3f30070bc7f5e07494b 100644 --- a/apps/twofactor_backupcodes/src/views/PersonalSettings.vue +++ b/apps/twofactor_backupcodes/src/views/PersonalSettings.vue @@ -50,7 +50,7 @@ export default { name: 'PersonalSettings', data() { return { - generatingCodes: false + generatingCodes: false, } }, computed: { @@ -83,7 +83,7 @@ export default { }, haveCodes() { return this.codes && this.codes.length > 0 - } + }, }, methods: { generateBackupCodes: function() { @@ -112,8 +112,8 @@ export default { printCodes: function() { print(this.getPrintData(this.codes)) - } - } + }, + }, } </script> diff --git a/apps/updatenotification/js/updatenotification.js b/apps/updatenotification/js/updatenotification.js index 878623b1fd109884478802ee022f154625b74b64..7b24b53f5b097324a4e9d384422d6fd73c6a8646 100644 Binary files a/apps/updatenotification/js/updatenotification.js and b/apps/updatenotification/js/updatenotification.js differ diff --git a/apps/updatenotification/js/updatenotification.js.map b/apps/updatenotification/js/updatenotification.js.map index 6ab88d6400043e0bc918cb561c6903425c72cc51..e04c827cf489e4df57d56d655b98115871ae46e7 100644 Binary files a/apps/updatenotification/js/updatenotification.js.map and b/apps/updatenotification/js/updatenotification.js.map differ diff --git a/apps/updatenotification/src/components/UpdateNotification.vue b/apps/updatenotification/src/components/UpdateNotification.vue index 6d726b46d491e87a2fb8411a39d0c59d86459709..3b8a473ae2e45de4baac16a87ae0939ec4587508 100644 --- a/apps/updatenotification/src/components/UpdateNotification.vue +++ b/apps/updatenotification/src/components/UpdateNotification.vue @@ -119,11 +119,11 @@ export default { name: 'UpdateNotification', components: { Multiselect, - PopoverMenu + PopoverMenu, }, directives: { ClickOutside, - tooltip: VTooltip + tooltip: VTooltip, }, data: function() { return { @@ -153,7 +153,7 @@ export default { hideMissingUpdates: false, hideAvailableUpdates: true, openedWhatsNew: false, - openedUpdateChannelMenu: false + openedUpdateChannelMenu: false, } }, @@ -163,13 +163,13 @@ export default { computed: { newVersionAvailableString: function() { return t('updatenotification', 'A new version is available: <strong>{newVersionString}</strong>', { - newVersionString: this.newVersionString + newVersionString: this.newVersionString, }) }, lastCheckedOnString: function() { return t('updatenotification', 'Checked on {lastCheckedDate}', { - lastCheckedDate: this.lastCheckedDate + lastCheckedDate: this.lastCheckedDate, }) }, @@ -195,8 +195,8 @@ export default { if (this.whatsNewData.length === 0) { return null } - var whatsNew = [] - for (var i in this.whatsNewData) { + const whatsNew = [] + for (const i in this.whatsNewData) { whatsNew[i] = { icon: 'icon-checkmark', longtext: this.whatsNewData[i] } } if (this.changelogURL) { @@ -205,14 +205,14 @@ export default { text: t('updatenotification', 'View changelog'), icon: 'icon-link', target: '_blank', - action: '' + action: '', }) } return whatsNew }, channelList: function() { - let channelList = [] + const channelList = [] channelList.push({ text: t('updatenotification', 'Enterprise'), @@ -220,7 +220,7 @@ export default { icon: 'icon-star', active: this.currentChannel === 'enterprise', disabled: !this.hasValidSubscription, - action: this.changeReleaseChannelToEnterprise + action: this.changeReleaseChannelToEnterprise, }) channelList.push({ @@ -228,7 +228,7 @@ export default { longtext: t('updatenotification', 'The most recent stable version. It is suited for regular use and will always update to the latest major version.'), icon: 'icon-checkmark', active: this.currentChannel === 'stable', - action: this.changeReleaseChannelToStable + action: this.changeReleaseChannelToStable, }) channelList.push({ @@ -236,14 +236,14 @@ export default { longtext: t('updatenotification', 'A pre-release version only for testing new features, not for production environments.'), icon: 'icon-category-customization', active: this.currentChannel === 'beta', - action: this.changeReleaseChannelToBeta + action: this.changeReleaseChannelToBeta, }) if (this.isNonDefaultChannel) { channelList.push({ text: this.currentChannel, icon: 'icon-rename', - active: true + active: true, }) } @@ -265,7 +265,7 @@ export default { default: return this.currentChannel } - } + }, }, watch: { @@ -274,7 +274,7 @@ export default { return } - var selectedGroups = [] + const selectedGroups = [] _.each(selectedOptions, function(group) { selectedGroups.push(group.value) }) @@ -304,13 +304,13 @@ export default { this.appStoreDisabled = xhr.responseJSON.ocs.data.appstore_disabled this.isListFetched = true this.appStoreFailed = true - }.bind(this) + }.bind(this), }) - } + }, }, beforeMount: function() { // Parse server data - var data = JSON.parse($('#updatenotification').attr('data-json')) + const data = JSON.parse($('#updatenotification').attr('data-json')) this.newVersion = data.newVersion this.newVersionString = data.newVersionString @@ -347,14 +347,14 @@ export default { url: OC.linkToOCS('cloud', 2) + '/groups', dataType: 'json', success: function(data) { - var results = [] + const results = [] $.each(data.ocs.data.groups, function(i, group) { results.push({ value: group, label: group }) }) this.availableGroups = results this.enableChangeWatcher = true - }.bind(this) + }.bind(this), }) }, @@ -364,14 +364,14 @@ export default { */ clickUpdaterButton: function() { $.ajax({ - url: OC.generateUrl('/apps/updatenotification/credentials') + url: OC.generateUrl('/apps/updatenotification/credentials'), }).success(function(token) { // create a form to send a proper post request to the updater - var form = document.createElement('form') + const form = document.createElement('form') form.setAttribute('method', 'post') form.setAttribute('action', OC.getRootPath() + '/updater/') - var hiddenField = document.createElement('input') + const hiddenField = document.createElement('input') hiddenField.setAttribute('type', 'hidden') hiddenField.setAttribute('name', 'updater-secret-input') hiddenField.setAttribute('value', token) @@ -398,11 +398,11 @@ export default { url: OC.generateUrl('/apps/updatenotification/channel'), type: 'POST', data: { - 'channel': this.currentChannel + 'channel': this.currentChannel, }, success: function(data) { OC.msg.finishedAction('#channel_save_msg', data) - } + }, }) this.openedUpdateChannelMenu = false @@ -421,8 +421,8 @@ export default { }, hideMenu: function() { this.openedWhatsNew = false - } - } + }, + }, } </script> diff --git a/apps/updatenotification/src/init.js b/apps/updatenotification/src/init.js index 19782799db2d291f3d2a676ab0dbcbfe131e6b6b..6f13913b8c8fdd3fb59edad3d8876ed2f309cb3d 100644 --- a/apps/updatenotification/src/init.js +++ b/apps/updatenotification/src/init.js @@ -28,12 +28,12 @@ Vue.mixin({ }, n: function(app, textSingular, textPlural, count, vars, options) { return OC.L10N.translatePlural(app, textSingular, textPlural, count, vars, options) - } - } + }, + }, }) // eslint-disable-next-line no-new new Vue({ el: '#updatenotification', - render: h => h(Root) + render: h => h(Root), }) diff --git a/apps/workflowengine/js/workflowengine.js b/apps/workflowengine/js/workflowengine.js index 45cfbf6ea50f0da8845d0a2f9f7b6fd6b338d677..3d88ee9baf8536c4de0d3bd460c2577a003a4f3a 100644 Binary files a/apps/workflowengine/js/workflowengine.js and b/apps/workflowengine/js/workflowengine.js differ diff --git a/apps/workflowengine/js/workflowengine.js.map b/apps/workflowengine/js/workflowengine.js.map index a4bce3bd57b43cffa336aaca99651d05b365fe28..23758b28e7e4050feebfc37bb173b500c37d8e08 100644 Binary files a/apps/workflowengine/js/workflowengine.js.map and b/apps/workflowengine/js/workflowengine.js.map differ diff --git a/apps/workflowengine/src/components/Check.vue b/apps/workflowengine/src/components/Check.vue index a553e1cf2ce92eb53b840d1078e4d80d20952f42..e77b9a0646fd23d64a643496a06e3f97238362b2 100644 --- a/apps/workflowengine/src/components/Check.vue +++ b/apps/workflowengine/src/components/Check.vue @@ -51,20 +51,20 @@ export default { components: { ActionButton, Actions, - Multiselect + Multiselect, }, directives: { - ClickOutside + ClickOutside, }, props: { check: { type: Object, - required: true + required: true, }, rule: { type: Object, - required: true - } + required: true, + }, }, data() { return { @@ -72,7 +72,7 @@ export default { currentOption: null, currentOperator: null, options: [], - valid: true + valid: true, } }, computed: { @@ -92,12 +92,12 @@ export default { return this.currentOption.placeholder(this.check) } return '' - } + }, }, watch: { 'check.operator': function() { this.validate() - } + }, }, mounted() { this.options = Object.values(this.checks) @@ -127,8 +127,8 @@ export default { this.check.invalid = !this.validate() this.$emit('update', this.check) - } - } + }, + }, } </script> diff --git a/apps/workflowengine/src/components/Checks/FileMimeType.vue b/apps/workflowengine/src/components/Checks/FileMimeType.vue index e91636f5130a0a54da5d881f435627aea5dcd697..a9577c097de30d229f60ab8dfcf1209147755df3 100644 --- a/apps/workflowengine/src/components/Checks/FileMimeType.vue +++ b/apps/workflowengine/src/components/Checks/FileMimeType.vue @@ -57,10 +57,10 @@ import valueMixin from './../../mixins/valueMixin' export default { name: 'FileMimeType', components: { - Multiselect + Multiselect, }, mixins: [ - valueMixin + valueMixin, ], data() { return { @@ -68,19 +68,19 @@ export default { { icon: 'icon-picture', label: t('workflowengine', 'Images'), - pattern: '/image\\/.*/' + pattern: '/image\\/.*/', }, { iconUrl: OC.imagePath('core', 'filetypes/x-office-document'), label: t('workflowengine', 'Office documents'), - pattern: '/(vnd\\.(ms-|openxmlformats-).*))$/' + pattern: '/(vnd\\.(ms-|openxmlformats-).*))$/', }, { iconUrl: OC.imagePath('core', 'filetypes/application-pdf'), label: t('workflowengine', 'PDF documents'), - pattern: 'application/pdf' - } - ] + pattern: 'application/pdf', + }, + ], } }, computed: { @@ -98,7 +98,7 @@ export default { return { icon: 'icon-settings-dark', label: t('workflowengine', 'Custom mimetype'), - pattern: '' + pattern: '', } }, currentValue() { @@ -109,14 +109,14 @@ export default { return { icon: 'icon-settings-dark', label: t('workflowengine', 'Custom mimetype'), - pattern: this.newValue + pattern: this.newValue, } - } + }, }, methods: { validateRegex(string) { - var regexRegex = /^\/(.*)\/([gui]{0,3})$/ - var result = regexRegex.exec(string) + const regexRegex = /^\/(.*)\/([gui]{0,3})$/ + const result = regexRegex.exec(string) return result !== null }, setValue(value) { @@ -129,8 +129,8 @@ export default { updateCustom(event) { this.newValue = event.target.value this.$emit('input', this.newValue) - } - } + }, + }, } </script> <style scoped> diff --git a/apps/workflowengine/src/components/Checks/FileSystemTag.vue b/apps/workflowengine/src/components/Checks/FileSystemTag.vue index 268f8c4e33fe7e572471e1f49d8eb020b7fbfbe4..828423736a4baa8308230096ce4f70f1d7ce6f58 100644 --- a/apps/workflowengine/src/components/Checks/FileSystemTag.vue +++ b/apps/workflowengine/src/components/Checks/FileSystemTag.vue @@ -33,23 +33,23 @@ import { MultiselectTag } from './MultiselectTag' export default { name: 'FileSystemTag', components: { - MultiselectTag + MultiselectTag, }, props: { value: { type: String, - default: '' - } + default: '', + }, }, data() { return { - newValue: [] + newValue: [], } }, watch: { value() { this.updateValue() - } + }, }, beforeMount() { this.updateValue() @@ -64,8 +64,8 @@ export default { }, update() { this.$emit('input', this.newValue || '') - } - } + }, + }, } </script> diff --git a/apps/workflowengine/src/components/Checks/MultiselectTag/MultiselectTag.vue b/apps/workflowengine/src/components/Checks/MultiselectTag/MultiselectTag.vue index 804025dc0e5c49ce92602ae04935df92bb5ed4f1..a95bf207724b9d42c7152c01179d477e025edf65 100644 --- a/apps/workflowengine/src/components/Checks/MultiselectTag/MultiselectTag.vue +++ b/apps/workflowengine/src/components/Checks/MultiselectTag/MultiselectTag.vue @@ -48,41 +48,41 @@ let uuid = 0 export default { name: 'MultiselectTag', components: { - Multiselect + Multiselect, }, props: { label: { type: String, - required: true + required: true, }, value: { type: [String, Array], - default: null + default: null, }, disabled: { type: Boolean, - default: false + default: false, }, multiple: { type: Boolean, - default: false - } + default: false, + }, }, data() { return { inputValObjects: [], - tags: [] + tags: [], } }, computed: { id() { return 'settings-input-text-' + this.uuid - } + }, }, watch: { value(newVal) { this.inputValObjects = this.getValueObject() - } + }, }, beforeCreate: function() { this.uuid = uuid.toString() @@ -124,7 +124,7 @@ export default { return t('systemtags', '%s (restricted)').replace('%s', displayName) } return displayName - } - } + }, + }, } </script> diff --git a/apps/workflowengine/src/components/Checks/MultiselectTag/api.js b/apps/workflowengine/src/components/Checks/MultiselectTag/api.js index 363acb652a116cbbf73591b73b682ca677235939..9e296944961b99fa08e9fc20e61df47613357a90 100644 --- a/apps/workflowengine/src/components/Checks/MultiselectTag/api.js +++ b/apps/workflowengine/src/components/Checks/MultiselectTag/api.js @@ -46,7 +46,7 @@ const xmlToJson = (xml) => { obj[nodeName] = xmlToJson(item) } else { if (typeof obj[nodeName].push === 'undefined') { - var old = obj[nodeName] + const old = obj[nodeName] obj[nodeName] = [] obj[nodeName].push(old) } @@ -82,7 +82,7 @@ const xmlToTagList = (xml) => { displayName: tag['d:prop']['oc:display-name']['#text'], canAssign: tag['d:prop']['oc:can-assign']['#text'] === 'true', userAssignable: tag['d:prop']['oc:user-assignable']['#text'] === 'true', - userVisible: tag['d:prop']['oc:user-visible']['#text'] === 'true' + userVisible: tag['d:prop']['oc:user-visible']['#text'] === 'true', }) } return result @@ -101,12 +101,12 @@ const searchTags = function() { <oc:user-assignable /> <oc:can-assign /> </d:prop> - </d:propfind>` + </d:propfind>`, }).then((response) => { return xmlToTagList(response.data) }) } export { - searchTags + searchTags, } diff --git a/apps/workflowengine/src/components/Checks/RequestTime.vue b/apps/workflowengine/src/components/Checks/RequestTime.vue index 26a4907fd1844037e3ef1f8052d792ac7da3efb6..df859c0186626986f0c21687f1c55395e8f01e32 100644 --- a/apps/workflowengine/src/components/Checks/RequestTime.vue +++ b/apps/workflowengine/src/components/Checks/RequestTime.vue @@ -28,16 +28,16 @@ const zones = moment.tz.names() export default { name: 'RequestTime', components: { - Multiselect + Multiselect, }, mixins: [ - valueMixin + valueMixin, ], props: { value: { type: String, - default: '' - } + default: '', + }, }, data() { return { @@ -46,8 +46,8 @@ export default { newValue: { startTime: null, endTime: null, - timezone: moment.tz.guess() - } + timezone: moment.tz.guess(), + }, } }, methods: { @@ -58,7 +58,7 @@ export default { this.newValue = { startTime: data[0].split(' ', 2)[0], endTime: data[1].split(' ', 2)[0], - timezone: data[0].split(' ', 2)[1] + timezone: data[0].split(' ', 2)[1], } } } catch (e) { @@ -78,8 +78,8 @@ export default { } else { this.valid = false } - } - } + }, + }, } </script> diff --git a/apps/workflowengine/src/components/Checks/RequestURL.vue b/apps/workflowengine/src/components/Checks/RequestURL.vue index f63f7d29114e08cb3b1f2877f764595321aea503..8685b051ff696fc05a05684e82186d8a16b35520 100644 --- a/apps/workflowengine/src/components/Checks/RequestURL.vue +++ b/apps/workflowengine/src/components/Checks/RequestURL.vue @@ -57,10 +57,10 @@ import valueMixin from '../../mixins/valueMixin' export default { name: 'RequestURL', components: { - Multiselect + Multiselect, }, mixins: [ - valueMixin + valueMixin, ], data() { return { @@ -69,10 +69,10 @@ export default { { label: t('workflowengine', 'Predefined URLs'), children: [ - { pattern: 'webdav', label: t('workflowengine', 'Files WebDAV') } - ] - } - ] + { pattern: 'webdav', label: t('workflowengine', 'Files WebDAV') }, + ], + }, + ], } }, computed: { @@ -101,9 +101,9 @@ export default { { icon: 'icon-settings-dark', label: t('workflowengine', 'Custom URL'), - pattern: '' - } - ] + pattern: '', + }, + ], } }, currentValue() { @@ -113,14 +113,14 @@ export default { return { icon: 'icon-settings-dark', label: t('workflowengine', 'Custom URL'), - pattern: this.newValue + pattern: this.newValue, } - } + }, }, methods: { validateRegex(string) { - var regexRegex = /^\/(.*)\/([gui]{0,3})$/ - var result = regexRegex.exec(string) + const regexRegex = /^\/(.*)\/([gui]{0,3})$/ + const result = regexRegex.exec(string) return result !== null }, setValue(value) { @@ -133,8 +133,8 @@ export default { updateCustom(event) { this.newValue = event.target.value this.$emit('input', this.newValue) - } - } + }, + }, } </script> <style scoped> diff --git a/apps/workflowengine/src/components/Checks/RequestUserAgent.vue b/apps/workflowengine/src/components/Checks/RequestUserAgent.vue index 4e0edb6bf49e2718e2bb8bf97f6dd2b4a1872850..d762443f6b83ac06866076816ff9a492485843db 100644 --- a/apps/workflowengine/src/components/Checks/RequestUserAgent.vue +++ b/apps/workflowengine/src/components/Checks/RequestUserAgent.vue @@ -59,10 +59,10 @@ import valueMixin from '../../mixins/valueMixin' export default { name: 'RequestUserAgent', components: { - Multiselect + Multiselect, }, mixins: [ - valueMixin + valueMixin, ], data() { return { @@ -71,8 +71,8 @@ export default { { pattern: 'android', label: t('workflowengine', 'Android client'), icon: 'icon-phone' }, { pattern: 'ios', label: t('workflowengine', 'iOS client'), icon: 'icon-phone' }, { pattern: 'desktop', label: t('workflowengine', 'Desktop client'), icon: 'icon-desktop' }, - { pattern: 'mail', label: t('workflowengine', 'Thunderbird & Outlook addons'), icon: 'icon-mail' } - ] + { pattern: 'mail', label: t('workflowengine', 'Thunderbird & Outlook addons'), icon: 'icon-mail' }, + ], } }, computed: { @@ -90,7 +90,7 @@ export default { return { icon: 'icon-settings-dark', label: t('workflowengine', 'Custom user agent'), - pattern: '' + pattern: '', } }, currentValue() { @@ -100,9 +100,9 @@ export default { return { icon: 'icon-settings-dark', label: t('workflowengine', 'Custom user agent'), - pattern: this.newValue + pattern: this.newValue, } - } + }, }, methods: { validateRegex(string) { @@ -120,8 +120,8 @@ export default { updateCustom(event) { this.newValue = event.target.value this.$emit('input', this.newValue) - } - } + }, + }, } </script> <style scoped> diff --git a/apps/workflowengine/src/components/Checks/RequestUserGroup.vue b/apps/workflowengine/src/components/Checks/RequestUserGroup.vue index f254a5185f6e89609e369253342a1643d447670a..c24143c6a7aa7c813757df4dbf5e4779f49f63cd 100644 --- a/apps/workflowengine/src/components/Checks/RequestUserGroup.vue +++ b/apps/workflowengine/src/components/Checks/RequestUserGroup.vue @@ -39,34 +39,34 @@ import axios from '@nextcloud/axios' const groups = [] const status = { - isLoading: false + isLoading: false, } export default { name: 'RequestUserGroup', components: { - Multiselect + Multiselect, }, props: { value: { type: String, - default: '' + default: '', }, check: { type: Object, - default: () => { return {} } - } + default: () => { return {} }, + }, }, data() { return { groups: groups, - status: status + status: status, } }, computed: { currentValue() { return this.groups.find(group => group.id === this.value) || null - } + }, }, async mounted() { if (this.groups.length === 0) { @@ -87,7 +87,7 @@ export default { response.data.ocs.data.groups.reduce((obj, item) => { obj.push({ id: item, - displayname: item + displayname: item, }) return obj }, []).forEach((group) => this.addGroup(group)) @@ -101,8 +101,8 @@ export default { if (index === -1) { this.groups.push(group) } - } - } + }, + }, } </script> <style scoped> diff --git a/apps/workflowengine/src/components/Checks/file.js b/apps/workflowengine/src/components/Checks/file.js index 0cc49c2d4c1f226d4b20e37dc04bdf2f74bbf10f..6c322a679b1045f7fffc157dce1a56850cb9a0af 100644 --- a/apps/workflowengine/src/components/Checks/file.js +++ b/apps/workflowengine/src/components/Checks/file.js @@ -32,7 +32,7 @@ const FileChecks = [ { operator: 'is', name: t('workflowengine', 'is') }, { operator: '!is', name: t('workflowengine', 'is not') }, { operator: 'matches', name: t('workflowengine', 'matches') }, - { operator: '!matches', name: t('workflowengine', 'does not match') } + { operator: '!matches', name: t('workflowengine', 'does not match') }, ], placeholder: (check) => { if (check.operator === 'matches' || check.operator === '!matches') { @@ -40,7 +40,7 @@ const FileChecks = [ } return 'filename.txt' }, - validate: stringValidator + validate: stringValidator, }, { @@ -50,9 +50,9 @@ const FileChecks = [ { operator: 'is', name: t('workflowengine', 'is') }, { operator: '!is', name: t('workflowengine', 'is not') }, { operator: 'matches', name: t('workflowengine', 'matches') }, - { operator: '!matches', name: t('workflowengine', 'does not match') } + { operator: '!matches', name: t('workflowengine', 'does not match') }, ], - component: FileMimeType + component: FileMimeType, }, { @@ -62,10 +62,10 @@ const FileChecks = [ { operator: 'less', name: t('workflowengine', 'less') }, { operator: '!greater', name: t('workflowengine', 'less or equals') }, { operator: '!less', name: t('workflowengine', 'greater or equals') }, - { operator: 'greater', name: t('workflowengine', 'greater') } + { operator: 'greater', name: t('workflowengine', 'greater') }, ], placeholder: (check) => '5 MB', - validate: (check) => check.value ? check.value.match(/^[0-9]+[ ]?[kmgt]?b$/i) !== null : false + validate: (check) => check.value ? check.value.match(/^[0-9]+[ ]?[kmgt]?b$/i) !== null : false, }, { @@ -75,7 +75,7 @@ const FileChecks = [ { operator: 'matchesIPv4', name: t('workflowengine', 'matches IPv4') }, { operator: '!matchesIPv4', name: t('workflowengine', 'does not match IPv4') }, { operator: 'matchesIPv6', name: t('workflowengine', 'matches IPv6') }, - { operator: '!matchesIPv6', name: t('workflowengine', 'does not match IPv6') } + { operator: '!matchesIPv6', name: t('workflowengine', 'does not match IPv6') }, ], placeholder: (check) => { if (check.operator === 'matchesIPv6' || check.operator === '!matchesIPv6') { @@ -88,7 +88,7 @@ const FileChecks = [ return validateIPv6(check.value) } return validateIPv4(check.value) - } + }, }, { @@ -96,10 +96,10 @@ const FileChecks = [ name: t('workflowengine', 'File system tag'), operators: [ { operator: 'is', name: t('workflowengine', 'is tagged with') }, - { operator: '!is', name: t('workflowengine', 'is not tagged with') } + { operator: '!is', name: t('workflowengine', 'is not tagged with') }, ], - component: FileSystemTag - } + component: FileSystemTag, + }, ] export default FileChecks diff --git a/apps/workflowengine/src/components/Checks/request.js b/apps/workflowengine/src/components/Checks/request.js index 0ff7682cec6e6f4379ca71511b1b9a6dc89f6b7c..22710315c2e738ff70c1818d3bf9b933f8818cd0 100644 --- a/apps/workflowengine/src/components/Checks/request.js +++ b/apps/workflowengine/src/components/Checks/request.js @@ -33,18 +33,18 @@ const RequestChecks = [ { operator: 'is', name: t('workflowengine', 'is') }, { operator: '!is', name: t('workflowengine', 'is not') }, { operator: 'matches', name: t('workflowengine', 'matches') }, - { operator: '!matches', name: t('workflowengine', 'does not match') } + { operator: '!matches', name: t('workflowengine', 'does not match') }, ], - component: RequestURL + component: RequestURL, }, { class: 'OCA\\WorkflowEngine\\Check\\RequestTime', name: t('workflowengine', 'Request time'), operators: [ { operator: 'in', name: t('workflowengine', 'between') }, - { operator: '!in', name: t('workflowengine', 'not between') } + { operator: '!in', name: t('workflowengine', 'not between') }, ], - component: RequestTime + component: RequestTime, }, { class: 'OCA\\WorkflowEngine\\Check\\RequestUserAgent', @@ -53,19 +53,19 @@ const RequestChecks = [ { operator: 'is', name: t('workflowengine', 'is') }, { operator: '!is', name: t('workflowengine', 'is not') }, { operator: 'matches', name: t('workflowengine', 'matches') }, - { operator: '!matches', name: t('workflowengine', 'does not match') } + { operator: '!matches', name: t('workflowengine', 'does not match') }, ], - component: RequestUserAgent + component: RequestUserAgent, }, { class: 'OCA\\WorkflowEngine\\Check\\UserGroupMembership', name: t('workflowengine', 'User group membership'), operators: [ { operator: 'is', name: t('workflowengine', 'is member of') }, - { operator: '!is', name: t('workflowengine', 'is not member of') } + { operator: '!is', name: t('workflowengine', 'is not member of') }, ], - component: RequestUserGroup - } + component: RequestUserGroup, + }, ] export default RequestChecks diff --git a/apps/workflowengine/src/components/Event.vue b/apps/workflowengine/src/components/Event.vue index 97608fde062d716e8cb1a6dd9b3c08207d393d42..9883a8cf93cbe0828bb2e082e475ee18a716c43e 100644 --- a/apps/workflowengine/src/components/Event.vue +++ b/apps/workflowengine/src/components/Event.vue @@ -32,13 +32,13 @@ import { Multiselect } from 'nextcloud-vue/dist/Components/Multiselect' export default { name: 'Event', components: { - Multiselect + Multiselect, }, props: { rule: { type: Object, - required: true - } + required: true, + }, }, computed: { entity() { @@ -52,14 +52,14 @@ export default { }, currentEvent() { return this.allEvents.filter(event => event.entity.id === this.rule.entity && this.rule.events.indexOf(event.eventName) !== -1) - } + }, }, methods: { updateEvent(events) { this.$set(this.rule, 'events', events.map(event => event.eventName)) this.$emit('update', this.rule) - } - } + }, + }, } </script> diff --git a/apps/workflowengine/src/components/Operation.vue b/apps/workflowengine/src/components/Operation.vue index b05465c79605901f4bcf4ba0be0678c1e9fa36be..269dce69613ec9376adba7067b061b8649e57988 100644 --- a/apps/workflowengine/src/components/Operation.vue +++ b/apps/workflowengine/src/components/Operation.vue @@ -20,13 +20,13 @@ export default { props: { operation: { type: Object, - required: true + required: true, }, colored: { type: Boolean, - default: true - } - } + default: true, + }, + }, } </script> diff --git a/apps/workflowengine/src/components/Rule.vue b/apps/workflowengine/src/components/Rule.vue index 5bfbe48138d19d34b0cd45a6d115e30642dcbfc6..bdcd4bfc0f0610afd63e7264e9848b8f46c1f95e 100644 --- a/apps/workflowengine/src/components/Rule.vue +++ b/apps/workflowengine/src/components/Rule.vue @@ -58,16 +58,16 @@ import Operation from './Operation' export default { name: 'Rule', components: { - Operation, Check, Event, Actions, ActionButton + Operation, Check, Event, Actions, ActionButton, }, directives: { - Tooltip + Tooltip, }, props: { rule: { type: Object, - required: true - } + required: true, + }, }, data() { return { @@ -76,7 +76,7 @@ export default { error: null, dirty: this.rule.id < 0, checking: false, - originalRule: null + originalRule: null, } }, computed: { @@ -88,7 +88,7 @@ export default { return { title: t('workflowengine', 'The configuration is invalid'), class: 'icon-close-white invalid', - tooltip: { placement: 'bottom', show: true, content: this.error } + tooltip: { placement: 'bottom', show: true, content: this.error }, } } if (!this.dirty || this.checking) { @@ -100,7 +100,7 @@ export default { lastCheckComplete() { const lastCheck = this.rule.checks[this.rule.checks.length - 1] return typeof lastCheck === 'undefined' || lastCheck.class !== null - } + }, }, mounted() { this.originalRule = JSON.parse(JSON.stringify(this.rule)) @@ -161,8 +161,8 @@ export default { this.$delete(this.rule.checks, index) } this.$store.dispatch('updateRule', this.rule) - } - } + }, + }, } </script> diff --git a/apps/workflowengine/src/components/Workflow.vue b/apps/workflowengine/src/components/Workflow.vue index e3a50ae198fd4178c3572fe4fdd0ac1213b1a195..8166a6abcefd5d22bfb3ba5880b3059586dccd54 100644 --- a/apps/workflowengine/src/components/Workflow.vue +++ b/apps/workflowengine/src/components/Workflow.vue @@ -56,21 +56,21 @@ export default { name: 'Workflow', components: { Operation, - Rule + Rule, }, data() { return { showMoreOperations: false, appstoreUrl: '/index.php/settings/apps/workflow', - scope: loadState('workflowengine', 'scope') + scope: loadState('workflowengine', 'scope'), } }, computed: { ...mapGetters({ - rules: 'getRules' + rules: 'getRules', }), ...mapState({ - operations: 'operations' + operations: 'operations', }), hasMoreOperations() { return Object.keys(this.operations).length > ACTION_LIMIT @@ -80,7 +80,7 @@ export default { return Object.values(this.operations) } return Object.values(this.operations).slice(0, ACTION_LIMIT) - } + }, }, mounted() { this.$store.dispatch('fetchRules') @@ -88,8 +88,8 @@ export default { methods: { createNewRule(operation) { this.$store.dispatch('createNewRule', operation) - } - } + }, + }, } </script> diff --git a/apps/workflowengine/src/helpers/api.js b/apps/workflowengine/src/helpers/api.js index 76861d3bb35311dc716504b126e9b138790f1365..c8a019de625c709809c7d3db4bd71ea5c093e23a 100644 --- a/apps/workflowengine/src/helpers/api.js +++ b/apps/workflowengine/src/helpers/api.js @@ -29,5 +29,5 @@ const getApiUrl = (url) => { } export { - getApiUrl + getApiUrl, } diff --git a/apps/workflowengine/src/mixins/valueMixin.js b/apps/workflowengine/src/mixins/valueMixin.js index 8b565936b82b5d7a752dfcb3c8c9123cb580efee..7dba221ec88241f404f007806a51496b02e4bf9d 100644 --- a/apps/workflowengine/src/mixins/valueMixin.js +++ b/apps/workflowengine/src/mixins/valueMixin.js @@ -24,16 +24,16 @@ const valueMixin = { props: { value: { type: String, - default: '' + default: '', }, check: { type: Object, - default: () => { return {} } - } + default: () => { return {} }, + }, }, data() { return { - newValue: '' + newValue: '', } }, watch: { @@ -41,14 +41,14 @@ const valueMixin = { immediate: true, handler: function(value) { this.updateInternalValue(value) - } - } + }, + }, }, methods: { updateInternalValue(value) { this.newValue = value - } - } + }, + }, } export default valueMixin diff --git a/apps/workflowengine/src/store.js b/apps/workflowengine/src/store.js index a18540f8035f23c3eb6a74acc346067de2b768da..70b8b550053850106f9196f2b4fca50eff48b294 100644 --- a/apps/workflowengine/src/store.js +++ b/apps/workflowengine/src/store.js @@ -37,7 +37,7 @@ const store = new Vuex.Store({ plugins: Vue.observable({ checks: {}, - operators: {} + operators: {}, }), entities: loadState('workflowengine', 'entities'), @@ -46,10 +46,10 @@ const store = new Vuex.Store({ return { id: `${entity.id}::${event.eventName}`, entity, - ...event + ...event, } })).flat(), - checks: loadState('workflowengine', 'checks') + checks: loadState('workflowengine', 'checks'), }, mutations: { addRule(state, rule) { @@ -74,7 +74,7 @@ const store = new Vuex.Store({ if (typeof state.operations[plugin.id] !== 'undefined') { Vue.set(state.operations, plugin.id, plugin) } - } + }, }, actions: { async fetchRules(context) { @@ -99,13 +99,13 @@ const store = new Vuex.Store({ events, name: '', // unused in the new ui, there for legacy reasons checks: [], - operation: rule.operation || '' + operation: rule.operation || '', }) }, updateRule(context, rule) { context.commit('updateRule', { ...rule, - events: typeof rule.events === 'string' ? JSON.parse(rule.events) : rule.events + events: typeof rule.events === 'string' ? JSON.parse(rule.events) : rule.events, }) }, removeRule(context, rule) { @@ -130,7 +130,7 @@ const store = new Vuex.Store({ setValid(context, { rule, valid }) { rule.valid = valid context.commit('updateRule', rule) - } + }, }, getters: { getRules(state) { @@ -164,8 +164,8 @@ const store = new Vuex.Store({ return obj }, {}) } - } - } + }, + }, }) export default store diff --git a/apps/workflowengine/src/workflowengine.js b/apps/workflowengine/src/workflowengine.js index b1c0c28cfaa86f137e27200aff6b2f9c07916ae5..712f98fdfd0426be02730b55ecbf48cb66f186db 100644 --- a/apps/workflowengine/src/workflowengine.js +++ b/apps/workflowengine/src/workflowengine.js @@ -77,7 +77,7 @@ window.OCA.WorkflowEngine = Object.assign({}, OCA.WorkflowEngine, { */ registerOperator: function(Plugin) { store.commit('addPluginOperator', Plugin) - } + }, }) // Register shipped checks @@ -88,6 +88,6 @@ Vue.prototype.t = t const View = Vue.extend(Settings) const workflowengine = new View({ - store + store, }) workflowengine.$mount('#workflowengine') diff --git a/core/js/dist/login.js b/core/js/dist/login.js index 2f5c8cc9051af37d35b027a5eccfde6e4a97b808..43f2f1ae92630c6b761ff931cdece36781f4dd66 100644 Binary files a/core/js/dist/login.js and b/core/js/dist/login.js differ diff --git a/core/js/dist/login.js.map b/core/js/dist/login.js.map index c7bd1304656a5401b217a9f306a3deb00d948af5..ccd40138070307eab026021ebbe59167b5fc0f5f 100644 Binary files a/core/js/dist/login.js.map and b/core/js/dist/login.js.map differ diff --git a/core/js/dist/main.js b/core/js/dist/main.js index e6e54c6bf05de82a494b39cd2a47cd2d60b558d8..5acf2b2fbec8120db4bdd867a135889a9a9639f6 100644 Binary files a/core/js/dist/main.js and b/core/js/dist/main.js differ diff --git a/core/js/dist/main.js.map b/core/js/dist/main.js.map index dea72ec0e339d54d7740db01323ea335b3d8d2bc..9f3daf3838acb4afc67025bff0cb23195f1775f3 100644 Binary files a/core/js/dist/main.js.map and b/core/js/dist/main.js.map differ diff --git a/core/js/dist/maintenance.js b/core/js/dist/maintenance.js index bf7d88665b794de03a11de3174c6b92bc0c13946..36f9cd3f35b246f3724ab3896a445ce20e4fe939 100644 Binary files a/core/js/dist/maintenance.js and b/core/js/dist/maintenance.js differ diff --git a/core/js/dist/maintenance.js.map b/core/js/dist/maintenance.js.map index 27d2f3d16b041c94ab35ea36be8197bcb65acc5b..e478d95fc5099ce89cd97c3b7a2ec9437bde7813 100644 Binary files a/core/js/dist/maintenance.js.map and b/core/js/dist/maintenance.js.map differ diff --git a/core/js/dist/recommendedapps.js b/core/js/dist/recommendedapps.js index 02f065a91d4b9d44ffeefaa1353a996cfba85234..36b44df5374f727e1e6fa677cd1496338b9d9f93 100644 Binary files a/core/js/dist/recommendedapps.js and b/core/js/dist/recommendedapps.js differ diff --git a/core/js/dist/recommendedapps.js.map b/core/js/dist/recommendedapps.js.map index 671097261b548255dffd09cf6ac061bc3ecf0227..739aaf7c8a188ceaef605ea2d4c1491f23a05dff 100644 Binary files a/core/js/dist/recommendedapps.js.map and b/core/js/dist/recommendedapps.js.map differ diff --git a/core/js/dist/systemtags.js.map b/core/js/dist/systemtags.js.map index 141f9736beb4f977c0fbe880438721ea3657ba32..cd4999da9816f787cd5e3cb4b1c96c6bc0daf419 100644 Binary files a/core/js/dist/systemtags.js.map and b/core/js/dist/systemtags.js.map differ diff --git a/core/js/systemtags/systemtagmodel.js b/core/js/systemtags/systemtagmodel.js index c51706944a41d05f27cd45754fd5ebccaca6dbcf..b3490c0ddfeb8787d5d8b7bf9eb8763f6cfc73fe 100644 --- a/core/js/systemtags/systemtagmodel.js +++ b/core/js/systemtags/systemtagmodel.js @@ -15,7 +15,7 @@ PROPERTY_CAN_ASSIGN: '{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign', PROPERTY_DISPLAYNAME: '{' + OC.Files.Client.NS_OWNCLOUD + '}display-name', PROPERTY_USERVISIBLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible', - PROPERTY_USERASSIGNABLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable' + PROPERTY_USERASSIGNABLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable', }) /** @@ -25,14 +25,14 @@ * System tag * */ - var SystemTagModel = OC.Backbone.Model.extend( + const SystemTagModel = OC.Backbone.Model.extend( /** @lends OCA.SystemTags.SystemTagModel.prototype */ { sync: OC.Backbone.davSync, defaults: { userVisible: true, userAssignable: true, - canAssign: true + canAssign: true, }, davProperties: { @@ -41,7 +41,7 @@ 'userVisible': OC.Files.Client.PROPERTY_USERVISIBLE, 'userAssignable': OC.Files.Client.PROPERTY_USERASSIGNABLE, // read-only, effective permissions computed by the server, - 'canAssign': OC.Files.Client.PROPERTY_CAN_ASSIGN + 'canAssign': OC.Files.Client.PROPERTY_CAN_ASSIGN, }, parse: function(data) { @@ -50,9 +50,9 @@ name: data.name, userVisible: data.userVisible === true || data.userVisible === 'true', userAssignable: data.userAssignable === true || data.userAssignable === 'true', - canAssign: data.canAssign === true || data.canAssign === 'true' + canAssign: data.canAssign === true || data.canAssign === 'true', } - } + }, }) OC.SystemTags = OC.SystemTags || {} diff --git a/core/js/systemtags/systemtagsmappingcollection.js b/core/js/systemtags/systemtagsmappingcollection.js index d3f1d0b873610485ceed78db423f6a35a25752d3..834ba57f9456876bbe93d77303da53e245784e4c 100644 --- a/core/js/systemtags/systemtagsmappingcollection.js +++ b/core/js/systemtags/systemtagsmappingcollection.js @@ -16,7 +16,7 @@ * Collection of tags assigned to a an object * */ - var SystemTagsMappingCollection = OC.Backbone.Collection.extend( + const SystemTagsMappingCollection = OC.Backbone.Collection.extend( /** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ { sync: OC.Backbone.davSync, @@ -78,7 +78,7 @@ return this.map(function(model) { return model.id }) - } + }, }) OC.SystemTags = OC.SystemTags || {} diff --git a/core/src/OC/apps.js b/core/src/OC/apps.js index f94059a42127834293504527156d23cd100ba470..f55a5d03dcca6ef8931c59045fd918ab9c5a0e52 100644 --- a/core/src/OC/apps.js +++ b/core/src/OC/apps.js @@ -10,12 +10,12 @@ import $ from 'jquery' -var dynamicSlideToggleEnabled = false +let dynamicSlideToggleEnabled = false const Apps = { enableDynamicSlideToggle: function() { dynamicSlideToggleEnabled = true - } + }, } /** @@ -24,7 +24,7 @@ const Apps = { * @param {Object} [$el] sidebar element to show, defaults to $('#app-sidebar') */ Apps.showAppSidebar = function($el) { - var $appSidebar = $el || $('#app-sidebar') + const $appSidebar = $el || $('#app-sidebar') $appSidebar.removeClass('disappear').show() $('#app-content').trigger(new $.Event('appresized')) } @@ -36,7 +36,7 @@ Apps.showAppSidebar = function($el) { * @param {Object} [$el] sidebar element to hide, defaults to $('#app-sidebar') */ Apps.hideAppSidebar = function($el) { - var $appSidebar = $el || $('#app-sidebar') + const $appSidebar = $el || $('#app-sidebar') $appSidebar.hide().addClass('disappear') $('#app-content').trigger(new $.Event('appresized')) } @@ -51,7 +51,7 @@ Apps.hideAppSidebar = function($el) { * <div class=".slide-area" class="hidden">I'm sliding up</div> */ export const registerAppsSlideToggle = () => { - var buttons = $('[data-apps-slide-toggle]') + let buttons = $('[data-apps-slide-toggle]') if (buttons.length === 0) { $('#app-navigation').addClass('without-app-settings') @@ -65,8 +65,8 @@ export const registerAppsSlideToggle = () => { buttons.each(function(index, button) { - var areaSelector = $(button).data('apps-slide-toggle') - var area = $(areaSelector) + const areaSelector = $(button).data('apps-slide-toggle') + const area = $(areaSelector) function hideArea() { area.slideUp(OC.menuSpeed * 4, function() { @@ -82,7 +82,7 @@ export const registerAppsSlideToggle = () => { }) area.addClass('opened') $(button).addClass('opened') - var input = $(areaSelector + ' [autofocus]') + const input = $(areaSelector + ' [autofocus]') if (input.length === 1) { input.focus() } @@ -102,7 +102,7 @@ export const registerAppsSlideToggle = () => { // all other areas that have not been clicked but are open // should be slid up } else { - var closest = $(event.target).closest(areaSelector) + const closest = $(event.target).closest(areaSelector) if (area.is(':visible') && closest[0] !== area[0]) { hideArea() } diff --git a/core/src/OC/backbone.js b/core/src/OC/backbone.js index 38bfc0465015a449ce2f0d39084ca29d95ffd3c4..86e98ec1b4153de2d0860151d5e13d4d39e695d4 100644 --- a/core/src/OC/backbone.js +++ b/core/src/OC/backbone.js @@ -27,7 +27,7 @@ const Backbone = VendorBackbone.noConflict() // Patch Backbone for DAV Object.assign(Backbone, { davCall, - davSync: davSync(Backbone) + davSync: davSync(Backbone), }) export default Backbone diff --git a/core/src/OC/currentuser.js b/core/src/OC/currentuser.js index c8f9d59c1ebc249bf2ee372ac586d16aa98c14da..061abba89d669982b288e0a96f7bfa27dc84c534 100644 --- a/core/src/OC/currentuser.js +++ b/core/src/OC/currentuser.js @@ -31,6 +31,6 @@ export const currentUser = rawUid !== undefined ? rawUid : false export const getCurrentUser = () => { return { uid: currentUser, - displayName + displayName, } } diff --git a/core/src/OC/get_set.js b/core/src/OC/get_set.js index bf45ce85fc7b8f2cb678836e02ec9b70ce7816ed..12f9aab56eb30f122e0003e4aca0540f033a8fb6 100644 --- a/core/src/OC/get_set.js +++ b/core/src/OC/get_set.js @@ -28,7 +28,7 @@ export const get = context => name => { const namespaces = name.split('.') const tail = namespaces.pop() - for (var i = 0; i < namespaces.length; i++) { + for (let i = 0; i < namespaces.length; i++) { context = context[namespaces[i]] if (!context) { return false diff --git a/core/src/OC/index.js b/core/src/OC/index.js index 2a43d95eade6d0006274d21dd703fc03c9cb3020..9ecb3e60f6fce50f2e08d39ac23dd2e36fffb547 100644 --- a/core/src/OC/index.js +++ b/core/src/OC/index.js @@ -25,7 +25,7 @@ import { addScript, addStyle } from './legacy-loader' import { ajaxConnectionLostHandler, processAjaxError, - registerXHRForErrorProcessing + registerXHRForErrorProcessing, } from './xhr-error' import Apps from './apps' import { AppConfig, appConfig } from './appconfig' @@ -37,11 +37,11 @@ import { dirname, encodePath, isSamePath, - joinPaths + joinPaths, } from '@nextcloud/paths' import { build as buildQueryString, - parse as parseQueryString + parse as parseQueryString, } from './query-string' import Config from './config' import { @@ -54,7 +54,7 @@ import { PERMISSION_READ, PERMISSION_SHARE, PERMISSION_UPDATE, - TAG_FAVORITE + TAG_FAVORITE, } from './constants' import ContactsMenu from './contactsmenu' import { currentUser, getCurrentUser } from './currentuser' @@ -66,22 +66,22 @@ import { getHost, getHostName, getPort, - getProtocol + getProtocol, } from './host' import { - getToken as getRequestToken + getToken as getRequestToken, } from './requesttoken' import { hideMenus, registerMenu, showMenu, - unregisterMenu + unregisterMenu, } from './menu' import { isUserAdmin } from './admin' import L10N, { getCanonicalLocale, getLanguage, - getLocale + getLocale, } from './l10n' import { @@ -92,7 +92,7 @@ import { linkTo, linkToOCS, linkToRemote, - linkToRemoteBase + linkToRemoteBase, } from './routing' import msg from './msg' import Notification from './notification' @@ -270,7 +270,7 @@ export default { * @deprecated since 8.2, use OC.getRootPath() instead * @see OC#getRootPath */ - webroot + webroot, } // Keep the request token prop in sync diff --git a/core/src/OC/l10n-registry.js b/core/src/OC/l10n-registry.js index 44dc6f91be5321c48f6402db25a5be3305b5551e..dc35390233730eed301f7640b5f9edd32c7ea4e0 100644 --- a/core/src/OC/l10n-registry.js +++ b/core/src/OC/l10n-registry.js @@ -83,6 +83,6 @@ export const hasAppTranslations = appId => { export const getAppTranslations = appId => { return { translations: window._oc_l10n_registry_translations[appId] || {}, - pluralFunction: window._oc_l10n_registry_plural_functions[appId] + pluralFunction: window._oc_l10n_registry_plural_functions[appId], } } diff --git a/core/src/OC/l10n.js b/core/src/OC/l10n.js index ebb2c032b6aa68140adf74c46fa6fc05eb879093..5ada257d8588832776e05a7458f2e9fb8b5a3cbc 100644 --- a/core/src/OC/l10n.js +++ b/core/src/OC/l10n.js @@ -19,7 +19,7 @@ import { getAppTranslations, hasAppTranslations, registerAppTranslations, - unregisterAppTranslations + unregisterAppTranslations, } from './l10n-registry' /** @@ -40,15 +40,15 @@ const L10n = { load: function(appName, callback) { // already available ? if (hasAppTranslations(appName) || OC.getLocale() === 'en') { - var deferred = $.Deferred() - var promise = deferred.promise() + const deferred = $.Deferred() + const promise = deferred.promise() promise.then(callback) deferred.resolve() return promise } - var self = this - var url = OC.filePath(appName, 'l10n', OC.getLocale() + '.json') + const self = this + const url = OC.filePath(appName, 'l10n', OC.getLocale() + '.json') // load JSON translation bundle per AJAX return $.get(url) @@ -87,19 +87,19 @@ const L10n = { * @returns {string} */ translate: function(app, text, vars, count, options) { - var defaultOptions = { - escape: true + const defaultOptions = { + escape: true, } - var allOptions = options || {} + const allOptions = options || {} _.defaults(allOptions, defaultOptions) // TODO: cache this function to avoid inline recreation // of the same function over and over again in case // translate() is used in a loop - var _build = function(text, vars, count) { + const _build = function(text, vars, count) { return text.replace(/%n/g, count).replace(/{([^{}]*)}/g, function(a, b) { - var r = vars[b] + const r = vars[b] if (typeof r === 'string' || typeof r === 'number') { if (allOptions.escape) { return DOMPurify.sanitize(escapeHTML(r)) @@ -112,9 +112,9 @@ const L10n = { } ) } - var translation = text - var bundle = getAppTranslations(app) - var value = bundle.translations[text] + let translation = text + const bundle = getAppTranslations(app) + const value = bundle.translations[text] if (typeof (value) !== 'undefined') { translation = value } @@ -142,9 +142,9 @@ const L10n = { const bundle = getAppTranslations(app) const value = bundle.translations[identifier] if (typeof (value) !== 'undefined') { - var translation = value + const translation = value if ($.isArray(translation)) { - var plural = bundle.pluralFunction(count) + const plural = bundle.pluralFunction(count) return this.translate(app, translation[plural], vars, count, options) } } @@ -164,7 +164,7 @@ const L10n = { * @private */ _getPlural: function(number) { - var language = OC.getLanguage() + let language = OC.getLanguage() if (language === 'pt_BR') { // temporary set a locale for brazilian language = 'xbr' @@ -315,7 +315,7 @@ const L10n = { default: return 0 } - } + }, } export default L10n diff --git a/core/src/OC/msg.js b/core/src/OC/msg.js index e210f32bb14b6993eb13398e2c5b633375442177..744bd795b6c07eacef1023e3906f87093564f768 100644 --- a/core/src/OC/msg.js +++ b/core/src/OC/msg.js @@ -113,5 +113,5 @@ export default { .addClass('error') .removeClass('success') .show() - } + }, } diff --git a/core/src/OC/notification.js b/core/src/OC/notification.js index b56fb6b14def04b1c5cd4a0cc635730481eefd91..4e95476b69b583a93fbdf10bc8c99e36d12e5b6b 100644 --- a/core/src/OC/notification.js +++ b/core/src/OC/notification.js @@ -156,5 +156,5 @@ export default { */ isHidden: function() { return !$('#content').find('.toastify').length - } + }, } diff --git a/core/src/OC/password-confirmation.js b/core/src/OC/password-confirmation.js index e303d70bf5de5a4ed42a41d695493f889471d59e..f708217fc845b6da9bf634633ba9687a06be96ed 100644 --- a/core/src/OC/password-confirmation.js +++ b/core/src/OC/password-confirmation.js @@ -39,8 +39,8 @@ export default { }, requiresPasswordConfirmation: function() { - var serverTimeDiff = this.pageLoadTime - (window.nc_pageLoad * 1000) - var timeSinceLogin = moment.now() - (serverTimeDiff + (window.nc_lastLogin * 1000)) + const serverTimeDiff = this.pageLoadTime - (window.nc_pageLoad * 1000) + const timeSinceLogin = moment.now() - (serverTimeDiff + (window.nc_lastLogin * 1000)) // if timeSinceLogin > 30 minutes and user backend allows password confirmation return (window.backendAllowsPasswordConfirmation && timeSinceLogin > 30 * 60 * 1000) @@ -53,7 +53,7 @@ export default { */ requirePasswordConfirmation: function(callback, options, rejectCallback) { options = typeof options !== 'undefined' ? options : {} - var defaults = { + const defaults = { title: t('core', 'Authentication required'), text: t( 'core', @@ -61,12 +61,12 @@ export default { ), confirm: t('core', 'Confirm'), label: t('core', 'Password'), - error: '' + error: '', } - var config = _.extend(defaults, options) + const config = _.extend(defaults, options) - var self = this + const self = this if (this.requiresPasswordConfirmation()) { OC.dialogs.prompt( @@ -83,16 +83,16 @@ export default { config.label, true ).then(function() { - var $dialog = $('.oc-dialog:visible') + const $dialog = $('.oc-dialog:visible') $dialog.find('.ui-icon').remove() $dialog.addClass('password-confirmation') if (config.error !== '') { - var $error = $('<p></p>').addClass('msg warning').text(config.error) + const $error = $('<p></p>').addClass('msg warning').text(config.error) + $dialog.find('.oc-dialog-content').append($error) } - $dialog.find('.oc-dialog-content').append($error) $dialog.find('.oc-dialog-buttonrow').addClass('aside') - var $buttons = $dialog.find('button') + const $buttons = $dialog.find('button') $buttons.eq(0).hide() $buttons.eq(1).text(config.confirm) }) @@ -102,12 +102,12 @@ export default { }, _confirmPassword: function(password, config) { - var self = this + const self = this $.ajax({ url: OC.generateUrl('/login/confirm'), data: { - password: password + password: password, }, type: 'POST', success: function(response) { @@ -120,7 +120,7 @@ export default { error: function() { config.error = t('core', 'Failed to authenticate, try again') OC.PasswordConfirmation.requirePasswordConfirmation(self.callback, config) - } + }, }) - } + }, } diff --git a/core/src/OC/plugins.js b/core/src/OC/plugins.js index 124116b9a59b4bd160b22876cb328e394ae2c280..1c9b59c7419b57402869d9eed9afc1dfecd1c6be 100644 --- a/core/src/OC/plugins.js +++ b/core/src/OC/plugins.js @@ -36,7 +36,7 @@ export default { * @param {OC.Plugin} plugin plugin */ register: function(targetName, plugin) { - var plugins = this._plugins[targetName] + let plugins = this._plugins[targetName] if (!plugins) { plugins = this._plugins[targetName] = [] } @@ -62,8 +62,8 @@ export default { * @param {Object} [options] options */ attach: function(targetName, targetObject, options) { - var plugins = this.getPlugins(targetName) - for (var i = 0; i < plugins.length; i++) { + const plugins = this.getPlugins(targetName) + for (let i = 0; i < plugins.length; i++) { if (plugins[i].attach) { plugins[i].attach(targetObject, options) } @@ -78,12 +78,12 @@ export default { * @param {Object} [options] options */ detach: function(targetName, targetObject, options) { - var plugins = this.getPlugins(targetName) - for (var i = 0; i < plugins.length; i++) { + const plugins = this.getPlugins(targetName) + for (let i = 0; i < plugins.length; i++) { if (plugins[i].detach) { plugins[i].detach(targetObject, options) } } - } + }, } diff --git a/core/src/OC/query-string.js b/core/src/OC/query-string.js index a814177790575c5f0ce2a39a71641799b832408a..502fa15e474ec0a6ecdc18781618ddd0bb4ecf69 100644 --- a/core/src/OC/query-string.js +++ b/core/src/OC/query-string.js @@ -25,10 +25,9 @@ * @returns {Object.<string, string>} map containing key/values matching the URL parameters */ export const parse = queryString => { - let parts let pos let components - let result = {} + const result = {} let key if (!queryString) { return null @@ -37,15 +36,15 @@ export const parse = queryString => { if (pos >= 0) { queryString = queryString.substr(pos + 1) } - parts = queryString.replace(/\+/g, '%20').split('&') + const parts = queryString.replace(/\+/g, '%20').split('&') for (let i = 0; i < parts.length; i++) { // split on first equal sign - var part = parts[i] + const part = parts[i] pos = part.indexOf('=') if (pos >= 0) { components = [ part.substr(0, pos), - part.substr(pos + 1) + part.substr(pos + 1), ] } else { // key only @@ -79,7 +78,7 @@ export const build = params => { return '' } return $.map(params, function(value, key) { - var s = encodeURIComponent(key) + let s = encodeURIComponent(key) if (value !== null && typeof (value) !== 'undefined') { s += '=' + encodeURIComponent(value) } diff --git a/core/src/OC/requesttoken.js b/core/src/OC/requesttoken.js index 91b18069d757743167717e6e122f03f9303f24df..b25fdafd5b4a466ce784d186212d0486a003ab5b 100644 --- a/core/src/OC/requesttoken.js +++ b/core/src/OC/requesttoken.js @@ -35,6 +35,6 @@ export const setToken = newToken => { token = newToken emit('csrf-token-update', { - token + token, }) } diff --git a/core/src/OC/routing.js b/core/src/OC/routing.js index 36fd00090323439b90df7e354f1866ec6387f2b7..9244212286d45ded2a9f2370550ba43a032cd44d 100644 --- a/core/src/OC/routing.js +++ b/core/src/OC/routing.js @@ -68,7 +68,7 @@ export const linkToOCS = (service, version) => { */ export const generateUrl = (url, params, options) => { const defaultOptions = { - escape: true + escape: true, } const allOptions = options || {} _.defaults(allOptions, defaultOptions) @@ -77,7 +77,7 @@ export const generateUrl = (url, params, options) => { vars = vars || [] return text.replace(/{([^{}]*)}/g, function(a, b) { - var r = (vars[b]) + const r = (vars[b]) if (allOptions.escape) { return (typeof r === 'string' || typeof r === 'number') ? encodeURIComponent(r) : encodeURIComponent(a) } else { diff --git a/core/src/OC/util-history.js b/core/src/OC/util-history.js index dfb5117c27eb888c775ab79eda9e110cfaa5d806..61fe3fec098bdd69f103973ed10024f0126efc16 100644 --- a/core/src/OC/util-history.js +++ b/core/src/OC/util-history.js @@ -46,7 +46,7 @@ export default { * @param {boolean} [replace=false] whether to replace instead of pushing */ _pushState: function(params, url, replace) { - var strParams + let strParams if (typeof (params) === 'string') { strParams = params } else { @@ -57,10 +57,10 @@ export default { url = url || location.pathname + '?' + strParams // Workaround for bug with SVG and window.history.pushState on Firefox < 51 // https://bugzilla.mozilla.org/show_bug.cgi?id=652991 - var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1 + const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1 if (isFirefox && parseInt(navigator.userAgent.split('/').pop()) < 51) { - var patterns = document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]') - for (var i = 0, ii = patterns.length, pattern; i < ii; i++) { + const patterns = document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]') + for (let i = 0, ii = patterns.length, pattern; i < ii; i++) { pattern = patterns[i] // eslint-disable-next-line no-self-assign pattern.style.fill = pattern.style.fill @@ -127,8 +127,8 @@ export default { * @returns {string} */ _parseHashQuery: function() { - var hash = window.location.hash - var pos = hash.indexOf('?') + const hash = window.location.hash + const pos = hash.indexOf('?') if (pos >= 0) { return hash.substr(pos + 1) } @@ -150,8 +150,8 @@ export default { * @returns {Object} map of parameters */ parseUrlQuery: function() { - var query = this._parseHashQuery() - var params + const query = this._parseHashQuery() + let params // try and parse from URL hash first if (query) { params = OC.parseQueryString(this._decodeQuery(query)) @@ -166,7 +166,7 @@ export default { this._cancelPop = false return } - var params + let params if (!this._handlers.length) { return } @@ -176,8 +176,8 @@ export default { } else if (!params) { params = this.parseUrlQuery() || {} } - for (var i = 0; i < this._handlers.length; i++) { + for (let i = 0; i < this._handlers.length; i++) { this._handlers[i](params) } - } + }, } diff --git a/core/src/OC/util.js b/core/src/OC/util.js index 7c4a44b77d9de8b0fb21d3af1d369cd52111b57f..1bb4ae9ead0ecdc5535e05462be185dd309b996e 100644 --- a/core/src/OC/util.js +++ b/core/src/OC/util.js @@ -28,7 +28,7 @@ import humanFileSize from '../Util/human-file-size' function chunkify(t) { // Adapted from http://my.opera.com/GreyWyvern/blog/show.dml/1671288 - let tz = [] + const tz = [] let x = 0 let y = -1 let n = 0 @@ -37,7 +37,7 @@ function chunkify(t) { while (x < t.length) { c = t.charAt(x) // only include the dot in strings - var m = ((!n && c === '.') || (c >= '0' && c <= '9')) + const m = ((!n && c === '.') || (c >= '0' && c <= '9')) if (m !== n) { // next chunk y++ @@ -75,10 +75,10 @@ export default { return null } - var s = string.toLowerCase().trim() - var bytes = null + const s = string.toLowerCase().trim() + let bytes = null - var bytesArray = { + const bytesArray = { 'b': 1, 'k': 1024, 'kb': 1024, @@ -89,10 +89,10 @@ export default { 'tb': 1024 * 1024 * 1024 * 1024, 't': 1024 * 1024 * 1024 * 1024, 'pb': 1024 * 1024 * 1024 * 1024 * 1024, - 'p': 1024 * 1024 * 1024 * 1024 * 1024 + 'p': 1024 * 1024 * 1024 * 1024 * 1024, } - var matches = s.match(/^[\s+]?([0-9]*)(\.([0-9]+))?( +)?([kmgtp]?b?)$/i) + const matches = s.match(/^[\s+]?([0-9]*)(\.([0-9]+))?( +)?([kmgtp]?b?)$/i) if (matches !== null) { bytes = parseFloat(s) if (!isFinite(bytes)) { @@ -124,7 +124,7 @@ export default { * @returns {string} human readable difference from now */ relativeModifiedDate: function(timestamp) { - var diff = moment().diff(moment(timestamp)) + const diff = moment().diff(moment(timestamp)) if (diff >= 0 && diff < 45000) { return t('core', 'seconds ago') } @@ -150,11 +150,11 @@ export default { return this._scrollBarWidth } - var inner = document.createElement('p') + const inner = document.createElement('p') inner.style.width = '100%' inner.style.height = '200px' - var outer = document.createElement('div') + const outer = document.createElement('div') outer.style.position = 'absolute' outer.style.top = '0px' outer.style.left = '0px' @@ -165,9 +165,9 @@ export default { outer.appendChild(inner) document.body.appendChild(outer) - var w1 = inner.offsetWidth + const w1 = inner.offsetWidth outer.style.overflow = 'scroll' - var w2 = inner.offsetWidth + let w2 = inner.offsetWidth if (w1 === w2) { w2 = outer.clientWidth } @@ -199,13 +199,13 @@ export default { * or 0 if the strings are identical */ naturalSortCompare: function(a, b) { - var x - var aa = chunkify(a) - var bb = chunkify(b) + let x + const aa = chunkify(a) + const bb = chunkify(b) for (x = 0; aa[x] && bb[x]; x++) { if (aa[x] !== bb[x]) { - var aNum = Number(aa[x]); var bNum = Number(bb[x]) + const aNum = Number(aa[x]); const bNum = Number(bb[x]) // note: == is correct here /* eslint-disable-next-line */ if (aNum == aa[x] && bNum == bb[x]) { @@ -226,7 +226,7 @@ export default { * @param {integer} interval in milliseconds */ waitFor: function(callback, interval) { - var internalCallback = function() { + const internalCallback = function() { if (callback() !== true) { setTimeout(internalCallback, interval) } @@ -242,13 +242,13 @@ export default { * @returns {boolean} true if the cookie with the given name has the given value */ isCookieSetToValue: function(name, value) { - var cookies = document.cookie.split(';') - for (var i = 0; i < cookies.length; i++) { - var cookie = cookies[i].split('=') + const cookies = document.cookie.split(';') + for (let i = 0; i < cookies.length; i++) { + const cookie = cookies[i].split('=') if (cookie[0].trim() === name && cookie[1].trim() === value) { return true } } return false - } + }, } diff --git a/core/src/OC/webroot.js b/core/src/OC/webroot.js index cf9da346f92f0ddd9c37b7fc9aa3e2234738b992..89c04a6bb07c8100930f0cffb2dcab2b5bb30179 100644 --- a/core/src/OC/webroot.js +++ b/core/src/OC/webroot.js @@ -23,7 +23,7 @@ let webroot = window._oc_webroot if (typeof webroot === 'undefined') { webroot = location.pathname - var pos = webroot.indexOf('/index.php/') + const pos = webroot.indexOf('/index.php/') if (pos !== -1) { webroot = webroot.substr(0, pos) } else { diff --git a/core/src/OCP/appconfig.js b/core/src/OCP/appconfig.js index f4213419aab52e04de955d69d1fde7de9930adf0..d7aaf12ddeb2ac1e18ae98965c454b028bf312f7 100644 --- a/core/src/OCP/appconfig.js +++ b/core/src/OCP/appconfig.js @@ -43,7 +43,7 @@ function call(method, endpoint, options) { url: OC.linkToOCS('apps/provisioning_api/api/v1', 2) + 'config/apps' + endpoint, data: options.data || {}, success: options.success, - error: options.error + error: options.error, }) } @@ -79,7 +79,7 @@ export function getKeys(app, options) { export function getValue(app, key, defaultValue, options) { options = options || {} options.data = { - defaultValue: defaultValue + defaultValue: defaultValue, } call('get', '/' + app + '/' + key, options) @@ -97,7 +97,7 @@ export function getValue(app, key, defaultValue, options) { export function setValue(app, key, value, options) { options = options || {} options.data = { - value: value + value: value, } call('post', '/' + app + '/' + key, options) diff --git a/core/src/OCP/collaboration.js b/core/src/OCP/collaboration.js index 4eea517f3aa12f59ee8b952990e60c86700ee826..cfb307a0a3f2582a86054dea423ae44440f70708 100644 --- a/core/src/OCP/collaboration.js +++ b/core/src/OCP/collaboration.js @@ -30,7 +30,7 @@ /** * @type {TypeDefinition[]} **/ -let types = {} +const types = {} /** * Those translations will be used by the vue component but they should be shipped with the server @@ -47,7 +47,7 @@ export const l10nProjects = () => { t('core', 'Failed to create a project'), t('core', 'Failed to add the item to the project'), t('core', 'Connect items to a project to make them easier to find'), - t('core', 'Type to search for existing projects') + t('core', 'Type to search for existing projects'), ] } @@ -75,5 +75,5 @@ export default { getLink(type, id) { /* TODO: Allow action to be executed instead of href as well */ return typeof types[type] !== 'undefined' ? types[type].link(id) : '' - } + }, } diff --git a/core/src/OCP/index.js b/core/src/OCP/index.js index 3309e3fe047a6bbe21b41db5f105045009b92d0e..d8640b1ff0c8e0d671ffd8de7ef2c1f62823371a 100644 --- a/core/src/OCP/index.js +++ b/core/src/OCP/index.js @@ -18,9 +18,9 @@ export default { /** * @deprecated 18.0.0 add https://www.npmjs.com/package/@nextcloud/initial-state to your app */ - loadState + loadState, }, Loader, Toast, - WhatsNew + WhatsNew, } diff --git a/core/src/OCP/loader.js b/core/src/OCP/loader.js index 7f72c47ca64597a46383af8f62eb96d2efa7fbf2..293af9bbec26781164c4bfd48b68cdf291f7c0e1 100644 --- a/core/src/OCP/loader.js +++ b/core/src/OCP/loader.js @@ -20,8 +20,8 @@ * */ -let loadedScripts = {} -let loadedStylesheets = {} +const loadedScripts = {} +const loadedStylesheets = {} /** * @namespace OCP * @class Loader @@ -42,8 +42,8 @@ export default { } loadedScripts[key] = true return new Promise(function(resolve, reject) { - var scriptPath = OC.filePath(app, 'js', file) - var script = document.createElement('script') + const scriptPath = OC.filePath(app, 'js', file) + const script = document.createElement('script') script.src = scriptPath script.setAttribute('nonce', btoa(OC.requestToken)) script.onload = () => resolve() @@ -66,8 +66,8 @@ export default { } loadedStylesheets[key] = true return new Promise(function(resolve, reject) { - var stylePath = OC.filePath(app, 'css', file) - var link = document.createElement('link') + const stylePath = OC.filePath(app, 'css', file) + const link = document.createElement('link') link.href = stylePath link.type = 'text/css' link.rel = 'stylesheet' @@ -75,5 +75,5 @@ export default { link.onerror = () => reject(new Error(`Failed to load stylesheet from ${stylePath}`)) document.head.appendChild(link) }) - } + }, } diff --git a/core/src/OCP/toast.js b/core/src/OCP/toast.js index 58f98d93480cdc14414bb3e5be67713a8823a867..6bb3b1302877929aa8fa9bbe5153d18fa14dcdd2 100644 --- a/core/src/OCP/toast.js +++ b/core/src/OCP/toast.js @@ -27,7 +27,7 @@ const TOAST_TYPE_CLASES = { info: 'toast-info', warning: 'toast-warning', success: 'toast-success', - permanent: 'permanent' + permanent: 'permanent', } const Toast = { @@ -59,7 +59,7 @@ const Toast = { isHTML: false, type: undefined, close: true, - callback: () => {} + callback: () => {}, }) if (!options.isHTML) { text = $('<div/>').text(text).html() @@ -78,12 +78,12 @@ const Toast = { selector: !window.TESTING ? 'content' : 'testArea', positionLeft: false, backgroundColor: '', - className: 'toast ' + classes + className: 'toast ' + classes, }) toast.showToast() // add toastify object to the element for reference in legacy OC.Notification toast.toastElement.toastify = toast return toast - } + }, } export default Toast diff --git a/core/src/OCP/whatsnew.js b/core/src/OCP/whatsnew.js index c2935c5e78cc275c264a40930457b98639b4cae4..c0df8af7b3fba763a63874a0dd654829356aa3d6 100644 --- a/core/src/OCP/whatsnew.js +++ b/core/src/OCP/whatsnew.js @@ -14,14 +14,14 @@ import OC from '../OC/index' export function query(options) { options = options || {} - var dismissOptions = options.dismiss || {} + const dismissOptions = options.dismiss || {} $.ajax({ type: 'GET', url: options.url || OC.linkToOCS('core', 2) + 'whatsnew?format=json', success: options.success || function(data, statusText, xhr) { onQuerySuccess(data, statusText, xhr, dismissOptions) }, - error: options.error || onQueryError + error: options.error || onQueryError, }) } @@ -32,7 +32,7 @@ export function dismiss(version, options) { url: options.url || OC.linkToOCS('core', 2) + 'whatsnew', data: { version: encodeURIComponent(version) }, success: options.success || onDismissSuccess, - error: options.error || onDismissError + error: options.error || onDismissError, }) // remove element immediately $('.whatsNewPopover').remove() @@ -46,12 +46,12 @@ function onQuerySuccess(data, statusText, xhr, dismissOptions) { return } - var item, menuItem, text, icon + let item, menuItem, text, icon - var div = document.createElement('div') + const div = document.createElement('div') div.classList.add('popovermenu', 'open', 'whatsNewPopover', 'menu-left') - var list = document.createElement('ul') + const list = document.createElement('ul') // header item = document.createElement('li') @@ -74,8 +74,8 @@ function onQuerySuccess(data, statusText, xhr, dismissOptions) { list.appendChild(item) // Highlights - for (var i in data['ocs']['data']['whatsNew']['regular']) { - var whatsNewTextItem = data['ocs']['data']['whatsNew']['regular'][i] + for (const i in data['ocs']['data']['whatsNew']['regular']) { + const whatsNewTextItem = data['ocs']['data']['whatsNew']['regular'][i] item = document.createElement('li') menuItem = document.createElement('span') diff --git a/core/src/Polyfill/closest.js b/core/src/Polyfill/closest.js index 1c6086461279cda409bedc71a0369c5f47188a21..6af05d526a77ff00a16a4d23c5047172f3836259 100644 --- a/core/src/Polyfill/closest.js +++ b/core/src/Polyfill/closest.js @@ -8,7 +8,7 @@ if (!Element.prototype.matches) { if (!Element.prototype.closest) { Element.prototype.closest = function(s) { - var el = this + let el = this do { if (el.matches(s)) return el diff --git a/core/src/Polyfill/console.js b/core/src/Polyfill/console.js index faa32c457c6c5a79c6c093a411930b7db9b90c11..0d60fe6f20de499b05822ff96aad5d4b8aa73c6c 100644 --- a/core/src/Polyfill/console.js +++ b/core/src/Polyfill/console.js @@ -26,7 +26,7 @@ if (typeof console === 'undefined' || typeof console.log === 'undefined') { } const noOp = () => {} const methods = ['log', 'debug', 'warn', 'info', 'error', 'assert', 'time', 'timeEnd'] - for (var i = 0; i < methods.length; i++) { + for (let i = 0; i < methods.length; i++) { console[methods[i]] = noOp } } diff --git a/core/src/Util/human-file-size.js b/core/src/Util/human-file-size.js index 586ef0e92675001e1798315623dd431b9228cf71..7f9eb7ab61df447b957303bc4eb318ff332bfd80 100644 --- a/core/src/Util/human-file-size.js +++ b/core/src/Util/human-file-size.js @@ -26,13 +26,13 @@ * @returns {string} */ export default function humanFileSize(size, skipSmallSizes) { - var humanList = ['B', 'KB', 'MB', 'GB', 'TB'] + const humanList = ['B', 'KB', 'MB', 'GB', 'TB'] // Calculate Log with base 1024: size = 1024 ** order - var order = size > 0 ? Math.floor(Math.log(size) / Math.log(1024)) : 0 + let order = size > 0 ? Math.floor(Math.log(size) / Math.log(1024)) : 0 // Stay in range of the byte sizes that are defined order = Math.min(humanList.length - 1, order) - var readableFormat = humanList[order] - var relativeSize = (size / Math.pow(1024, order)).toFixed(1) + const readableFormat = humanList[order] + let relativeSize = (size / Math.pow(1024, order)).toFixed(1) if (skipSmallSizes === true && order === 0) { if (relativeSize !== '0.0') { return '< 1 KB' diff --git a/core/src/components/ContactsMenu.js b/core/src/components/ContactsMenu.js index 661b6d8e7c6b4e5c8bc4a33ecd97335ad91a985b..0791fe83b0c19f97c2463e39738a98f333050100 100644 --- a/core/src/components/ContactsMenu.js +++ b/core/src/components/ContactsMenu.js @@ -29,6 +29,6 @@ export const setUp = () => { // eslint-disable-next-line no-new new OC.ContactsMenu({ el: $('#contactsmenu .menu'), - trigger: $('#contactsmenu .menutoggle') + trigger: $('#contactsmenu .menutoggle'), }) } diff --git a/core/src/components/login/LoginForm.vue b/core/src/components/login/LoginForm.vue index 32821f37ed6de01d6bdb7cc38959e8380ec44007..687896ceb5475ab8de2f2ee1cec2854d6d492496 100644 --- a/core/src/components/login/LoginForm.vue +++ b/core/src/components/login/LoginForm.vue @@ -141,34 +141,34 @@ export default { props: { username: { type: String, - default: '' + default: '', }, redirectUrl: { - type: String + type: String, }, errors: { type: Array, - default: () => [] + default: () => [], }, messages: { type: Array, - default: () => [] + default: () => [], }, throttleDelay: { - type: Number + type: Number, }, invertedColors: { type: Boolean, - default: false + default: false, }, autoCompleteAllowed: { type: Boolean, - default: true + default: true, }, directLogin: { type: Boolean, - default: false - } + default: false, + }, }, data() { return { @@ -177,7 +177,7 @@ export default { timezoneOffset: (-new Date().getTimezoneOffset() / 60), user: this.username, password: '', - passwordInputType: 'password' + passwordInputType: 'password', } }, computed: { @@ -192,7 +192,7 @@ export default { }, userDisabled() { return this.errors.indexOf('userdisabled') !== -1 - } + }, }, mounted() { if (this.username === '') { @@ -215,8 +215,8 @@ export default { submit() { this.loading = true this.$emit('submit') - } - } + }, + }, } </script> diff --git a/core/src/components/login/ResetPassword.vue b/core/src/components/login/ResetPassword.vue index 829320eec8561ae3f9a0174b2f1d322f3c19657e..3a6d49a9025ee3ba9e8a4501ec45b1faaad69435 100644 --- a/core/src/components/login/ResetPassword.vue +++ b/core/src/components/login/ResetPassword.vue @@ -82,29 +82,29 @@ export default { props: { username: { type: String, - required: true + required: true, }, resetPasswordLink: { type: String, - required: true + required: true, }, invertedColors: { type: Boolean, - default: false - } + default: false, + }, }, data() { return { error: false, loading: false, message: undefined, - user: this.username + user: this.username, } }, watch: { username(value) { this.user = value - } + }, }, methods: { updateUsername() { @@ -117,7 +117,7 @@ export default { const url = generateUrl('/lostpassword/email') const data = { - user: this.user + user: this.user, } return axios.post(url, data) @@ -136,8 +136,8 @@ export default { this.message = 'send-error' }) .then(() => { this.loading = false }) - } - } + }, + }, } </script> diff --git a/core/src/components/login/UpdatePassword.vue b/core/src/components/login/UpdatePassword.vue index 0da2221c4c022e84a5c696125a5781df98b4b420..3fa3c60773cdba67e3462256a7a4c8c9b3963f79 100644 --- a/core/src/components/login/UpdatePassword.vue +++ b/core/src/components/login/UpdatePassword.vue @@ -74,16 +74,16 @@ export default { props: { username: { type: String, - required: true + required: true, }, resetPasswordTarget: { type: String, - required: true + required: true, }, invertedColors: { type: Boolean, - default: false - } + default: false, + }, }, data() { return { @@ -93,13 +93,13 @@ export default { user: this.username, password: '', encrypted: false, - proceed: false + proceed: false, } }, watch: { username(value) { this.user = value - } + }, }, methods: { async submit() { @@ -110,7 +110,7 @@ export default { try { const { data } = await Axios.post(this.resetPasswordTarget, { password: this.password, - proceed: this.proceed + proceed: this.proceed, }) if (data && data.status === 'success') { this.message = 'send-success' @@ -129,8 +129,8 @@ export default { } finally { this.loading = false } - } - } + }, + }, } </script> diff --git a/core/src/components/setup/RecommendedApps.vue b/core/src/components/setup/RecommendedApps.vue index 5dfe6fb4d278839482252c1e250385c2e7ea59c3..79c3aae9e6af0ce2311131b67cd0b84c502308d5 100644 --- a/core/src/components/setup/RecommendedApps.vue +++ b/core/src/components/setup/RecommendedApps.vue @@ -51,7 +51,9 @@ </p> </div> </div> - <p class="text-center"><a :href="defaultPageUrl">{{ t('core', 'Cancel') }}</a></p> + <p class="text-center"> + <a :href="defaultPageUrl">{{ t('core', 'Cancel') }}</a> + </p> </div> </template> @@ -67,19 +69,19 @@ import logger from '../../logger' const recommended = { calendar: { description: t('core', 'Schedule work & meetings, synced with all your devices.'), - icon: imagePath('core', 'places/calendar.svg') + icon: imagePath('core', 'places/calendar.svg'), }, contacts: { description: t('core', 'Keep your colleagues and friends in one place without leaking their private info.'), - icon: imagePath('core', 'places/contacts.svg') + icon: imagePath('core', 'places/contacts.svg'), }, mail: { description: t('core', 'Simple email app nicely integrated with Files, Contacts and Calendar.'), - icon: imagePath('core', 'actions/mail.svg') + icon: imagePath('core', 'actions/mail.svg'), }, talk: { - description: t('core', 'Screensharing, online meetings and web conferencing – on desktop and with mobile apps.') - } + description: t('core', 'Screensharing, online meetings and web conferencing – on desktop and with mobile apps.'), + }, } const recommendedIds = Object.keys(recommended) const defaultPageUrl = loadState('core', 'defaultPageUrl') @@ -91,13 +93,13 @@ export default { loadingApps: true, loadingAppsError: false, apps: [], - defaultPageUrl + defaultPageUrl, } }, computed: { recommendedApps() { return this.apps.filter(app => recommendedIds.includes(app.id)) - } + }, }, mounted() { return axios.get(generateUrl('settings/apps/list')) @@ -159,8 +161,8 @@ export default { return '' } return recommended[appId].description - } - } + }, + }, } </script> diff --git a/core/src/globals.js b/core/src/globals.js index cd8dcc5e2418452b77655636871ad10d75c115ee..e6930cd3dbc09b837356b2c2b1a7e43d8abb1454 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -99,7 +99,7 @@ const setDeprecatedProp = (global, cb, msg) => { } return cb() - } + }, }) } diff --git a/core/src/init.js b/core/src/init.js index ee232e8fdbf4fec59e5cb32116a8aa776095d50e..f0102fdde40328fe666e3fbf15ef41760b33f782 100644 --- a/core/src/init.js +++ b/core/src/init.js @@ -127,7 +127,7 @@ export const initCore = () => { watch: true, // set edge < 16 as incompatible onlyLegacy: !(/Edge\/([0-9]{2})\./i.test(navigator.userAgent) - && parseInt(/Edge\/([0-9]{2})\./i.exec(navigator.userAgent)[1]) < 16) + && parseInt(/Edge\/([0-9]{2})\./i.exec(navigator.userAgent)[1]) < 16), }) } @@ -212,7 +212,7 @@ export const initCore = () => { element: document.getElementById('app-content'), disable: 'right', maxPosition: 300, // $navigation-width - minDragDistance: 100 + minDragDistance: 100, }) $('#app-content').prepend('<div id="app-navigation-toggle" class="icon-menu" style="display:none" tabindex="0"></div>') diff --git a/core/src/jquery/avatar.js b/core/src/jquery/avatar.js index eaedce1461b22d4b101aaa9973278dcdfc0bac09..24cef392d34cfaa055be1262563a61584863aa4f 100644 --- a/core/src/jquery/avatar.js +++ b/core/src/jquery/avatar.js @@ -65,7 +65,7 @@ import OC from '../OC' */ $.fn.avatar = function(user, size, ie8fix, hidedefault, callback, displayname) { - var setAvatarForUnknownUser = function(target) { + const setAvatarForUnknownUser = function(target) { target.imageplaceholder('?') target.css('background-color', '#b9b9b9') } @@ -102,8 +102,8 @@ $.fn.avatar = function(user, size, ie8fix, hidedefault, callback, displayname) { // sanitize user = String(user).replace(/\//g, '') - var $div = this - var url + const $div = this + let url // If this is our own avatar we have to use the version attribute if (user === OC.getCurrentUser().uid) { @@ -112,18 +112,18 @@ $.fn.avatar = function(user, size, ie8fix, hidedefault, callback, displayname) { { user: user, size: Math.ceil(size * window.devicePixelRatio), - version: oc_userconfig.avatar.version + version: oc_userconfig.avatar.version, }) } else { url = OC.generateUrl( '/avatar/{user}/{size}', { user: user, - size: Math.ceil(size * window.devicePixelRatio) + size: Math.ceil(size * window.devicePixelRatio), }) } - var img = new Image() + const img = new Image() // If the new image loads successfully set it. img.onload = function() { diff --git a/core/src/jquery/contactsmenu.js b/core/src/jquery/contactsmenu.js index 389c8809be0189fc403ac1d486d2d61b9e50f78f..ee708dcf982fd6bd85570b61f7a20f71f9cdd804 100644 --- a/core/src/jquery/contactsmenu.js +++ b/core/src/jquery/contactsmenu.js @@ -38,14 +38,14 @@ const entryTemplate = require('./contactsmenu/jquery_entry.handlebars') $.fn.contactsMenu = function(shareWith, shareType, appendTo) { // 0 - user, 4 - email, 6 - remote - var allowedTypes = [0, 4, 6] + const allowedTypes = [0, 4, 6] if (allowedTypes.indexOf(shareType) === -1) { return } - var $div = this + const $div = this appendTo.append(LIST) - var $list = appendTo.find('div.contactsmenu-popover') + const $list = appendTo.find('div.contactsmenu-popover') $div.click(function() { if (!$list.hasClass('hidden')) { @@ -66,46 +66,46 @@ $.fn.contactsMenu = function(shareWith, shareType, appendTo) { method: 'POST', data: { shareType: shareType, - shareWith: shareWith - } + shareWith: shareWith, + }, }).then(function(data) { $list.find('ul').find('li').addClass('hidden') - var actions + let actions if (!data.topAction) { actions = [{ hyperlink: '#', - title: t('core', 'No action available') + title: t('core', 'No action available'), }] } else { actions = [data.topAction].concat(data.actions) } actions.forEach(function(action) { - var template = entryTemplate + const template = entryTemplate $list.find('ul').append(template(action)) }) }, function(jqXHR) { $list.find('ul').find('li').addClass('hidden') - var title + let title if (jqXHR.status === 404) { title = t('core', 'No action available') } else { title = t('core', 'Error fetching contact actions') } - var template = entryTemplate + const template = entryTemplate $list.find('ul').append(template({ hyperlink: '#', - title: title + title: title, })) }) }) $(document).click(function(event) { - var clickedList = ($list.has(event.target).length > 0) - var clickedTarget = ($div.has(event.target).length > 0) + const clickedList = ($list.has(event.target).length > 0) + let clickedTarget = ($div.has(event.target).length > 0) $div.each(function() { if ($(this).is(event.target)) { diff --git a/core/src/jquery/index.js b/core/src/jquery/index.js index d131ae5245a80de9f58e80a15b9ce3d9ab0b239b..c0145cb948f598115ea241cfeb098072b33b704c 100644 --- a/core/src/jquery/index.js +++ b/core/src/jquery/index.js @@ -48,8 +48,8 @@ import './css/jquery.ocdialog.scss' */ $.ajaxSetup({ contents: { - script: false - } + script: false, + }, }) /** diff --git a/core/src/jquery/ocdialog.js b/core/src/jquery/ocdialog.js index 68384311531ab0f1dc2208b6968d805ba22e70df..518a28f75d313537151bfde288c0161ec4c1767c 100644 --- a/core/src/jquery/ocdialog.js +++ b/core/src/jquery/ocdialog.js @@ -27,15 +27,15 @@ $.widget('oc.ocdialog', { height: 'auto', closeButton: true, closeOnEscape: true, - modal: false + modal: false, }, _create: function() { - var self = this + const self = this this.originalCss = { display: this.element[0].style.display, width: this.element[0].style.width, - height: this.element[0].style.height + height: this.element[0].style.height, } this.originalTitle = this.element.attr('title') @@ -45,7 +45,7 @@ $.widget('oc.ocdialog', { .attr({ // Setting tabIndex makes the div focusable tabIndex: -1, - role: 'dialog' + role: 'dialog', }) .insertBefore(this.element) this.$dialog.append(this.element.detach()) @@ -53,7 +53,7 @@ $.widget('oc.ocdialog', { this.$dialog.css({ display: 'inline-block', - position: 'fixed' + position: 'fixed', }) this.enterCallback = null @@ -92,7 +92,7 @@ $.widget('oc.ocdialog', { self.$buttonrow && self.$buttonrow.find($(event.target)).length === 0 ) { - var $button = self.$buttonrow.find('button.primary') + const $button = self.$buttonrow.find('button.primary') if ($button && !$button.prop('disabled')) { $button.trigger('click') } @@ -111,13 +111,13 @@ $.widget('oc.ocdialog', { this._trigger('open') }, _setOption: function(key, value) { - var self = this + const self = this switch (key) { case 'title': if (this.$title) { this.$title.text(value) } else { - var $title = $('<h2 class="oc-dialog-title">' + const $title = $('<h2 class="oc-dialog-title">' + value + '</h2>') this.$title = $title.prependTo(this.$dialog) @@ -128,7 +128,7 @@ $.widget('oc.ocdialog', { if (this.$buttonrow) { this.$buttonrow.empty() } else { - var $buttonrow = $('<div class="oc-dialog-buttonrow" />') + const $buttonrow = $('<div class="oc-dialog-buttonrow" />') this.$buttonrow = $buttonrow.appendTo(this.$dialog) } if (value.length === 1) { @@ -139,7 +139,7 @@ $.widget('oc.ocdialog', { this.$buttonrow.addClass('threebuttons') } $.each(value, function(idx, val) { - var $button = $('<button>').text(val.text) + const $button = $('<button>').text(val.text) if (val.classes) { $button.addClass(val.classes) } @@ -166,7 +166,7 @@ $.widget('oc.ocdialog', { break case 'closeButton': if (value) { - var $closeButton = $('<a class="oc-dialog-close"></a>') + const $closeButton = $('<a class="oc-dialog-close"></a>') this.$dialog.prepend($closeButton) $closeButton.on('click', function() { self.close() @@ -193,7 +193,7 @@ $.widget('oc.ocdialog', { $.Widget.prototype._setOptions.apply(this, arguments) }, _setSizes: function() { - var lessHeight = 0 + let lessHeight = 0 if (this.$title) { lessHeight += this.$title.outerHeight(true) } @@ -201,7 +201,7 @@ $.widget('oc.ocdialog', { lessHeight += this.$buttonrow.outerHeight(true) } this.element.css({ - 'height': 'calc(100% - ' + lessHeight + 'px)' + 'height': 'calc(100% - ' + lessHeight + 'px)', }) }, _createOverlay: function() { @@ -209,7 +209,7 @@ $.widget('oc.ocdialog', { return } - var self = this + const self = this this.overlay = $('<div>') .addClass('oc-dialog-dim') .appendTo($('#content')) @@ -243,7 +243,7 @@ $.widget('oc.ocdialog', { }, close: function() { this._destroyOverlay() - var self = this + const self = this // Ugly hack to catch remaining keyup events. setTimeout(function() { self._trigger('close', self) @@ -266,5 +266,5 @@ $.widget('oc.ocdialog', { this.element.removeClass('oc-dialog-content') .css(this.originalCss).detach().insertBefore(this.$dialog) this.$dialog.remove() - } + }, }) diff --git a/core/src/jquery/octemplate.js b/core/src/jquery/octemplate.js index a8502b7b79657fede276a1a15fe1d766703ac1a5..27b2dff970b79a541c1ac5074986815abc274e1d 100644 --- a/core/src/jquery/octemplate.js +++ b/core/src/jquery/octemplate.js @@ -62,27 +62,27 @@ const Template = { this.options = $.extend({}, this.options, options) this.elem = elem - var self = this + const self = this if (typeof this.options.escapeFunction === 'function') { - var keys = Object.keys(this.vars) - for (var key = 0; key < keys.length; key++) { + const keys = Object.keys(this.vars) + for (let key = 0; key < keys.length; key++) { if (typeof this.vars[keys[key]] === 'string') { this.vars[keys[key]] = self.options.escapeFunction(this.vars[keys[key]]) } } } - var _html = this._build(this.vars) + const _html = this._build(this.vars) return $(_html) }, // From stackoverflow.com/questions/1408289/best-way-to-do-variable-interpolation-in-javascript _build: function(o) { - var data = this.elem.attr('type') === 'text/template' ? this.elem.html() : this.elem.get(0).outerHTML + const data = this.elem.attr('type') === 'text/template' ? this.elem.html() : this.elem.get(0).outerHTML try { return data.replace(/{([^{}]*)}/g, function(a, b) { - var r = o[b] + const r = o[b] return typeof r === 'string' || typeof r === 'number' ? r : a } ) @@ -91,14 +91,14 @@ const Template = { } }, options: { - escapeFunction: escapeHTML - } + escapeFunction: escapeHTML, + }, } $.fn.octemplate = function(vars, options) { vars = vars || {} if (this.length) { - var _template = Object.create(Template) + const _template = Object.create(Template) return _template.init(vars, options, this) } } diff --git a/core/src/jquery/selectrange.js b/core/src/jquery/selectrange.js index b53bac4fc02cbca9621a2945ae62b370d6ea0016..3076726024a7de50141bb944c63b8c37ea2b6b82 100644 --- a/core/src/jquery/selectrange.js +++ b/core/src/jquery/selectrange.js @@ -34,7 +34,7 @@ $.fn.selectRange = function(start, end) { this.focus() this.setSelectionRange(start, end) } else if (this.createTextRange) { - var range = this.createTextRange() + const range = this.createTextRange() range.collapse(true) range.moveEnd('character', end) range.moveStart('character', start) diff --git a/core/src/jquery/showpassword.js b/core/src/jquery/showpassword.js index a9857f4d6d4860d17a7e42ff013c456de3f57711..393ecac08b522dfd89669c4640518dab03323873 100644 --- a/core/src/jquery/showpassword.js +++ b/core/src/jquery/showpassword.js @@ -39,15 +39,15 @@ $.fn.extend({ showPassword: function(c) { // Setup callback object - var callback = { 'fn': null, 'args': {} } + const callback = { 'fn': null, 'args': {} } callback.fn = c // Clones passwords and turn the clones into text inputs - var cloneElement = function(element) { + const cloneElement = function(element) { - var $element = $(element) + const $element = $(element) - var $clone = $('<input />') + const $clone = $('<input />') // Name added for JQuery Validation compatibility // Element name is required to avoid script warning. @@ -58,7 +58,7 @@ $.fn.extend({ 'size': $element.attr('size'), 'name': $element.attr('name') + '-clone', 'tabindex': $element.attr('tabindex'), - 'autocomplete': 'off' + 'autocomplete': 'off', }) if ($element.attr('placeholder') !== undefined) { @@ -70,12 +70,12 @@ $.fn.extend({ } // Transfers values between two elements - var update = function(a, b) { + const update = function(a, b) { b.val(a.val()) } // Shows a or b depending on checkbox - var setState = function(checkbox, a, b) { + const setState = function(checkbox, a, b) { if (checkbox.is(':checked')) { update(a, b) @@ -91,11 +91,11 @@ $.fn.extend({ return this.each(function() { - var $input = $(this) - var $checkbox = $($input.data('typetoggle')) + const $input = $(this) + const $checkbox = $($input.data('typetoggle')) // Create clone - var $clone = cloneElement($input) + const $clone = cloneElement($input) $clone.insertAfter($input) // Set callback arguments @@ -144,5 +144,5 @@ $.fn.extend({ } }) - } + }, }) diff --git a/core/src/jquery/tipsy.js b/core/src/jquery/tipsy.js index 75e90b1c060ae51a2a3c94cb2c8f837078d22eb3..0ae6ec83af07b3b1e8fb26b60338279c28c1396b 100644 --- a/core/src/jquery/tipsy.js +++ b/core/src/jquery/tipsy.js @@ -32,12 +32,12 @@ $.fn.tipsy = function(argument) { if (typeof argument === 'object' && argument !== null) { // tipsy defaults - var options = { + const options = { placement: 'bottom', delay: { 'show': 0, 'hide': 0 }, trigger: 'hover', html: false, - container: 'body' + container: 'body', } if (argument.gravity) { switch (argument.gravity) { diff --git a/core/src/jquery/ui-fixes.js b/core/src/jquery/ui-fixes.js index fb5ce4d7ba8a80874fa6c69e93ca1964c6fb7b1f..d70c5579f947fce9030ed700c8d92b7ef8efdfb6 100644 --- a/core/src/jquery/ui-fixes.js +++ b/core/src/jquery/ui-fixes.js @@ -3,6 +3,6 @@ import $ from 'jquery' // Set autocomplete width the same as the related input // See http://stackoverflow.com/a/11845718 $.ui.autocomplete.prototype._resizeMenu = function() { - var ul = this.menu.element + const ul = this.menu.element ul.outerWidth(this.element.outerWidth()) } diff --git a/core/src/login.js b/core/src/login.js index 4624a60965159c663c33e755bd0150f5587bb8e4..7270442c83e1f9ff7dda9c9b6bacfa889506e48e 100644 --- a/core/src/login.js +++ b/core/src/login.js @@ -63,6 +63,6 @@ new View({ autoCompleteAllowed: fromStateOr('loginAutocomplete', true), resetPasswordTarget: fromStateOr('resetPasswordTarget', ''), resetPasswordUser: fromStateOr('resetPasswordUser', ''), - directLogin: query.direct === '1' - } + directLogin: query.direct === '1', + }, }).$mount('#login') diff --git a/core/src/mixins/Nextcloud.js b/core/src/mixins/Nextcloud.js index 53c30b297cec307c9f117ded9e00ffdf69e7c84e..3ca755b3052a2effcaa1f8df74858f32682da836 100644 --- a/core/src/mixins/Nextcloud.js +++ b/core/src/mixins/Nextcloud.js @@ -25,11 +25,11 @@ import OC from '../OC/index' export default { data() { return { - OC + OC, } }, methods: { t: L10n.translate.bind(L10n), - n: L10n.translatePlural.bind(L10n) - } + n: L10n.translatePlural.bind(L10n), + }, } diff --git a/core/src/recommendedapps.js b/core/src/recommendedapps.js index ac0afb99daa866df67ccd7052dfb39a2184cf262..aea105a84222b2e2211ad141f4dc47fd4a200ae9 100644 --- a/core/src/recommendedapps.js +++ b/core/src/recommendedapps.js @@ -34,8 +34,8 @@ __webpack_public_path__ = generateFilePath('core', '', 'js/') Vue.mixin({ methods: { - t - } + t, + }, }) const View = Vue.extend(RecommendedApps) diff --git a/core/src/views/Login.vue b/core/src/views/Login.vue index c7958aac15b58a7864e3b13050dd8505b703b2fa..410638497a01b687a9d84f6148dc75c9ec480cb4 100644 --- a/core/src/views/Login.vue +++ b/core/src/views/Login.vue @@ -77,62 +77,62 @@ export default { components: { LoginForm, ResetPassword, - UpdatePassword + UpdatePassword, }, props: { username: { type: String, - default: '' + default: '', }, redirectUrl: { - type: String + type: String, }, errors: { type: Array, - default: () => [] + default: () => [], }, messages: { type: Array, - default: () => [] + default: () => [], }, throttleDelay: { - type: Number + type: Number, }, canResetPassword: { type: Boolean, - default: false + default: false, }, resetPasswordLink: { - type: String + type: String, }, resetPasswordTarget: { - type: String + type: String, }, invertedColors: { type: Boolean, - default: false + default: false, }, autoCompleteAllowed: { type: Boolean, - default: true + default: true, }, directLogin: { type: Boolean, - default: false - } + default: false, + }, }, data() { return { loading: false, user: this.username, - resetPassword: false + resetPassword: false, } }, methods: { passwordResetFinished() { this.resetPasswordTarget = '' - } - } + }, + }, } </script> diff --git a/package-lock.json b/package-lock.json index 4d1306b07f0850cb0a9bd44e0b8aef0649dbb4e1..ed232f9e8625fdef3cf78f022f45307e58f4403c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4240,9 +4240,9 @@ } }, "eslint-config-nextcloud": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/eslint-config-nextcloud/-/eslint-config-nextcloud-0.0.6.tgz", - "integrity": "sha512-ktCzXVA8GrqZVljutkBKOq2hgKvzKyLhNCAB5bCjdmMo7DIky2ZYeMtDmiEUZCPoXbSJY0kyvnZPbcN4VYzyCg==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-nextcloud/-/eslint-config-nextcloud-0.1.0.tgz", + "integrity": "sha512-qaxA/OZzfa4G4JQt0UGNs8uJcKsln7UM71R2vdiSpcgKW5hJ6tqtPP7RExS+4osBOl7ntiXihg9bj7PUwqsNaA==", "dev": true }, "eslint-config-standard": { diff --git a/package.json b/package.json index 234fd630ca74dcc35f824c6d0b509267f440c861..a8b89dbf9325e378c577b2a5ca5f40179d28db43 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", "css-loader": "^3.3.2", "eslint": "^5.16.0", - "eslint-config-nextcloud": "0.0.6", + "eslint-config-nextcloud": "0.1.0", "eslint-config-standard": "^12.0.0", "eslint-loader": "^3.0.3", "eslint-plugin-import": "^2.19.1",