diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-12-02 20:32:57 +0300 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-01-08 12:14:05 +0300 |
commit | 74b980310852a0b406fa9d073870f92c409d5444 (patch) | |
tree | 055cbdf57886077bf3a6ea476813deedb54064e0 /apps/files | |
parent | 85bc8513557f5ff37fc283d53893d4cb77ec7c3b (diff) |
Eslint fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/components/TemplatePreview.vue | 3 | ||||
-rw-r--r-- | apps/files/src/models/Tab.js | 2 | ||||
-rw-r--r-- | apps/files/src/services/FileInfo.js | 3 | ||||
-rw-r--r-- | apps/files/src/services/Settings.js | 5 | ||||
-rw-r--r-- | apps/files/src/services/Sidebar.js | 8 | ||||
-rw-r--r-- | apps/files/src/utils/davUtils.js | 3 | ||||
-rw-r--r-- | apps/files/src/utils/fileUtils.js | 4 | ||||
-rw-r--r-- | apps/files/src/views/Sidebar.vue | 49 | ||||
-rw-r--r-- | apps/files/src/views/TemplatePicker.vue | 8 |
9 files changed, 53 insertions, 32 deletions
diff --git a/apps/files/src/components/TemplatePreview.vue b/apps/files/src/components/TemplatePreview.vue index 89162ba4efd..ad152af9ea3 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 b425fc16b2d..e2c3d931024 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 33284df5032..a94436e16a5 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 d07033891a5..887a0400513 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 c7b6ada2aea..6db1d5fa5e4 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 b2a0bb2ebd8..513821df411 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 7b78a85dc0e..f37e939e174 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 efbcdc35134..ec41240e3f2 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 0d18de0df43..4e0fc8c7a54 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) { |