diff --git a/.eslintrc.js b/.eslintrc.js
index deae31d24c3fe..4a47bcb571742 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -16,5 +16,9 @@ module.exports = {
// TODO: make sure we fix this as this is bad vue coding style.
// Use proper sync modifier
'vue/no-mutating-props': 'warn',
+ 'vue/custom-event-name-casing': ['error', 'kebab-case', {
+ // allows custom xxxx:xxx events formats
+ ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'],
+ }],
},
}
diff --git a/apps/comments/src/components/Comment.vue b/apps/comments/src/components/Comment.vue
index feeb32441cfe2..5bab02262aa61 100644
--- a/apps/comments/src/components/Comment.vue
+++ b/apps/comments/src/components/Comment.vue
@@ -166,7 +166,8 @@ export default {
/**
* Is the current user the author of this comment
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isOwnComment() {
return getCurrentUser().uid === this.actorId
@@ -174,7 +175,8 @@ export default {
/**
* Rendered content as html string
- * @returns {string}
+ *
+ * @return {string}
*/
renderedContent() {
if (this.isEmptyMessage) {
@@ -208,6 +210,7 @@ export default {
methods: {
/**
* Update local Message on outer change
+ *
* @param {string} message the message to set
*/
updateLocalMessage(message) {
diff --git a/apps/comments/src/services/CommentsInstance.js b/apps/comments/src/services/CommentsInstance.js
index bf0199fe7534a..9aac3e6c69e0e 100644
--- a/apps/comments/src/services/CommentsInstance.js
+++ b/apps/comments/src/services/CommentsInstance.js
@@ -49,7 +49,7 @@ export default class CommentInstance {
* Initialize a new Comments instance for the desired type
*
* @param {string} commentsType the comments endpoint type
- * @param {Object} options the vue options (propsData, parent, el...)
+ * @param {object} options the vue options (propsData, parent, el...)
*/
constructor(commentsType = 'files', options) {
// Add comments type as a global mixin
diff --git a/apps/comments/src/services/GetComments.js b/apps/comments/src/services/GetComments.js
index b6b2db5721790..bfce1bf9f9b73 100644
--- a/apps/comments/src/services/GetComments.js
+++ b/apps/comments/src/services/GetComments.js
@@ -28,11 +28,11 @@ export const DEFAULT_LIMIT = 20
/**
* Retrieve the comments list
*
- * @param {Object} data destructuring object
+ * @param {object} data destructuring object
* @param {string} data.commentsType the ressource type
* @param {number} data.ressourceId the ressource ID
- * @param {Object} [options] optional options for axios
- * @returns {Object[]} the comments list
+ * @param {object} [options] optional options for axios
+ * @return {object[]} the comments list
*/
export default async function({ commentsType, ressourceId }, options = {}) {
let response = null
@@ -64,6 +64,10 @@ export default async function({ commentsType, ressourceId }, options = {}) {
}
// https://github.com/perry-mitchell/webdav-client/blob/9de2da4a2599e06bd86c2778145b7ade39fe0b3c/source/interface/directoryContents.js#L32
+/**
+ * @param result
+ * @param isDetailed
+ */
function processMultistatus(result, isDetailed = false) {
// Extract the response items (directory contents)
const {
@@ -86,6 +90,10 @@ function processMultistatus(result, isDetailed = false) {
})
}
+/**
+ * @param value
+ * @param passes
+ */
function decodeHtmlEntities(value, passes = 1) {
const parser = new DOMParser()
let decoded = value
diff --git a/apps/comments/src/services/NewComment.js b/apps/comments/src/services/NewComment.js
index 8f54e18d26e10..6a242713696c3 100644
--- a/apps/comments/src/services/NewComment.js
+++ b/apps/comments/src/services/NewComment.js
@@ -31,7 +31,7 @@ import client from './DavClient'
* @param {string} commentsType the ressource type
* @param {number} ressourceId the ressource ID
* @param {string} message the message
- * @returns {Object} the new comment
+ * @return {object} the new comment
*/
export default async function(commentsType, ressourceId, message) {
const ressourcePath = ['', commentsType, ressourceId].join('/')
diff --git a/apps/comments/src/utils/cancelableRequest.js b/apps/comments/src/utils/cancelableRequest.js
index c678e42dae3ea..1b9b33c37dc6b 100644
--- a/apps/comments/src/utils/cancelableRequest.js
+++ b/apps/comments/src/utils/cancelableRequest.js
@@ -24,15 +24,16 @@ import axios from '@nextcloud/axios'
/**
* Create a cancel token
- * @returns {CancelTokenSource}
+ *
+ * @return {CancelTokenSource}
*/
const createCancelToken = () => axios.CancelToken.source()
/**
* Creates a cancelable axios 'request object'.
*
- * @param {function} request the axios promise request
- * @returns {Object}
+ * @param {Function} request the axios promise request
+ * @return {object}
*/
const cancelableRequest = function(request) {
/**
@@ -44,7 +45,7 @@ const cancelableRequest = function(request) {
* Execute the request
*
* @param {string} url the url to send the request to
- * @param {Object} [options] optional config for the request
+ * @param {object} [options] optional config for the request
*/
const fetch = async function(url, options) {
return request(
diff --git a/apps/comments/src/views/Comments.vue b/apps/comments/src/views/Comments.vue
index 53693fa891923..c101c2c5c39ca 100644
--- a/apps/comments/src/views/Comments.vue
+++ b/apps/comments/src/views/Comments.vue
@@ -126,7 +126,8 @@ export default {
methods: {
/**
* Update current ressourceId and fetch new data
- * @param {Number} ressourceId the current ressourceId (fileId...)
+ *
+ * @param {number} ressourceId the current ressourceId (fileId...)
*/
async update(ressourceId) {
this.ressourceId = ressourceId
@@ -152,8 +153,9 @@ export default {
/**
* Make sure we have all mentions as Array of objects
+ *
* @param {Array} mentions the mentions list
- * @returns {Object[]}
+ * @return {object[]}
*/
genMentionsData(mentions) {
const list = Object.values(mentions).flat()
@@ -217,6 +219,7 @@ export default {
/**
* Autocomplete @mentions
+ *
* @param {string} search the query
* @param {Function} callback the callback to process the results with
*/
@@ -235,7 +238,8 @@ export default {
/**
* Add newly created comment to the list
- * @param {Object} comment the new comment
+ *
+ * @param {object} comment the new comment
*/
onNewComment(comment) {
this.comments.unshift(comment)
@@ -243,6 +247,7 @@ export default {
/**
* Remove deleted comment from the list
+ *
* @param {number} id the deleted comment
*/
onDelete(id) {
diff --git a/apps/dashboard/src/App.vue b/apps/dashboard/src/App.vue
index d98f1ec1133f3..75e8e6c010827 100644
--- a/apps/dashboard/src/App.vue
+++ b/apps/dashboard/src/App.vue
@@ -266,7 +266,7 @@ export default {
* Method to register panels that will be called by the integrating apps
*
* @param {string} app The unique app id for the widget
- * @param {function} callback The callback function to register a panel which gets the DOM element passed as parameter
+ * @param {Function} callback The callback function to register a panel which gets the DOM element passed as parameter
*/
register(app, callback) {
Vue.set(this.callbacks, app, callback)
diff --git a/apps/dav/src/service/CalendarService.js b/apps/dav/src/service/CalendarService.js
index caac6874907b7..9de0d0b594604 100644
--- a/apps/dav/src/service/CalendarService.js
+++ b/apps/dav/src/service/CalendarService.js
@@ -25,6 +25,9 @@ import { parseXML } from 'webdav/dist/node/tools/dav'
import { getZoneString } from 'icalzone'
import { v4 as uuidv4 } from 'uuid'
+/**
+ *
+ */
export function getEmptySlots() {
return {
MO: [],
@@ -37,6 +40,9 @@ export function getEmptySlots() {
}
}
+/**
+ *
+ */
export async function findScheduleInboxAvailability() {
const client = getClient('calendars')
@@ -101,6 +107,10 @@ export async function findScheduleInboxAvailability() {
}
}
+/**
+ * @param slots
+ * @param timezoneId
+ */
export async function saveScheduleInboxAvailability(slots, timezoneId) {
const all = [...Object.keys(slots).flatMap(dayId => slots[dayId].map(slot => ({
...slot,
diff --git a/apps/dav/src/views/CalDavSettings.spec.js b/apps/dav/src/views/CalDavSettings.spec.js
index 3f9254a3010cb..0dc4c44537afe 100644
--- a/apps/dav/src/views/CalDavSettings.spec.js
+++ b/apps/dav/src/views/CalDavSettings.spec.js
@@ -31,7 +31,7 @@ describe('CalDavSettings', () => {
global.OCP = originalOCP
})
- test('interactions', async() => {
+ test('interactions', async () => {
const TLUtils = render(
CalDavSettings,
{
diff --git a/apps/files/src/components/TemplatePreview.vue b/apps/files/src/components/TemplatePreview.vue
index 89162ba4efdaf..ad152af9ea3b5 100644
--- a/apps/files/src/components/TemplatePreview.vue
+++ b/apps/files/src/components/TemplatePreview.vue
@@ -102,7 +102,8 @@ export default {
computed: {
/**
* Strip away extension from name
- * @returns {string}
+ *
+ * @return {string}
*/
nameWithoutExt() {
return this.basename.indexOf('.') > -1 ? this.basename.split('.').slice(0, -1).join('.') : this.basename
diff --git a/apps/files/src/models/Tab.js b/apps/files/src/models/Tab.js
index b425fc16b2dec..e2c3d9310240e 100644
--- a/apps/files/src/models/Tab.js
+++ b/apps/files/src/models/Tab.js
@@ -34,7 +34,7 @@ export default class Tab {
/**
* Create a new tab instance
*
- * @param {Object} options destructuring object
+ * @param {object} options destructuring object
* @param {string} options.id the unique id of this tab
* @param {string} options.name the translated tab name
* @param {string} options.icon the vue component
diff --git a/apps/files/src/services/FileInfo.js b/apps/files/src/services/FileInfo.js
index 33284df503293..a94436e16a54a 100644
--- a/apps/files/src/services/FileInfo.js
+++ b/apps/files/src/services/FileInfo.js
@@ -22,6 +22,9 @@
import axios from '@nextcloud/axios'
+/**
+ * @param url
+ */
export default async function(url) {
const response = await axios({
method: 'PROPFIND',
diff --git a/apps/files/src/services/Settings.js b/apps/files/src/services/Settings.js
index d07033891a51d..887a04005130d 100644
--- a/apps/files/src/services/Settings.js
+++ b/apps/files/src/services/Settings.js
@@ -34,7 +34,7 @@ export default class Settings {
*
* @since 19.0.0
* @param {OCA.Files.Settings.Setting} view element to add to settings
- * @returns {boolean} whether registering was successful
+ * @return {boolean} whether registering was successful
*/
register(view) {
if (this._settings.filter(e => e.name === view.name).length > 0) {
@@ -47,7 +47,8 @@ export default class Settings {
/**
* All settings elements
- * @returns {OCA.Files.Settings.Setting[]} All currently registered settings
+ *
+ * @return {OCA.Files.Settings.Setting[]} All currently registered settings
*/
get settings() {
return this._settings
diff --git a/apps/files/src/services/Sidebar.js b/apps/files/src/services/Sidebar.js
index c7b6ada2aeab9..6db1d5fa5e49c 100644
--- a/apps/files/src/services/Sidebar.js
+++ b/apps/files/src/services/Sidebar.js
@@ -41,7 +41,7 @@ export default class Sidebar {
*
* @readonly
* @memberof Sidebar
- * @returns {Object} the data state
+ * @return {object} the data state
*/
get state() {
return this._state
@@ -51,8 +51,8 @@ export default class Sidebar {
* Register a new tab view
*
* @memberof Sidebar
- * @param {Object} tab a new unregistered tab
- * @returns {Boolean}
+ * @param {object} tab a new unregistered tab
+ * @return {boolean}
*/
registerTab(tab) {
const hasDuplicate = this._state.tabs.findIndex(check => check.id === tab.id) > -1
@@ -78,7 +78,7 @@ export default class Sidebar {
* Return current opened file
*
* @memberof Sidebar
- * @returns {String} the current opened file
+ * @return {string} the current opened file
*/
get file() {
return this._state.file
diff --git a/apps/files/src/utils/davUtils.js b/apps/files/src/utils/davUtils.js
index b2a0bb2ebd88e..513821df4116f 100644
--- a/apps/files/src/utils/davUtils.js
+++ b/apps/files/src/utils/davUtils.js
@@ -41,7 +41,8 @@ export const getToken = function() {
/**
* Return the current directory, fallback to root
- * @returns {string}
+ *
+ * @return {string}
*/
export const getCurrentDirectory = function() {
const currentDirInfo = OCA?.Files?.App?.currentFileList?.dirInfo
diff --git a/apps/files/src/utils/fileUtils.js b/apps/files/src/utils/fileUtils.js
index 7b78a85dc0ea1..f37e939e1740c 100644
--- a/apps/files/src/utils/fileUtils.js
+++ b/apps/files/src/utils/fileUtils.js
@@ -34,8 +34,8 @@ const encodeFilePath = function(path) {
/**
* Extract dir and name from file path
*
- * @param {String} path the full path
- * @returns {String[]} [dirPath, fileName]
+ * @param {string} path the full path
+ * @return {string[]} [dirPath, fileName]
*/
const extractFilePaths = function(path) {
const pathSections = path.split('/')
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue
index efbcdc35134e2..ec41240e3f2c3 100644
--- a/apps/files/src/views/Sidebar.vue
+++ b/apps/files/src/views/Sidebar.vue
@@ -121,7 +121,8 @@ export default {
* Current filename
* This is bound to the Sidebar service and
* is used to load a new file
- * @returns {string}
+ *
+ * @return {string}
*/
file() {
return this.Sidebar.file
@@ -129,7 +130,8 @@ export default {
/**
* List of all the registered tabs
- * @returns {Array}
+ *
+ * @return {Array}
*/
tabs() {
return this.Sidebar.tabs
@@ -137,7 +139,8 @@ export default {
/**
* List of all the registered views
- * @returns {Array}
+ *
+ * @return {Array}
*/
views() {
return this.Sidebar.views
@@ -145,7 +148,8 @@ export default {
/**
* Current user dav root path
- * @returns {string}
+ *
+ * @return {string}
*/
davPath() {
const user = OC.getCurrentUser().uid
@@ -154,8 +158,9 @@ export default {
/**
* Current active tab handler
+ *
* @param {string} id the tab id to set as active
- * @returns {string} the current active tab
+ * @return {string} the current active tab
*/
activeTab() {
return this.Sidebar.activeTab
@@ -163,7 +168,8 @@ export default {
/**
* Sidebar subtitle
- * @returns {string}
+ *
+ * @return {string}
*/
subtitle() {
return `${this.size}, ${this.time}`
@@ -171,7 +177,8 @@ export default {
/**
* File last modified formatted string
- * @returns {string}
+ *
+ * @return {string}
*/
time() {
return OC.Util.relativeModifiedDate(this.fileInfo.mtime)
@@ -179,7 +186,8 @@ export default {
/**
* File last modified full string
- * @returns {string}
+ *
+ * @return {string}
*/
fullTime() {
return moment(this.fileInfo.mtime).format('LLL')
@@ -187,7 +195,8 @@ export default {
/**
* File size formatted string
- * @returns {string}
+ *
+ * @return {string}
*/
size() {
return OC.Util.humanFileSize(this.fileInfo.size)
@@ -195,7 +204,8 @@ export default {
/**
* File background/figure to illustrate the sidebar header
- * @returns {string}
+ *
+ * @return {string}
*/
background() {
return this.getPreviewIfAny(this.fileInfo)
@@ -204,7 +214,7 @@ export default {
/**
* App sidebar v-binding object
*
- * @returns {Object}
+ * @return {object}
*/
appSidebar() {
if (this.fileInfo) {
@@ -243,7 +253,7 @@ export default {
/**
* Default action object for the current file
*
- * @returns {Object}
+ * @return {object}
*/
defaultAction() {
return this.fileInfo
@@ -260,7 +270,7 @@ export default {
* nothing is listening for a click if there
* is no default action
*
- * @returns {string|null}
+ * @return {string|null}
*/
defaultActionListener() {
return this.defaultAction ? 'figure-click' : null
@@ -275,8 +285,8 @@ export default {
/**
* Can this tab be displayed ?
*
- * @param {Object} tab a registered tab
- * @returns {boolean}
+ * @param {object} tab a registered tab
+ * @return {boolean}
*/
canDisplay(tab) {
return tab.enabled(this.fileInfo)
@@ -302,8 +312,8 @@ export default {
* Copied from https://github.com/nextcloud/server/blob/16e0887ec63591113ee3f476e0c5129e20180cde/apps/files/js/filelist.js#L1377
* TODO: We also need this as a standalone library
*
- * @param {Object} fileInfo the fileinfo
- * @returns {string} Url to the icon for mimeType
+ * @param {object} fileInfo the fileinfo
+ * @return {string} Url to the icon for mimeType
*/
getIconUrl(fileInfo) {
const mimeType = fileInfo.mimetype || 'application/octet-stream'
@@ -341,7 +351,7 @@ export default {
* Toggle favourite state
* TODO: better implementation
*
- * @param {Boolean} state favourited or not
+ * @param {boolean} state favourited or not
*/
async toggleStarred(state) {
try {
@@ -397,7 +407,7 @@ export default {
* Open the sidebar for the given file
*
* @param {string} path the file path to load
- * @returns {Promise}
+ * @return {Promise}
* @throws {Error} loading failure
*/
async open(path) {
@@ -446,6 +456,7 @@ export default {
/**
* Allow to set the Sidebar as fullscreen from OCA.Files.Sidebar
+ *
* @param {boolean} isFullScreen - Wether or not to render the Sidebar in fullscreen.
*/
setFullScreenMode(isFullScreen) {
diff --git a/apps/files/src/views/TemplatePicker.vue b/apps/files/src/views/TemplatePicker.vue
index 7c866db8a586b..a4ceefeb1961b 100644
--- a/apps/files/src/views/TemplatePicker.vue
+++ b/apps/files/src/views/TemplatePicker.vue
@@ -109,7 +109,8 @@ export default {
computed: {
/**
* Strip away extension from name
- * @returns {string}
+ *
+ * @return {string}
*/
nameWithoutExt() {
return this.name.indexOf('.') > -1
@@ -133,7 +134,8 @@ export default {
/**
* Style css vars bin,d
- * @returns {Object}
+ *
+ * @return {object}
*/
style() {
return {
@@ -149,6 +151,7 @@ export default {
methods: {
/**
* Open the picker
+ *
* @param {string} name the file name to create
* @param {object} provider the template provider picked
*/
@@ -188,6 +191,7 @@ export default {
/**
* Manages the radio template picker change
+ *
* @param {number} fileid the selected template file id
*/
onCheck(fileid) {
diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue
index 8167172ceeae3..1c3d19605325d 100644
--- a/apps/files_sharing/src/components/SharingEntry.vue
+++ b/apps/files_sharing/src/components/SharingEntry.vue
@@ -233,7 +233,7 @@ export default {
/**
* Can the sharer set whether the sharee can edit the file ?
*
- * @returns {boolean}
+ * @return {boolean}
*/
canSetEdit() {
// If the owner revoked the permission after the resharer granted it
@@ -245,7 +245,7 @@ export default {
/**
* Can the sharer set whether the sharee can create the file ?
*
- * @returns {boolean}
+ * @return {boolean}
*/
canSetCreate() {
// If the owner revoked the permission after the resharer granted it
@@ -257,7 +257,7 @@ export default {
/**
* Can the sharer set whether the sharee can delete the file ?
*
- * @returns {boolean}
+ * @return {boolean}
*/
canSetDelete() {
// If the owner revoked the permission after the resharer granted it
@@ -269,7 +269,7 @@ export default {
/**
* Can the sharer set whether the sharee can reshare the file ?
*
- * @returns {boolean}
+ * @return {boolean}
*/
canSetReshare() {
// If the owner revoked the permission after the resharer granted it
@@ -338,7 +338,8 @@ export default {
/**
* Is the current share a folder ?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isFolder() {
return this.fileInfo.type === 'dir'
@@ -346,7 +347,8 @@ export default {
/**
* Does the current share have an expiration date
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
hasExpirationDate: {
get() {
@@ -372,7 +374,7 @@ export default {
},
/**
- * @returns {bool}
+ * @return {bool}
*/
hasStatus() {
if (this.share.type !== this.SHARE_TYPES.SHARE_TYPE_USER) {
diff --git a/apps/files_sharing/src/components/SharingEntryInternal.vue b/apps/files_sharing/src/components/SharingEntryInternal.vue
index af677eca8436e..e96a85340a60f 100644
--- a/apps/files_sharing/src/components/SharingEntryInternal.vue
+++ b/apps/files_sharing/src/components/SharingEntryInternal.vue
@@ -49,7 +49,8 @@ export default {
computed: {
/**
* Get the internal link to this file id
- * @returns {string}
+ *
+ * @return {string}
*/
internalLink() {
return window.location.protocol + '//' + window.location.host + generateUrl('/f/') + this.fileInfo.id
@@ -57,7 +58,8 @@ export default {
/**
* Clipboard v-tooltip message
- * @returns {string}
+ *
+ * @return {string}
*/
clipboardTooltip() {
if (this.copied) {
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index d860ee2080581..993a5e255214b 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -401,7 +401,8 @@ export default {
* Return the current share permissions
* We always ignore the SHARE permission as this is used for the
* federated sharing.
- * @returns {number}
+ *
+ * @return {number}
*/
sharePermissions() {
return this.share.permissions & ~OC.PERMISSION_SHARE
@@ -410,7 +411,8 @@ export default {
* Generate a unique random id for this SharingEntryLink only
* This allows ActionRadios to have the same name prop
* but not to impact others SharingEntryLink
- * @returns {string}
+ *
+ * @return {string}
*/
randomId() {
return Math.random().toString(27).substr(2)
@@ -418,7 +420,8 @@ export default {
/**
* Link share label
- * @returns {string}
+ *
+ * @return {string}
*/
title() {
// if we have a valid existing share (not pending)
@@ -453,7 +456,8 @@ export default {
/**
* Show the email on a second line if a label is set for mail shares
- * @returns {string}
+ *
+ * @return {string}
*/
subtitle() {
if (this.isEmailShareType
@@ -465,7 +469,8 @@ export default {
/**
* Does the current share have an expiration date
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
hasExpirationDate: {
get() {
@@ -491,7 +496,8 @@ export default {
/**
* Is the current share password protected ?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isPasswordProtected: {
get() {
@@ -507,7 +513,8 @@ export default {
/**
* Is Talk enabled?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isTalkEnabled() {
return OC.appswebroots.spreed !== undefined
@@ -515,7 +522,8 @@ export default {
/**
* Is it possible to protect the password by Talk?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isPasswordProtectedByTalkAvailable() {
return this.isPasswordProtected && this.isTalkEnabled
@@ -523,7 +531,8 @@ export default {
/**
* Is the current share password protected by Talk?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isPasswordProtectedByTalk: {
get() {
@@ -536,7 +545,8 @@ export default {
/**
* Is the current share an email share ?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isEmailShareType() {
return this.share
@@ -562,7 +572,8 @@ export default {
* Pending data.
* If the share still doesn't have an id, it is not synced
* Therefore this is still not valid and requires user input
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
pendingPassword() {
return this.config.enforcePasswordForPublicLink && this.share && !this.share.id
@@ -573,7 +584,8 @@ export default {
/**
* Can the recipient edit the file ?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
canUpdate: {
get() {
@@ -595,7 +607,8 @@ export default {
/**
* Is the current share a folder ?
* TODO: move to a proper FileInfo model?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
isFolder() {
return this.fileInfo.type === 'dir'
@@ -604,7 +617,8 @@ export default {
/**
* Does the current file/folder have create permissions
* TODO: move to a proper FileInfo model?
- * @returns {boolean}
+ *
+ * @return {boolean}
*/
fileHasCreatePermission() {
return !!(this.fileInfo.permissions & OC.PERMISSION_CREATE)
@@ -612,7 +626,8 @@ export default {
/**
* Return the public share link
- * @returns {string}
+ *
+ * @return {string}
*/
shareLink() {
return window.location.protocol + '//' + window.location.host + generateUrl('/s/') + this.share.token
@@ -620,7 +635,8 @@ export default {
/**
* Clipboard v-tooltip message
- * @returns {string}
+ *
+ * @return {string}
*/
clipboardTooltip() {
if (this.copied) {
@@ -633,8 +649,9 @@ export default {
/**
* External additionnai actions for the menu
+ *
* @deprecated use OCA.Sharing.ExternalShareActions
- * @returns {Array}
+ * @return {Array}
*/
externalLegacyLinkActions() {
return this.ExternalLegacyLinkActions.actions
@@ -642,7 +659,8 @@ export default {
/**
* Additional actions for the menu
- * @returns {Array}
+ *
+ * @return {Array}
*/
externalLinkActions() {
// filter only the registered actions for said link
@@ -795,6 +813,7 @@ export default {
/**
* On permissions change
+ *
* @param {Event} event js event
*/
togglePermissions(event) {
@@ -805,7 +824,8 @@ export default {
/**
* Label changed, let's save it to a different key
- * @param {String} label the share label
+ *
+ * @param {string} label the share label
*/
onLabelChange(label) {
this.$set(this.share, 'newLabel', label.trim())
@@ -847,6 +867,7 @@ export default {
* If both co-exists, the password have changed and
* we show it in plain text.
* Then on submit (or menu close), we sync it.
+ *
* @param {string} password the changed password
*/
onPasswordChange(password) {
diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue
index 9bc4e04e722c3..02c1f27f17309 100644
--- a/apps/files_sharing/src/components/SharingInput.vue
+++ b/apps/files_sharing/src/components/SharingInput.vue
@@ -114,7 +114,7 @@ export default {
* results into the autocomplete dropdown
* Used for the guests app
*
- * @returns {Array}
+ * @return {Array}
*/
externalResults() {
return this.ShareSearch.results
@@ -321,8 +321,8 @@ export default {
* Filter out existing shares from
* the provided shares search results
*
- * @param {Object[]} shares the array of shares object
- * @returns {Object[]}
+ * @param {object[]} shares the array of shares object
+ * @return {object[]}
*/
filterOutExistingShares(shares) {
return shares.reduce((arr, share) => {
@@ -376,8 +376,9 @@ export default {
/**
* Get the icon based on the share type
+ *
* @param {number} type the share type
- * @returns {string} the icon class
+ * @return {string} the icon class
*/
shareTypeToIcon(type) {
switch (type) {
@@ -406,8 +407,9 @@ export default {
/**
* Format shares for the multiselect options
- * @param {Object} result select entry item
- * @returns {Object}
+ *
+ * @param {object} result select entry item
+ * @return {object}
*/
formatForMultiselect(result) {
let subtitle
@@ -438,7 +440,8 @@ export default {
/**
* Process the new share request
- * @param {Object} value the multiselect option
+ *
+ * @param {object} value the multiselect option
*/
async addShare(value) {
if (value.lookup) {
diff --git a/apps/files_sharing/src/mixins/ShareRequests.js b/apps/files_sharing/src/mixins/ShareRequests.js
index ef45f9171b28f..960e418d0fcb9 100644
--- a/apps/files_sharing/src/mixins/ShareRequests.js
+++ b/apps/files_sharing/src/mixins/ShareRequests.js
@@ -40,7 +40,7 @@ export default {
/**
* Create a new share
*
- * @param {Object} data destructuring object
+ * @param {object} data destructuring object
* @param {string} data.path path to the file/folder which should be shared
* @param {number} data.shareType 0 = user; 1 = group; 3 = public link; 6 = federated cloud share
* @param {string} data.shareWith user/group id with which the file should be shared (optional for shareType > 1)
@@ -50,7 +50,7 @@ export default {
* @param {boolean} [data.sendPasswordByTalk=false] send the password via a talk conversation
* @param {string} [data.expireDate=''] expire the shareautomatically after
* @param {string} [data.label=''] custom label
- * @returns {Share} the new share
+ * @return {Share} the new share
* @throws {Error}
*/
async createShare({ path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label }) {
@@ -99,7 +99,7 @@ export default {
* Update a share
*
* @param {number} id share id
- * @param {Object} properties key-value object of the properties to update
+ * @param {object} properties key-value object of the properties to update
*/
async updateShare(id, properties) {
try {
diff --git a/apps/files_sharing/src/models/Share.js b/apps/files_sharing/src/models/Share.js
index 32d9a78e5f968..239eb8c947e32 100644
--- a/apps/files_sharing/src/models/Share.js
+++ b/apps/files_sharing/src/models/Share.js
@@ -32,7 +32,7 @@ export default class Share {
/**
* Create the share object
*
- * @param {Object} ocsData ocs request response
+ * @param {object} ocsData ocs request response
*/
constructor(ocsData) {
if (ocsData.ocs && ocsData.ocs.data && ocsData.ocs.data[0]) {
@@ -54,7 +54,7 @@ export default class Share {
* inject its watchers into the #share
* state and make the whole class reactive
*
- * @returns {Object} the share raw state
+ * @return {object} the share raw state
* @readonly
* @memberof Sidebar
*/
@@ -65,7 +65,7 @@ export default class Share {
/**
* get the share id
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Share
*/
@@ -76,7 +76,7 @@ export default class Share {
/**
* Get the share type
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Share
*/
@@ -88,7 +88,7 @@ export default class Share {
* Get the share permissions
* See OC.PERMISSION_* variables
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Share
*/
@@ -111,7 +111,7 @@ export default class Share {
/**
* Get the share owner uid
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -122,7 +122,7 @@ export default class Share {
/**
* Get the share owner's display name
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -134,7 +134,7 @@ export default class Share {
/**
* Get the share with entity uid
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -146,7 +146,7 @@ export default class Share {
* Get the share with entity display name
* fallback to its uid if none
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -159,7 +159,7 @@ export default class Share {
* Unique display name in case of multiple
* duplicates results with the same name.
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -171,7 +171,7 @@ export default class Share {
/**
* Get the share with entity link
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -182,7 +182,7 @@ export default class Share {
/**
* Get the share with avatar if any
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -194,7 +194,7 @@ export default class Share {
/**
* Get the shared item owner uid
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -206,7 +206,7 @@ export default class Share {
* Get the shared item display name
* fallback to its uid if none
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -219,7 +219,7 @@ export default class Share {
/**
* Get the share creation timestamp
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Share
*/
@@ -230,7 +230,7 @@ export default class Share {
/**
* Get the expiration date as a string format
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -253,7 +253,7 @@ export default class Share {
/**
* Get the public share token
*
- * @returns {string} the token
+ * @return {string} the token
* @readonly
* @memberof Share
*/
@@ -264,7 +264,7 @@ export default class Share {
/**
* Get the share note if any
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -286,7 +286,7 @@ export default class Share {
* Get the share label if any
* Should only exist on link shares
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -308,7 +308,7 @@ export default class Share {
/**
* Have a mail been sent
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -319,7 +319,7 @@ export default class Share {
/**
* Hide the download button on public page
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -340,7 +340,7 @@ export default class Share {
/**
* Password protection of the share
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -361,7 +361,7 @@ export default class Share {
/**
* Password protection by Talk of the share
*
- * @returns {Boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -372,7 +372,7 @@ export default class Share {
/**
* Password protection by Talk of the share
*
- * @param {Boolean} sendPasswordByTalk whether to send the password by Talk
+ * @param {boolean} sendPasswordByTalk whether to send the password by Talk
* or not
* @memberof Share
*/
@@ -384,7 +384,7 @@ export default class Share {
/**
* Get the shared item absolute full path
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -395,7 +395,7 @@ export default class Share {
/**
* Return the item type: file or folder
*
- * @returns {string} 'folder' or 'file'
+ * @return {string} 'folder' or 'file'
* @readonly
* @memberof Share
*/
@@ -406,7 +406,7 @@ export default class Share {
/**
* Get the shared item mimetype
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -417,7 +417,7 @@ export default class Share {
/**
* Get the shared item id
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Share
*/
@@ -430,7 +430,7 @@ export default class Share {
* e.g the file /xxx/aaa will be shared in
* the receiving root as /aaa, the fileTarget is /aaa
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -441,7 +441,7 @@ export default class Share {
/**
* Get the parent folder id if any
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Share
*/
@@ -454,7 +454,7 @@ export default class Share {
/**
* Does this share have READ permissions
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -465,7 +465,7 @@ export default class Share {
/**
* Does this share have CREATE permissions
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -476,7 +476,7 @@ export default class Share {
/**
* Does this share have DELETE permissions
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -487,7 +487,7 @@ export default class Share {
/**
* Does this share have UPDATE permissions
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -498,7 +498,7 @@ export default class Share {
/**
* Does this share have SHARE permissions
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -512,7 +512,7 @@ export default class Share {
/**
* Can the current user EDIT this share ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -523,7 +523,7 @@ export default class Share {
/**
* Can the current user DELETE this share ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Share
*/
@@ -533,7 +533,8 @@ export default class Share {
/**
* Top level accessible shared folder fileid for the current user
- * @returns {string}
+ *
+ * @return {string}
* @readonly
* @memberof Share
*/
@@ -543,7 +544,8 @@ export default class Share {
/**
* Top level accessible shared folder path for the current user
- * @returns {string}
+ *
+ * @return {string}
* @readonly
* @memberof Share
*/
diff --git a/apps/files_sharing/src/services/ConfigService.js b/apps/files_sharing/src/services/ConfigService.js
index 4c8326b157030..919c0db7b36ae 100644
--- a/apps/files_sharing/src/services/ConfigService.js
+++ b/apps/files_sharing/src/services/ConfigService.js
@@ -27,7 +27,7 @@ export default class Config {
/**
* Is public upload allowed on link shares ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -39,7 +39,7 @@ export default class Config {
/**
* Are link share allowed ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -51,7 +51,7 @@ export default class Config {
/**
* Get the federated sharing documentation link
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Config
*/
@@ -62,7 +62,7 @@ export default class Config {
/**
* Get the default link share expiration date as string
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Config
*/
@@ -80,7 +80,7 @@ export default class Config {
/**
* Get the default internal expiration date as string
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Config
*/
@@ -98,7 +98,7 @@ export default class Config {
/**
* Get the default remote expiration date as string
*
- * @returns {string}
+ * @return {string}
* @readonly
* @memberof Config
*/
@@ -116,7 +116,7 @@ export default class Config {
/**
* Are link shares password-enforced ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -127,7 +127,7 @@ export default class Config {
/**
* Is password asked by default on link shares ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -138,7 +138,7 @@ export default class Config {
/**
* Is link shares expiration enforced ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -149,7 +149,7 @@ export default class Config {
/**
* Is there a default expiration date for new link shares ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -160,7 +160,7 @@ export default class Config {
/**
* Is internal shares expiration enforced ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -171,7 +171,7 @@ export default class Config {
/**
* Is remote shares expiration enforced ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -182,7 +182,7 @@ export default class Config {
/**
* Is there a default expiration date for new internal shares ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -193,7 +193,7 @@ export default class Config {
/**
* Are users on this server allowed to send shares to other servers ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -204,7 +204,7 @@ export default class Config {
/**
* Is sharing my mail (link share) enabled ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -219,7 +219,7 @@ export default class Config {
/**
* Get the default days to link shares expiration
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Config
*/
@@ -230,7 +230,7 @@ export default class Config {
/**
* Get the default days to internal shares expiration
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Config
*/
@@ -241,7 +241,7 @@ export default class Config {
/**
* Get the default days to remote shares expiration
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Config
*/
@@ -252,7 +252,7 @@ export default class Config {
/**
* Is resharing allowed ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -263,7 +263,7 @@ export default class Config {
/**
* Is password enforced for mail shares ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -272,7 +272,7 @@ export default class Config {
}
/**
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -283,7 +283,7 @@ export default class Config {
/**
* Is sharing with groups allowed ?
*
- * @returns {boolean}
+ * @return {boolean}
* @readonly
* @memberof Config
*/
@@ -294,7 +294,7 @@ export default class Config {
/**
* Get the maximum results of a share search
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Config
*/
@@ -306,7 +306,7 @@ export default class Config {
* Get the minimal string length
* to initiate a share search
*
- * @returns {int}
+ * @return {int}
* @readonly
* @memberof Config
*/
@@ -317,7 +317,7 @@ export default class Config {
/**
* Get the password policy config
*
- * @returns {Object}
+ * @return {object}
* @readonly
* @memberof Config
*/
diff --git a/apps/files_sharing/src/services/ExternalLinkActions.js b/apps/files_sharing/src/services/ExternalLinkActions.js
index 3903bec643f28..c9229d13163b5 100644
--- a/apps/files_sharing/src/services/ExternalLinkActions.js
+++ b/apps/files_sharing/src/services/ExternalLinkActions.js
@@ -38,7 +38,7 @@ export default class ExternalLinkActions {
*
* @readonly
* @memberof ExternalLinkActions
- * @returns {Object} the data state
+ * @return {object} the data state
*/
get state() {
return this._state
@@ -48,8 +48,8 @@ export default class ExternalLinkActions {
* Register a new action for the link share
* Mostly used by the social sharing app.
*
- * @param {Object} action new action component to register
- * @returns {boolean}
+ * @param {object} action new action component to register
+ * @return {boolean}
*/
registerAction(action) {
console.warn('OCA.Sharing.ExternalLinkActions is deprecated, use OCA.Sharing.ExternalShareAction instead')
diff --git a/apps/files_sharing/src/services/ExternalShareActions.js b/apps/files_sharing/src/services/ExternalShareActions.js
index 821bf4797558c..dd5b73e1345de 100644
--- a/apps/files_sharing/src/services/ExternalShareActions.js
+++ b/apps/files_sharing/src/services/ExternalShareActions.js
@@ -38,7 +38,7 @@ export default class ExternalShareActions {
*
* @readonly
* @memberof ExternalLinkActions
- * @returns {Object} the data state
+ * @return {object} the data state
*/
get state() {
return this._state
@@ -47,12 +47,12 @@ export default class ExternalShareActions {
/**
* Register a new option/entry for the a given share type
*
- * @param {Object} action new action component to register
+ * @param {object} action new action component to register
* @param {string} action.id unique action id
* @param {Function} action.data data to bind the component to
* @param {Array} action.shareType list of OC.Share.SHARE_XXX to be mounted on
- * @param {Object} action.handlers list of listeners
- * @returns {boolean}
+ * @param {object} action.handlers list of listeners
+ * @return {boolean}
*/
registerAction(action) {
// Validate action
diff --git a/apps/files_sharing/src/services/ShareSearch.js b/apps/files_sharing/src/services/ShareSearch.js
index a96822223c5c4..00750c0e0b426 100644
--- a/apps/files_sharing/src/services/ShareSearch.js
+++ b/apps/files_sharing/src/services/ShareSearch.js
@@ -38,7 +38,7 @@ export default class ShareSearch {
*
* @readonly
* @memberof ShareSearch
- * @returns {Object} the data state
+ * @return {object} the data state
*/
get state() {
return this._state
@@ -49,14 +49,14 @@ export default class ShareSearch {
* Mostly used by the guests app.
* We should consider deprecation and add results via php ?
*
- * @param {Object} result entry to append
+ * @param {object} result entry to append
* @param {string} [result.user] entry user
* @param {string} result.displayName entry first line
* @param {string} [result.desc] entry second line
* @param {string} [result.icon] entry icon
- * @param {function} result.handler function to run on entry selection
- * @param {function} [result.condition] condition to add entry or not
- * @returns {boolean}
+ * @param {Function} result.handler function to run on entry selection
+ * @param {Function} [result.condition] condition to add entry or not
+ * @return {boolean}
*/
addNewResult(result) {
if (result.displayName.trim() !== ''
diff --git a/apps/files_sharing/src/utils/GeneratePassword.js b/apps/files_sharing/src/utils/GeneratePassword.js
index 49a58596f7aec..a12e1c66f4989 100644
--- a/apps/files_sharing/src/utils/GeneratePassword.js
+++ b/apps/files_sharing/src/utils/GeneratePassword.js
@@ -31,7 +31,7 @@ const passwordSet = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789'
* request a valid password if password_policy
* is enabled
*
- * @returns {string} a valid password
+ * @return {string} a valid password
*/
export default async function() {
// password policy is enabled, let's request a pass
diff --git a/apps/files_sharing/src/views/SharingLinkList.vue b/apps/files_sharing/src/views/SharingLinkList.vue
index c87dcb5958563..14ea879e0042a 100644
--- a/apps/files_sharing/src/views/SharingLinkList.vue
+++ b/apps/files_sharing/src/views/SharingLinkList.vue
@@ -87,7 +87,7 @@ export default {
* Using this to still show the `new link share`
* button regardless of mail shares
*
- * @returns {Array}
+ * @return {Array}
*/
hasLinkShares() {
return this.shares.filter(share => share.type === this.SHARE_TYPES.SHARE_TYPE_LINK).length > 0
@@ -96,7 +96,7 @@ export default {
/**
* Do we have any link or email shares?
*
- * @returns {boolean}
+ * @return {boolean}
*/
hasShares() {
return this.shares.length > 0
diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue
index e08ce261522e1..2e4176c4de5ca 100644
--- a/apps/files_sharing/src/views/SharingTab.vue
+++ b/apps/files_sharing/src/views/SharingTab.vue
@@ -144,7 +144,7 @@ export default {
/**
* Is this share shared with me?
*
- * @returns {boolean}
+ * @return {boolean}
*/
isSharedWithMe() {
return Object.keys(this.sharedWithMe).length > 0
@@ -159,7 +159,8 @@ export default {
methods: {
/**
* Update current fileInfo and fetch new data
- * @param {Object} fileInfo the current file FileInfo
+ *
+ * @param {object} fileInfo the current file FileInfo
*/
async update(fileInfo) {
this.fileInfo = fileInfo
@@ -246,8 +247,8 @@ export default {
* Process the current shares data
* and init shares[]
*
- * @param {Object} share the share ocs api request data
- * @param {Object} share.data the request data
+ * @param {object} share the share ocs api request data
+ * @param {object} share.data the request data
*/
processShares({ data }) {
if (data.ocs && data.ocs.data && data.ocs.data.length > 0) {
@@ -268,8 +269,8 @@ export default {
* Process the sharedWithMe share data
* and init sharedWithMe
*
- * @param {Object} share the share ocs api request data
- * @param {Object} share.data the request data
+ * @param {object} share the share ocs api request data
+ * @param {object} share.data the request data
*/
processSharedWithMe({ data }) {
if (data.ocs && data.ocs.data && data.ocs.data[0]) {
diff --git a/apps/files_versions/src/versioncollection.js b/apps/files_versions/src/versioncollection.js
index a5339fc64591a..9ed1c7fa86ba1 100644
--- a/apps/files_versions/src/versioncollection.js
+++ b/apps/files_versions/src/versioncollection.js
@@ -31,7 +31,7 @@
sync: OC.Backbone.davSync,
/**
- * @var OCA.Files.FileInfoModel
+ * @member OCA.Files.FileInfoModel
*/
_fileInfo: null,
diff --git a/apps/files_versions/src/versionmodel.js b/apps/files_versions/src/versionmodel.js
index ca1c4716b05e9..06f55d6fa4765 100644
--- a/apps/files_versions/src/versionmodel.js
+++ b/apps/files_versions/src/versionmodel.js
@@ -38,8 +38,8 @@
/**
* Restores the original file to this revision
*
- * @param {Object} [options] options
- * @returns {Promise}
+ * @param {object} [options] options
+ * @return {Promise}
*/
revert(options) {
options = options ? _.clone(options) : {}
diff --git a/apps/files_versions/src/versionstabview.js b/apps/files_versions/src/versionstabview.js
index 7ae5ad0fb2fb1..6adc3e61a18d5 100644
--- a/apps/files_versions/src/versionstabview.js
+++ b/apps/files_versions/src/versionstabview.js
@@ -213,8 +213,9 @@ import Template from './templates/template.handlebars';
/**
* Returns true for files, false for folders.
+ *
* @param {FileInfo} fileInfo fileInfo
- * @returns {bool} true for files, false for folders
+ * @return {bool} true for files, false for folders
*/
canDisplay(fileInfo) {
if (!fileInfo) {
diff --git a/apps/settings/src/components/AdminDelegation/GroupSelect.vue b/apps/settings/src/components/AdminDelegation/GroupSelect.vue
index 8f27efdfef0eb..eb7fd3e0c343d 100644
--- a/apps/settings/src/components/AdminDelegation/GroupSelect.vue
+++ b/apps/settings/src/components/AdminDelegation/GroupSelect.vue
@@ -42,7 +42,7 @@ export default {
selected: this.authorizedGroups
.filter((group) => group.class === this.setting.class)
.map((groupToMap) => this.availableGroups.find((group) => group.gid === groupToMap.group_id))
- .filter((group) => group !== undefined)
+ .filter((group) => group !== undefined),
}
},
watch: {
@@ -63,7 +63,7 @@ export default {
logger.error('Unable to modify setting', e)
}
},
- }
+ },
}
diff --git a/apps/settings/src/components/AuthToken.vue b/apps/settings/src/components/AuthToken.vue
index dd1ec87e4eb49..ce9d59936b9f8 100644
--- a/apps/settings/src/components/AuthToken.vue
+++ b/apps/settings/src/components/AuthToken.vue
@@ -48,7 +48,7 @@
:open.sync="actionOpen">
+ @change.stop.prevent="$emit('toggle-scope', token, 'filesystem', !token.scope.filesystem)">
{{ t('settings', 'Allow filesystem access') }}
diff --git a/apps/settings/src/components/AuthTokenList.vue b/apps/settings/src/components/AuthTokenList.vue
index d0dfa6d92fc0b..5e962a1ee9803 100644
--- a/apps/settings/src/components/AuthTokenList.vue
+++ b/apps/settings/src/components/AuthTokenList.vue
@@ -67,7 +67,7 @@ export default {
methods: {
toggleScope(token, scope, value) {
// Just pass it on
- this.$emit('toggleScope', token, scope, value)
+ this.$emit('toggle-scope', token, scope, value)
},
rename(token, newName) {
// Just pass it on
diff --git a/apps/settings/src/components/AuthTokenSection.vue b/apps/settings/src/components/AuthTokenSection.vue
index 2624433eca2a6..87895e4821936 100644
--- a/apps/settings/src/components/AuthTokenSection.vue
+++ b/apps/settings/src/components/AuthTokenSection.vue
@@ -55,8 +55,9 @@ const confirm = () => {
/**
* Tap into a promise without losing the value
+ *
* @param {Function} cb the callback
- * @returns {any} val the value
+ * @return {any} val the value
*/
const tap = cb => val => {
cb(val)
diff --git a/apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue b/apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue
index d13b26b2d9210..a36dac801196b 100644
--- a/apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue
+++ b/apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue
@@ -85,7 +85,7 @@ export default {
// TODO remove this when not used once the settings layout is updated
marginLeft: window.matchMedia('(min-width: 1600px)').matches
? window.getComputedStyle(document.getElementById('personal-settings-avatar-container')).getPropertyValue('width').trim()
- : '0px'
+ : '0px',
}
},
diff --git a/apps/settings/src/components/UserList.vue b/apps/settings/src/components/UserList.vue
index 68c07d1ab2178..d419b6a3c437e 100644
--- a/apps/settings/src/components/UserList.vue
+++ b/apps/settings/src/components/UserList.vue
@@ -438,7 +438,7 @@ export default {
* Validate quota string to make sure it's a valid human file size
*
* @param {string} quota Quota in readable format '5 GB'
- * @returns {Object}
+ * @return {object}
*/
validateQuota(quota) {
// only used for new presets sent through @Tag
@@ -550,7 +550,7 @@ export default {
* Create a new group
*
* @param {string} gid Group id
- * @returns {Promise}
+ * @return {Promise}
*/
createGroup(gid) {
this.loading.groups = true
@@ -568,8 +568,8 @@ export default {
/**
* If the selected group is the disabled group but the count is 0
* redirect to the all users page.
- * * we only check for 0 because we don't have the count on ldap
- * * and we therefore set the usercount to -1 in this specific case
+ * we only check for 0 because we don't have the count on ldap
+ * and we therefore set the usercount to -1 in this specific case
*/
redirectIfDisabled() {
const allGroups = this.$store.getters.getGroups
diff --git a/apps/settings/src/components/UserList/UserRow.vue b/apps/settings/src/components/UserList/UserRow.vue
index 9f41d464e1af0..0dd742267d17b 100644
--- a/apps/settings/src/components/UserList/UserRow.vue
+++ b/apps/settings/src/components/UserList/UserRow.vue
@@ -432,10 +432,10 @@ export default {
},
/**
- * Set user displayName
- *
- * @param {string} displayName The display name
- */
+ * Set user displayName
+ *
+ * @param {string} displayName The display name
+ */
updateDisplayName() {
const displayName = this.$refs.displayName.value
this.loading.displayName = true
@@ -450,10 +450,10 @@ export default {
},
/**
- * Set user password
- *
- * @param {string} password The email adress
- */
+ * Set user password
+ *
+ * @param {string} password The email adress
+ */
updatePassword() {
const password = this.$refs.password.value
this.loading.password = true
@@ -468,10 +468,10 @@ export default {
},
/**
- * Set user mailAddress
- *
- * @param {string} mailAddress The email adress
- */
+ * Set user mailAddress
+ *
+ * @param {string} mailAddress The email adress
+ */
updateEmail() {
const mailAddress = this.$refs.mailAddress.value
this.loading.mailAddress = true
@@ -486,10 +486,10 @@ export default {
},
/**
- * Create a new group and add user to it
- *
- * @param {string} gid Group id
- */
+ * Create a new group and add user to it
+ *
+ * @param {string} gid Group id
+ */
async createGroup(gid) {
this.loading = { groups: true, subadmins: true }
try {
@@ -505,10 +505,10 @@ export default {
},
/**
- * Add user to group
- *
- * @param {object} group Group object
- */
+ * Add user to group
+ *
+ * @param {object} group Group object
+ */
async addUserGroup(group) {
if (group.canAdd === false) {
return false
@@ -526,10 +526,10 @@ export default {
},
/**
- * Remove user from group
- *
- * @param {object} group Group object
- */
+ * Remove user from group
+ *
+ * @param {object} group Group object
+ */
async removeUserGroup(group) {
if (group.canRemove === false) {
return false
@@ -555,10 +555,10 @@ export default {
},
/**
- * Add user to group
- *
- * @param {object} group Group object
- */
+ * Add user to group
+ *
+ * @param {object} group Group object
+ */
async addUserSubAdmin(group) {
this.loading.subadmins = true
const userid = this.user.id
@@ -576,10 +576,10 @@ export default {
},
/**
- * Remove user from group
- *
- * @param {object} group Group object
- */
+ * Remove user from group
+ *
+ * @param {object} group Group object
+ */
async removeUserSubAdmin(group) {
this.loading.subadmins = true
const userid = this.user.id
@@ -598,11 +598,11 @@ export default {
},
/**
- * Dispatch quota set request
- *
- * @param {string|Object} quota Quota in readable format '5 GB' or Object {id: '5 GB', label: '5GB'}
- * @returns {string}
- */
+ * Dispatch quota set request
+ *
+ * @param {string | object} quota Quota in readable format '5 GB' or Object {id: '5 GB', label: '5GB'}
+ * @return {string}
+ */
async setUserQuota(quota = 'none') {
this.loading.quota = true
// ensure we only send the preset id
@@ -623,11 +623,11 @@ export default {
},
/**
- * Validate quota string to make sure it's a valid human file size
- *
- * @param {string} quota Quota in readable format '5 GB'
- * @returns {Promise|boolean}
- */
+ * Validate quota string to make sure it's a valid human file size
+ *
+ * @param {string} quota Quota in readable format '5 GB'
+ * @return {Promise|boolean}
+ */
validateQuota(quota) {
// only used for new presets sent through @Tag
const validQuota = OC.Util.computerFileSize(quota)
@@ -640,11 +640,11 @@ export default {
},
/**
- * Dispatch language set request
- *
- * @param {Object} lang language object {code:'en', name:'English'}
- * @returns {Object}
- */
+ * Dispatch language set request
+ *
+ * @param {object} lang language object {code:'en', name:'English'}
+ * @return {object}
+ */
async setUserLanguage(lang) {
this.loading.languages = true
// ensure we only send the preset id
@@ -663,8 +663,8 @@ export default {
},
/**
- * Dispatch new welcome mail request
- */
+ * Dispatch new welcome mail request
+ */
sendWelcomeMail() {
this.loading.all = true
this.$store.dispatch('sendWelcomeMail', this.user.id)
diff --git a/apps/settings/src/components/UserList/UserRowSimple.vue b/apps/settings/src/components/UserList/UserRowSimple.vue
index 8c97bd10f2dfe..9b00a0597bc3f 100644
--- a/apps/settings/src/components/UserList/UserRowSimple.vue
+++ b/apps/settings/src/components/UserList/UserRowSimple.vue
@@ -69,7 +69,7 @@
v-click-outside="hideMenu"
class="icon-more"
:aria-label="t('settings', 'Toggle user actions menu')"
- @click.prevent="$emit('toggleMenu')" />
+ @click.prevent="$emit('toggle-menu')" />
@@ -177,7 +177,7 @@ export default {
},
methods: {
hideMenu() {
- this.$emit('hideMenu')
+ this.$emit('hide-menu')
},
toggleEdit() {
this.$emit('update:editing', true)
diff --git a/apps/settings/src/constants/AccountPropertyConstants.js b/apps/settings/src/constants/AccountPropertyConstants.js
index 285e32ea92f68..fb637ea95b2a3 100644
--- a/apps/settings/src/constants/AccountPropertyConstants.js
+++ b/apps/settings/src/constants/AccountPropertyConstants.js
@@ -86,7 +86,7 @@ export const PROPERTY_READABLE_KEYS_ENUM = Object.freeze({
/**
* Enum of account setting properties
*
- * *Account setting properties unlike account properties do not support scopes*
+ * Account setting properties unlike account properties do not support scopes*
*/
export const ACCOUNT_SETTING_PROPERTY_ENUM = Object.freeze({
LANGUAGE: 'language',
@@ -136,7 +136,7 @@ export const SCOPE_SUFFIX = 'Scope'
/**
* Enum of scope names to properties
*
- * *Used for federation control*
+ * Used for federation control*
*/
export const SCOPE_PROPERTY_ENUM = Object.freeze({
[SCOPE_ENUM.PRIVATE]: {
@@ -182,7 +182,7 @@ export const VERIFICATION_ENUM = Object.freeze({
/**
* Email validation regex
*
- * *Sourced from https://github.com/mpyw/FILTER_VALIDATE_EMAIL.js/blob/71e62ca48841d2246a1b531e7e84f5a01f15e615/src/regexp/ascii.ts*
+ * Sourced from https://github.com/mpyw/FILTER_VALIDATE_EMAIL.js/blob/71e62ca48841d2246a1b531e7e84f5a01f15e615/src/regexp/ascii.ts*
*/
// eslint-disable-next-line no-control-regex
export const VALIDATE_EMAIL_REGEX = /^(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){255,})(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){65,}@)(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22))(?:\.(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-+[a-z0-9]+)*\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-+[a-z0-9]+)*)|(?:\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\]))$/i
diff --git a/apps/settings/src/mixins/UserRowMixin.js b/apps/settings/src/mixins/UserRowMixin.js
index 1c33f3d33cb67..603f7a87837d3 100644
--- a/apps/settings/src/mixins/UserRowMixin.js
+++ b/apps/settings/src/mixins/UserRowMixin.js
@@ -159,7 +159,7 @@ export default {
*
* @param {string} user The user name
* @param {int} size Size integer, default 32
- * @returns {string}
+ * @return {string}
*/
generateAvatar(user, size = 32) {
return generateUrl(
diff --git a/apps/settings/src/service/PersonalInfo/EmailService.js b/apps/settings/src/service/PersonalInfo/EmailService.js
index a1f7a57f72b3f..477fff7fa62e9 100644
--- a/apps/settings/src/service/PersonalInfo/EmailService.js
+++ b/apps/settings/src/service/PersonalInfo/EmailService.js
@@ -31,9 +31,9 @@ import { ACCOUNT_PROPERTY_ENUM, SCOPE_SUFFIX } from '../../constants/AccountProp
* Save the primary email of the user
*
* @param {string} email the primary email
- * @returns {object}
+ * @return {object}
*/
-export const savePrimaryEmail = async(email) => {
+export const savePrimaryEmail = async (email) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('cloud/users/{userId}', { userId })
@@ -50,12 +50,12 @@ export const savePrimaryEmail = async(email) => {
/**
* Save an additional email of the user
*
- * *Will be appended to the user's additional emails*
+ * Will be appended to the user's additional emails*
*
* @param {string} email the additional email
- * @returns {object}
+ * @return {object}
*/
-export const saveAdditionalEmail = async(email) => {
+export const saveAdditionalEmail = async (email) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('cloud/users/{userId}', { userId })
@@ -73,9 +73,9 @@ export const saveAdditionalEmail = async(email) => {
* Save the notification email of the user
*
* @param {string} email the notification email
- * @returns {object}
+ * @return {object}
*/
-export const saveNotificationEmail = async(email) => {
+export const saveNotificationEmail = async (email) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('cloud/users/{userId}', { userId })
@@ -93,9 +93,9 @@ export const saveNotificationEmail = async(email) => {
* Remove an additional email of the user
*
* @param {string} email the additional email
- * @returns {object}
+ * @return {object}
*/
-export const removeAdditionalEmail = async(email) => {
+export const removeAdditionalEmail = async (email) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('cloud/users/{userId}/{collection}', { userId, collection: ACCOUNT_PROPERTY_ENUM.EMAIL_COLLECTION })
@@ -114,9 +114,9 @@ export const removeAdditionalEmail = async(email) => {
*
* @param {string} prevEmail the additional email to be updated
* @param {string} newEmail the new additional email
- * @returns {object}
+ * @return {object}
*/
-export const updateAdditionalEmail = async(prevEmail, newEmail) => {
+export const updateAdditionalEmail = async (prevEmail, newEmail) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('cloud/users/{userId}/{collection}', { userId, collection: ACCOUNT_PROPERTY_ENUM.EMAIL_COLLECTION })
@@ -134,9 +134,9 @@ export const updateAdditionalEmail = async(prevEmail, newEmail) => {
* Save the federation scope for the primary email of the user
*
* @param {string} scope the federation scope
- * @returns {object}
+ * @return {object}
*/
-export const savePrimaryEmailScope = async(scope) => {
+export const savePrimaryEmailScope = async (scope) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('cloud/users/{userId}', { userId })
@@ -155,9 +155,9 @@ export const savePrimaryEmailScope = async(scope) => {
*
* @param {string} email the additional email
* @param {string} scope the federation scope
- * @returns {object}
+ * @return {object}
*/
-export const saveAdditionalEmailScope = async(email, scope) => {
+export const saveAdditionalEmailScope = async (email, scope) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('cloud/users/{userId}/{collectionScope}', { userId, collectionScope: `${ACCOUNT_PROPERTY_ENUM.EMAIL_COLLECTION}${SCOPE_SUFFIX}` })
diff --git a/apps/settings/src/service/PersonalInfo/PersonalInfoService.js b/apps/settings/src/service/PersonalInfo/PersonalInfoService.js
index e725300675c3b..31124c1598745 100644
--- a/apps/settings/src/service/PersonalInfo/PersonalInfoService.js
+++ b/apps/settings/src/service/PersonalInfo/PersonalInfoService.js
@@ -32,9 +32,9 @@ import { SCOPE_SUFFIX } from '../../constants/AccountPropertyConstants'
*
* @param {string} accountProperty the account property
* @param {string|boolean} value the primary value
- * @returns {object}
+ * @return {object}
*/
-export const savePrimaryAccountProperty = async(accountProperty, value) => {
+export const savePrimaryAccountProperty = async (accountProperty, value) => {
// TODO allow boolean values on backend route handler
// Convert boolean to string for compatibility
if (typeof value === 'boolean') {
@@ -59,9 +59,9 @@ export const savePrimaryAccountProperty = async(accountProperty, value) => {
*
* @param {string} accountProperty the account property
* @param {string} scope the federation scope
- * @returns {object}
+ * @return {object}
*/
-export const savePrimaryAccountPropertyScope = async(accountProperty, scope) => {
+export const savePrimaryAccountPropertyScope = async (accountProperty, scope) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('cloud/users/{userId}', { userId })
diff --git a/apps/settings/src/service/ProfileService.js b/apps/settings/src/service/ProfileService.js
index 8748db46152cb..15300155bbcdc 100644
--- a/apps/settings/src/service/ProfileService.js
+++ b/apps/settings/src/service/ProfileService.js
@@ -30,9 +30,9 @@ import confirmPassword from '@nextcloud/password-confirmation'
*
* @param {string} paramId the profile parameter ID
* @param {string} visibility the visibility
- * @returns {object}
+ * @return {object}
*/
-export const saveProfileParameterVisibility = async(paramId, visibility) => {
+export const saveProfileParameterVisibility = async (paramId, visibility) => {
const userId = getCurrentUser().uid
const url = generateOcsUrl('/profile/{userId}', { userId })
diff --git a/apps/settings/src/service/WebAuthnRegistrationSerice.js b/apps/settings/src/service/WebAuthnRegistrationSerice.js
index 98af818217b14..91ee0dae2b223 100644
--- a/apps/settings/src/service/WebAuthnRegistrationSerice.js
+++ b/apps/settings/src/service/WebAuthnRegistrationSerice.js
@@ -23,6 +23,9 @@
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
+/**
+ *
+ */
export async function startRegistration() {
const url = generateUrl('/settings/api/personal/webauthn/registration')
@@ -30,6 +33,10 @@ export async function startRegistration() {
return resp.data
}
+/**
+ * @param name
+ * @param data
+ */
export async function finishRegistration(name, data) {
const url = generateUrl('/settings/api/personal/webauthn/registration')
@@ -37,6 +44,9 @@ export async function finishRegistration(name, data) {
return resp.data
}
+/**
+ * @param id
+ */
export async function removeRegistration(id) {
const url = generateUrl(`/settings/api/personal/webauthn/registration/${id}`)
diff --git a/apps/settings/src/store/api.js b/apps/settings/src/store/api.js
index 4eae9f5c95dee..f65c963769a95 100644
--- a/apps/settings/src/store/api.js
+++ b/apps/settings/src/store/api.js
@@ -62,7 +62,7 @@ export default {
* .catch((error) => {throw error;});
* }).catch((error) => {requireAdmin OR API failure});
*
- * @returns {Promise}
+ * @return {Promise}
*/
requireAdmin() {
return confirmPassword()
diff --git a/apps/settings/src/store/oc.js b/apps/settings/src/store/oc.js
index a6d3bffc34e6a..35fbfcd34d10e 100644
--- a/apps/settings/src/store/oc.js
+++ b/apps/settings/src/store/oc.js
@@ -29,10 +29,10 @@ const mutations = {}
const getters = {}
const actions = {
/**
- * Set application config in database
- *
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * Set application config in database
+ *
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {string} options.app Application name
* @param {boolean} options.key Config key
* @param {boolean} options.value Value to set
diff --git a/apps/settings/src/store/users.js b/apps/settings/src/store/users.js
index ef93f7e40abf1..7bc04e25d9fbe 100644
--- a/apps/settings/src/store/users.js
+++ b/apps/settings/src/store/users.js
@@ -163,7 +163,8 @@ const mutations = {
/**
* Reset users list
- * @param {Object} state the store state
+ *
+ * @param {object} state the store state
*/
resetUsers(state) {
state.users = []
@@ -204,13 +205,13 @@ const actions = {
/**
* Get all users with full details
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {int} options.offset List offset to request
* @param {int} options.limit List number to return from offset
* @param {string} options.search Search amongst users
* @param {string} options.group Get users from group
- * @returns {Promise}
+ * @return {Promise}
*/
getUsers(context, { offset, limit, search, group }) {
if (searchRequestCancelSource) {
@@ -273,11 +274,12 @@ const actions = {
/**
* Get all users with full details
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {int} options.offset List offset to request
* @param {int} options.limit List number to return from offset
- * @returns {Promise}
+ * @param options.search
+ * @return {Promise}
*/
getUsersFromList(context, { offset, limit, search }) {
search = typeof search === 'string' ? search : ''
@@ -295,11 +297,12 @@ const actions = {
/**
* Get all users with full details from a groupid
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {int} options.offset List offset to request
* @param {int} options.limit List number to return from offset
- * @returns {Promise}
+ * @param options.groupid
+ * @return {Promise}
*/
getUsersFromGroup(context, { groupid, offset, limit }) {
return api.get(generateOcsUrl('cloud/users/{groupId}/details?offset={offset}&limit={limit}', { groupId: encodeURIComponent(groupid), offset, limit }))
@@ -318,9 +321,9 @@ const actions = {
/**
* Add group
*
- * @param {Object} context store context
+ * @param {object} context store context
* @param {string} gid Group id
- * @returns {Promise}
+ * @return {Promise}
*/
addGroup(context, gid) {
return api.requireAdmin().then((response) => {
@@ -341,9 +344,9 @@ const actions = {
/**
* Remove group
*
- * @param {Object} context store context
+ * @param {object} context store context
* @param {string} gid Group id
- * @returns {Promise}
+ * @return {Promise}
*/
removeGroup(context, gid) {
return api.requireAdmin().then((response) => {
@@ -356,11 +359,11 @@ const actions = {
/**
* Add user to group
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {string} options.userid User id
* @param {string} options.gid Group id
- * @returns {Promise}
+ * @return {Promise}
*/
addUserGroup(context, { userid, gid }) {
return api.requireAdmin().then((response) => {
@@ -373,11 +376,11 @@ const actions = {
/**
* Remove user from group
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {string} options.userid User id
* @param {string} options.gid Group id
- * @returns {Promise}
+ * @return {Promise}
*/
removeUserGroup(context, { userid, gid }) {
return api.requireAdmin().then((response) => {
@@ -395,11 +398,11 @@ const actions = {
/**
* Add user to group admin
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {string} options.userid User id
* @param {string} options.gid Group id
- * @returns {Promise}
+ * @return {Promise}
*/
addUserSubAdmin(context, { userid, gid }) {
return api.requireAdmin().then((response) => {
@@ -412,11 +415,11 @@ const actions = {
/**
* Remove user from group admin
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {string} options.userid User id
* @param {string} options.gid Group id
- * @returns {Promise}
+ * @return {Promise}
*/
removeUserSubAdmin(context, { userid, gid }) {
return api.requireAdmin().then((response) => {
@@ -429,9 +432,9 @@ const actions = {
/**
* Mark all user devices for remote wipe
*
- * @param {Object} context store context
+ * @param {object} context store context
* @param {string} userid User id
- * @returns {Promise}
+ * @return {Promise}
*/
wipeUserDevices(context, userid) {
return api.requireAdmin().then((response) => {
@@ -443,9 +446,9 @@ const actions = {
/**
* Delete a user
*
- * @param {Object} context store context
+ * @param {object} context store context
* @param {string} userid User id
- * @returns {Promise}
+ * @return {Promise}
*/
deleteUser(context, userid) {
return api.requireAdmin().then((response) => {
@@ -458,8 +461,8 @@ const actions = {
/**
* Add a user
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {string} options.userid User id
* @param {string} options.password User password
* @param {string} options.displayName User display name
@@ -467,7 +470,10 @@ const actions = {
* @param {string} options.groups User groups
* @param {string} options.subadmin User subadmin groups
* @param {string} options.quota User email
- * @returns {Promise}
+ * @param context.commit
+ * @param context.dispatch
+ * @param options.language
+ * @return {Promise}
*/
addUser({ commit, dispatch }, { userid, password, displayName, email, groups, subadmin, quota, language }) {
return api.requireAdmin().then((response) => {
@@ -483,9 +489,9 @@ const actions = {
/**
* Get user data and commit addition
*
- * @param {Object} context store context
+ * @param {object} context store context
* @param {string} userid User id
- * @returns {Promise}
+ * @return {Promise}
*/
addUserData(context, userid) {
return api.requireAdmin().then((response) => {
@@ -495,13 +501,14 @@ const actions = {
}).catch((error) => context.commit('API_FAILURE', { userid, error }))
},
- /** Enable or disable user
+ /**
+ * Enable or disable user
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {string} options.userid User id
* @param {boolean} options.enabled User enablement status
- * @returns {Promise}
+ * @return {Promise}
*/
enableDisableUser(context, { userid, enabled = true }) {
const userStatus = enabled ? 'enable' : 'disable'
@@ -515,12 +522,12 @@ const actions = {
/**
* Edit user data
*
- * @param {Object} context store context
- * @param {Object} options destructuring object
+ * @param {object} context store context
+ * @param {object} options destructuring object
* @param {string} options.userid User id
* @param {string} options.key User field to edit
* @param {string} options.value Value of the change
- * @returns {Promise}
+ * @return {Promise}
*/
setUserData(context, { userid, key, value }) {
const allowedEmpty = ['email', 'displayname']
@@ -545,9 +552,9 @@ const actions = {
/**
* Send welcome mail
*
- * @param {Object} context store context
+ * @param {object} context store context
* @param {string} userid User id
- * @returns {Promise}
+ * @return {Promise}
*/
sendWelcomeMail(context, userid) {
return api.requireAdmin().then((response) => {
diff --git a/apps/settings/src/utils/validate.js b/apps/settings/src/utils/validate.js
index f737130190986..291223c0737de 100644
--- a/apps/settings/src/utils/validate.js
+++ b/apps/settings/src/utils/validate.js
@@ -31,10 +31,10 @@ import { VALIDATE_EMAIL_REGEX } from '../constants/AccountPropertyConstants'
/**
* Validate the string input
*
- * *Generic validator just to check that input is not an empty string*
+ * Generic validator just to check that input is not an empty string*
*
* @param {string} input the input
- * @returns {boolean}
+ * @return {boolean}
*/
export function validateStringInput(input) {
return input !== ''
@@ -43,12 +43,12 @@ export function validateStringInput(input) {
/**
* Validate the email input
*
- * *Compliant with PHP core FILTER_VALIDATE_EMAIL validator*
+ * Compliant with PHP core FILTER_VALIDATE_EMAIL validator*
*
- * *Reference implementation https://github.com/mpyw/FILTER_VALIDATE_EMAIL.js/blob/71e62ca48841d2246a1b531e7e84f5a01f15e615/src/index.ts*
+ * Reference implementation https://github.com/mpyw/FILTER_VALIDATE_EMAIL.js/blob/71e62ca48841d2246a1b531e7e84f5a01f15e615/src/index.ts*
*
* @param {string} input the input
- * @returns {boolean}
+ * @return {boolean}
*/
export function validateEmail(input) {
return typeof input === 'string'
@@ -62,7 +62,7 @@ export function validateEmail(input) {
* Validate the language input
*
* @param {object} input the input
- * @returns {boolean}
+ * @return {boolean}
*/
export function validateLanguage(input) {
return input.code !== ''
@@ -74,7 +74,7 @@ export function validateLanguage(input) {
* Validate boolean input
*
* @param {boolean} input the input
- * @returns {boolean}
+ * @return {boolean}
*/
export function validateBoolean(input) {
return typeof input === 'boolean'
diff --git a/apps/settings/src/views/Users.vue b/apps/settings/src/views/Users.vue
index d57c16cc44a6a..bf191111853f1 100644
--- a/apps/settings/src/views/Users.vue
+++ b/apps/settings/src/views/Users.vue
@@ -390,7 +390,7 @@ export default {
/**
* Dispatch default quota set request
*
- * @param {string|Object} quota Quota in readable format '5 GB' or Object {id: '5 GB', label: '5GB'}
+ * @param {string | object} quota Quota in readable format '5 GB' or Object {id: '5 GB', label: '5GB'}
*/
setDefaultQuota(quota = 'none') {
this.$store.dispatch('setAppConfig', {
@@ -410,7 +410,7 @@ export default {
* Validate quota string to make sure it's a valid human file size
*
* @param {string} quota Quota in readable format '5 GB'
- * @returns {Promise|boolean}
+ * @return {Promise|boolean}
*/
validateQuota(quota) {
// only used for new presets sent through @Tag
@@ -429,7 +429,7 @@ export default {
* @param {string} icon the icon class
* @param {string} text the text to display
* @param {Function} action the function to run
- * @returns {Array}
+ * @return {Array}
*/
registerAction(icon, text, action) {
this.externalActions.push({
@@ -484,8 +484,9 @@ export default {
/**
* Format a group to a menu entry
- * @param {Object} group the group
- * @returns {Object}
+ *
+ * @param {object} group the group
+ * @return {object}
*/
formatGroupMenu(group) {
const item = {}
diff --git a/apps/systemtags/src/systemtagsfilelist.js b/apps/systemtags/src/systemtagsfilelist.js
index e21388b8ddf76..4821f14022253 100644
--- a/apps/systemtags/src/systemtagsfilelist.js
+++ b/apps/systemtags/src/systemtagsfilelist.js
@@ -30,7 +30,7 @@
* @classdesc SystemTags file list.
* Contains a list of files filtered by system tags.
*
- * @param {Object} $el container element with existing markup for the #controls and a table
+ * @param {object} $el container element with existing markup for the #controls and a table
* @param {Array} [options] map of options, see other parameters
* @param {Array.} [options.systemTagIds] array of system tag ids to
* filter by
@@ -60,8 +60,8 @@
/**
* @private
- * @param {Object} $el container element
- * @param {Object} [options] map of options, see other parameters
+ * @param {object} $el container element
+ * @param {object} [options] map of options, see other parameters
*/
initialize($el, options) {
OCA.Files.FileList.prototype.initialize.apply(this, arguments)
@@ -190,7 +190,7 @@
/**
* Autocomplete function for dropdown results
*
- * @param {Object} query select2 query object
+ * @param {object} query select2 query object
*/
_queryTagsAutocomplete(query) {
OC.SystemTags.collection.fetch({
diff --git a/apps/systemtags/src/systemtagsinfoview.js b/apps/systemtags/src/systemtagsinfoview.js
index 7753b4d53400d..b2a11fbc9593b 100644
--- a/apps/systemtags/src/systemtagsinfoview.js
+++ b/apps/systemtags/src/systemtagsinfoview.js
@@ -26,6 +26,9 @@
(function(OCA) {
+ /**
+ * @param model
+ */
function modelToSelection(model) {
const data = model.toJSON()
if (!OC.isUserAdmin() && !data.canAssign) {
@@ -82,7 +85,8 @@
/**
* Event handler whenever a tag was selected
- * @param {Object} tag the tag to create
+ *
+ * @param {object} tag the tag to create
*/
_onSelectTag(tag) {
// create a mapping entry for this tag
diff --git a/apps/twofactor_backupcodes/src/service/BackupCodesService.js b/apps/twofactor_backupcodes/src/service/BackupCodesService.js
index 856c4ace0b862..3674a6fccdcdd 100644
--- a/apps/twofactor_backupcodes/src/service/BackupCodesService.js
+++ b/apps/twofactor_backupcodes/src/service/BackupCodesService.js
@@ -25,6 +25,9 @@
import Axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
+/**
+ *
+ */
export function generateCodes() {
const url = generateUrl('/apps/twofactor_backupcodes/settings/create')
diff --git a/apps/twofactor_backupcodes/src/service/PrintService.js b/apps/twofactor_backupcodes/src/service/PrintService.js
index 2e73e62f52512..e8b315165323a 100644
--- a/apps/twofactor_backupcodes/src/service/PrintService.js
+++ b/apps/twofactor_backupcodes/src/service/PrintService.js
@@ -21,6 +21,9 @@
*
*/
+/**
+ * @param data
+ */
export function print(data) {
const name = OC.theme.name || 'Nextcloud'
const newTab = window.open('', t('twofactor_backupcodes', '{name} backup codes', { name }))
diff --git a/apps/updatenotification/src/components/UpdateNotification.vue b/apps/updatenotification/src/components/UpdateNotification.vue
index 5d13f740dcbbb..b9e28e4ec2c31 100644
--- a/apps/updatenotification/src/components/UpdateNotification.vue
+++ b/apps/updatenotification/src/components/UpdateNotification.vue
@@ -372,8 +372,8 @@ export default {
methods: {
/**
- * Creates a new authentication token and loads the updater URL
- */
+ * Creates a new authentication token and loads the updater URL
+ */
clickUpdaterButton() {
$.ajax({
url: generateUrl('/apps/updatenotification/credentials'),
diff --git a/apps/user_status/src/UserStatus.vue b/apps/user_status/src/UserStatus.vue
index 608966b9d9a02..bac84e8650059 100644
--- a/apps/user_status/src/UserStatus.vue
+++ b/apps/user_status/src/UserStatus.vue
@@ -99,7 +99,7 @@ export default {
/**
* The profile page link
*
- * @returns {String|null}
+ * @return {string | null}
*/
profilePageLink() {
if (this.profileEnabled) {
@@ -194,7 +194,7 @@ export default {
/**
* Sends the status heartbeat to the server
*
- * @returns {Promise}
+ * @return {Promise}
* @private
*/
async _backgroundHeartbeat() {
diff --git a/apps/user_status/src/components/ClearAtSelect.vue b/apps/user_status/src/components/ClearAtSelect.vue
index 96cc171416ccd..cd8865edb4314 100644
--- a/apps/user_status/src/components/ClearAtSelect.vue
+++ b/apps/user_status/src/components/ClearAtSelect.vue
@@ -59,7 +59,7 @@ export default {
/**
* Returns an object of the currently selected option
*
- * @returns {Object}
+ * @return {object}
*/
option() {
return {
@@ -72,14 +72,14 @@ export default {
/**
* Triggered when the user selects a new option.
*
- * @param {Object=} option The new selected option
+ * @param {object=} option The new selected option
*/
select(option) {
if (!option) {
return
}
- this.$emit('selectClearAt', option.clearAt)
+ this.$emit('select-clear-at', option.clearAt)
},
},
}
diff --git a/apps/user_status/src/components/PredefinedStatusesList.vue b/apps/user_status/src/components/PredefinedStatusesList.vue
index 844fdbbdfe32d..c0b53a6d650f7 100644
--- a/apps/user_status/src/components/PredefinedStatusesList.vue
+++ b/apps/user_status/src/components/PredefinedStatusesList.vue
@@ -55,7 +55,7 @@ export default {
/**
* Indicator whether the predefined statuses have already been loaded
*
- * @returns {boolean}
+ * @return {boolean}
*/
hasLoaded() {
return this.predefinedStatuses.length > 0
@@ -72,10 +72,10 @@ export default {
/**
* Emits an event when the user selects a status
*
- * @param {Object} status The selected status
+ * @param {object} status The selected status
*/
selectStatus(status) {
- this.$emit('selectStatus', status)
+ this.$emit('select-status', status)
},
},
}
diff --git a/apps/user_status/src/components/SetStatusModal.vue b/apps/user_status/src/components/SetStatusModal.vue
index db56ea282bc0a..875ac3f67826e 100644
--- a/apps/user_status/src/components/SetStatusModal.vue
+++ b/apps/user_status/src/components/SetStatusModal.vue
@@ -110,7 +110,7 @@ export default {
/**
* Returns the user-set icon or a smiley in case no icon is set
*
- * @returns {String}
+ * @return {string}
*/
visibleIcon() {
return this.icon || '😀'
@@ -142,7 +142,7 @@ export default {
/**
* Sets a new icon
*
- * @param {String} icon The new icon
+ * @param {string} icon The new icon
*/
setIcon(icon) {
this.messageId = null
@@ -154,7 +154,7 @@ export default {
/**
* Sets a new message
*
- * @param {String} message The new message
+ * @param {string} message The new message
*/
setMessage(message) {
this.messageId = null
@@ -163,7 +163,7 @@ export default {
/**
* Sets a new clearAt value
*
- * @param {Object} clearAt The new clearAt object
+ * @param {object} clearAt The new clearAt object
*/
setClearAt(clearAt) {
this.clearAt = clearAt
@@ -171,7 +171,7 @@ export default {
/**
* Sets new icon/message/clearAt based on a predefined message
*
- * @param {Object} status The predefined status object
+ * @param {object} status The predefined status object
*/
selectPredefinedMessage(status) {
this.messageId = status.id
@@ -182,7 +182,7 @@ export default {
/**
* Saves the status and closes the
*
- * @returns {Promise}
+ * @return {Promise}
*/
async saveStatus() {
if (this.isSavingStatus) {
@@ -216,7 +216,7 @@ export default {
},
/**
*
- * @returns {Promise}
+ * @return {Promise}
*/
async clearStatus() {
try {
diff --git a/apps/user_status/src/filters/clearAtFilter.js b/apps/user_status/src/filters/clearAtFilter.js
index c7140c00976df..89604fe9f3a5e 100644
--- a/apps/user_status/src/filters/clearAtFilter.js
+++ b/apps/user_status/src/filters/clearAtFilter.js
@@ -27,8 +27,8 @@ import { dateFactory } from '../services/dateService'
/**
* Formats a clearAt object to be human readable
*
- * @param {Object} clearAt The clearAt object
- * @returns {string|null}
+ * @param {object} clearAt The clearAt object
+ * @return {string|null}
*/
const clearAtFilter = (clearAt) => {
if (clearAt === null) {
diff --git a/apps/user_status/src/mixins/OnlineStatusMixin.js b/apps/user_status/src/mixins/OnlineStatusMixin.js
index 06a3d058a9b7b..f56723f9b5ce7 100644
--- a/apps/user_status/src/mixins/OnlineStatusMixin.js
+++ b/apps/user_status/src/mixins/OnlineStatusMixin.js
@@ -35,7 +35,7 @@ export default {
/**
* The message displayed in the top right corner
*
- * @returns {String}
+ * @return {string}
*/
visibleMessage() {
if (this.customIcon && this.customMessage) {
@@ -71,7 +71,7 @@ export default {
/**
* The status indicator icon
*
- * @returns {String|null}
+ * @return {string | null}
*/
statusIcon() {
switch (this.statusType) {
@@ -97,7 +97,7 @@ export default {
/**
* Changes the user-status
*
- * @param {String} statusType (online / away / dnd / invisible)
+ * @param {string} statusType (online / away / dnd / invisible)
*/
async changeStatus(statusType) {
try {
diff --git a/apps/user_status/src/services/clearAtOptionsService.js b/apps/user_status/src/services/clearAtOptionsService.js
index 926f21d8b6e9a..c6091aa10de5c 100644
--- a/apps/user_status/src/services/clearAtOptionsService.js
+++ b/apps/user_status/src/services/clearAtOptionsService.js
@@ -25,7 +25,7 @@ import { translate as t } from '@nextcloud/l10n'
/**
* Returns an array
*
- * @returns {Object[]}
+ * @return {object[]}
*/
const getAllClearAtOptions = () => {
return [{
diff --git a/apps/user_status/src/services/clearAtService.js b/apps/user_status/src/services/clearAtService.js
index bc01ff6c0cdf2..38ff342be202c 100644
--- a/apps/user_status/src/services/clearAtService.js
+++ b/apps/user_status/src/services/clearAtService.js
@@ -28,8 +28,8 @@ import moment from '@nextcloud/moment'
/**
* Calculates the actual clearAt timestamp
*
- * @param {Object|null} clearAt The clear-at config
- * @returns {Number|null}
+ * @param {object | null} clearAt The clear-at config
+ * @return {number | null}
*/
const getTimestampForClearAt = (clearAt) => {
if (clearAt === null) {
diff --git a/apps/user_status/src/services/heartbeatService.js b/apps/user_status/src/services/heartbeatService.js
index 4a789a8a01275..a981a0dc246fd 100644
--- a/apps/user_status/src/services/heartbeatService.js
+++ b/apps/user_status/src/services/heartbeatService.js
@@ -26,10 +26,10 @@ import { generateUrl } from '@nextcloud/router'
/**
* Sends a heartbeat
*
- * @param {Boolean} isAway Whether or not the user is active
- * @returns {Promise}
+ * @param {boolean} isAway Whether or not the user is active
+ * @return {Promise}
*/
-const sendHeartbeat = async(isAway) => {
+const sendHeartbeat = async (isAway) => {
const url = generateUrl('/apps/user_status/heartbeat')
const response = await HttpClient.put(url, {
status: isAway ? 'away' : 'online',
diff --git a/apps/user_status/src/services/predefinedStatusService.js b/apps/user_status/src/services/predefinedStatusService.js
index b4c9ed4a96ad3..18887efb8b517 100644
--- a/apps/user_status/src/services/predefinedStatusService.js
+++ b/apps/user_status/src/services/predefinedStatusService.js
@@ -26,9 +26,9 @@ import { generateOcsUrl } from '@nextcloud/router'
/**
* Fetches all predefined statuses from the server
*
- * @returns {Promise}
+ * @return {Promise}
*/
-const fetchAllPredefinedStatuses = async() => {
+const fetchAllPredefinedStatuses = async () => {
const url = generateOcsUrl('apps/user_status/api/v1/predefined_statuses?format=json')
const response = await HttpClient.get(url)
diff --git a/apps/user_status/src/services/statusOptionsService.js b/apps/user_status/src/services/statusOptionsService.js
index 15da11fd5d25d..31f65d92e4476 100644
--- a/apps/user_status/src/services/statusOptionsService.js
+++ b/apps/user_status/src/services/statusOptionsService.js
@@ -26,7 +26,7 @@ import { translate as t } from '@nextcloud/l10n'
/**
* Returns a list of all user-definable statuses
*
- * @returns {Object[]}
+ * @return {object[]}
*/
const getAllStatusOptions = () => {
return [{
diff --git a/apps/user_status/src/services/statusService.js b/apps/user_status/src/services/statusService.js
index caaea503b8ecb..d14e45b4183f8 100644
--- a/apps/user_status/src/services/statusService.js
+++ b/apps/user_status/src/services/statusService.js
@@ -26,9 +26,9 @@ import { generateOcsUrl } from '@nextcloud/router'
/**
* Fetches the current user-status
*
- * @returns {Promise