Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,24 @@ node_modules/
*.config.js
tests/lib/

# Ignore all apps except for server apps
apps/*
!apps/accessibility
!apps/comments
!apps/dashboard
!apps/dav
!apps/files
!apps/files_sharing
!apps/files_trashbin
!apps/files_versions
!apps/oauth2
!apps/settings
!apps/systemtags
!apps/user_status
!apps/weather_status
!apps/twofactor_backupcodes
!apps/updatenotification
!apps/workflowengine

# TODO: remove when comments files is not using handlebar templates anymore
apps/comments/src/templates.js
apps/comments/src/templates.js
6 changes: 3 additions & 3 deletions apps/comments/js/comments-app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/comments/js/comments-app.js.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions apps/comments/src/components/Comment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,17 @@ export default {

/**
* Is the current user the author of this comment
* @returns {boolean}
*
* @return {boolean}
*/
isOwnComment() {
return getCurrentUser().uid === this.actorId
},

/**
* Rendered content as html string
* @returns {string}
*
* @return {string}
*/
renderedContent() {
if (this.isEmptyMessage) {
Expand Down Expand Up @@ -208,6 +210,7 @@ export default {
methods: {
/**
* Update local Message on outer change
*
* @param {string} message the message to set
*/
updateLocalMessage(message) {
Expand Down
11 changes: 8 additions & 3 deletions apps/comments/src/views/Comments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -217,6 +219,7 @@ export default {

/**
* Autocomplete @mentions
*
* @param {string} search the query
* @param {Function} callback the callback to process the results with
*/
Expand All @@ -235,14 +238,16 @@ 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)
},

/**
* Remove deleted comment from the list
*
* @param {number} id the deleted comment
*/
onDelete(id) {
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/js/dashboard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/dashboard/js/dashboard.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/dashboard/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,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)
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/src/views/CalDavSettings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('CalDavSettings', () => {
global.OCP = originalOCP
})

test('interactions', async() => {
test('interactions', async () => {
const TLUtils = render(
CalDavSettings,
{
Expand Down
4 changes: 2 additions & 2 deletions apps/files/js/dist/sidebar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files/js/dist/sidebar.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/files/js/dist/templates.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files/js/dist/templates.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion apps/files/src/components/TemplatePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
49 changes: 30 additions & 19 deletions apps/files/src/views/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,31 +121,35 @@ 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
},

/**
* List of all the registered tabs
* @returns {Array}
*
* @return {Array}
*/
tabs() {
return this.Sidebar.tabs
},

/**
* List of all the registered views
* @returns {Array}
*
* @return {Array}
*/
views() {
return this.Sidebar.views
},

/**
* Current user dav root path
* @returns {string}
*
* @return {string}
*/
davPath() {
const user = OC.getCurrentUser().uid
Expand All @@ -154,48 +158,54 @@ 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
},

/**
* Sidebar subtitle
* @returns {string}
*
* @return {string}
*/
subtitle() {
return `${this.size}, ${this.time}`
},

/**
* File last modified formatted string
* @returns {string}
*
* @return {string}
*/
time() {
return OC.Util.relativeModifiedDate(this.fileInfo.mtime)
},

/**
* File last modified full string
* @returns {string}
*
* @return {string}
*/
fullTime() {
return moment(this.fileInfo.mtime).format('LLL')
},

/**
* File size formatted string
* @returns {string}
*
* @return {string}
*/
size() {
return OC.Util.humanFileSize(this.fileInfo.size)
},

/**
* File background/figure to illustrate the sidebar header
* @returns {string}
*
* @return {string}
*/
background() {
return this.getPreviewIfAny(this.fileInfo)
Expand All @@ -204,7 +214,7 @@ export default {
/**
* App sidebar v-binding object
*
* @returns {Object}
* @return {object}
*/
appSidebar() {
if (this.fileInfo) {
Expand Down Expand Up @@ -243,7 +253,7 @@ export default {
/**
* Default action object for the current file
*
* @returns {Object}
* @return {object}
*/
defaultAction() {
return this.fileInfo
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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'
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 6 additions & 2 deletions apps/files/src/views/TemplatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ export default {
computed: {
/**
* Strip away extension from name
* @returns {string}
*
* @return {string}
*/
nameWithoutExt() {
return this.name.indexOf('.') > -1 ? this.name.split('.').slice(0, -1).join('.') : this.name
Expand All @@ -132,7 +133,8 @@ export default {

/**
* Style css vars bin,d
* @returns {Object}
*
* @return {object}
*/
style() {
return {
Expand All @@ -148,6 +150,7 @@ export default {
methods: {
/**
* Open the picker
*
* @param {string} name the file name to create
* @param {object} provider the template provider picked
*/
Expand Down Expand Up @@ -187,6 +190,7 @@ export default {

/**
* Manages the radio template picker change
*
* @param {number} fileid the selected template file id
*/
onCheck(fileid) {
Expand Down
6 changes: 3 additions & 3 deletions apps/files_sharing/js/dist/files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js.map

Large diffs are not rendered by default.

Loading