diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-05-28 18:51:33 +0200 |
---|---|---|
committer | npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com> | 2021-06-02 15:10:01 +0000 |
commit | aef00ddeaf4bfa14a5f99a5e462623624202ad70 (patch) | |
tree | d1f24a239f1c030ac784185edd7f650960f750f6 /apps/files_sharing/src | |
parent | d9a9714675eaeca689302eea8e432ff32ca2f048 (diff) | |
download | nextcloud-server-aef00ddeaf4bfa14a5f99a5e462623624202ad70.tar.gz nextcloud-server-aef00ddeaf4bfa14a5f99a5e462623624202ad70.zip |
Replace proposal-class-private-properties by regular properties
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/models/Share.js | 98 | ||||
-rw-r--r-- | apps/files_sharing/src/services/ExternalLinkActions.js | 10 | ||||
-rw-r--r-- | apps/files_sharing/src/services/ShareSearch.js | 10 | ||||
-rw-r--r-- | apps/files_sharing/src/services/TabSections.js | 8 |
4 files changed, 63 insertions, 63 deletions
diff --git a/apps/files_sharing/src/models/Share.js b/apps/files_sharing/src/models/Share.js index 7a4b96261c0..32d9a78e5f9 100644 --- a/apps/files_sharing/src/models/Share.js +++ b/apps/files_sharing/src/models/Share.js @@ -27,7 +27,7 @@ export default class Share { - #share; + _share; /** * Create the share object @@ -44,7 +44,7 @@ export default class Share { ocsData.mail_send = !!ocsData.mail_send // store state - this.#share = ocsData + this._share = ocsData } /** @@ -59,7 +59,7 @@ export default class Share { * @memberof Sidebar */ get state() { - return this.#share + return this._share } /** @@ -70,7 +70,7 @@ export default class Share { * @memberof Share */ get id() { - return this.#share.id + return this._share.id } /** @@ -81,7 +81,7 @@ export default class Share { * @memberof Share */ get type() { - return this.#share.share_type + return this._share.share_type } /** @@ -93,7 +93,7 @@ export default class Share { * @memberof Share */ get permissions() { - return this.#share.permissions + return this._share.permissions } /** @@ -104,7 +104,7 @@ export default class Share { * @memberof Share */ set permissions(permissions) { - this.#share.permissions = permissions + this._share.permissions = permissions } // SHARE OWNER -------------------------------------------------- @@ -116,7 +116,7 @@ export default class Share { * @memberof Share */ get owner() { - return this.#share.uid_owner + return this._share.uid_owner } /** @@ -127,7 +127,7 @@ export default class Share { * @memberof Share */ get ownerDisplayName() { - return this.#share.displayname_owner + return this._share.displayname_owner } // SHARED WITH -------------------------------------------------- @@ -139,7 +139,7 @@ export default class Share { * @memberof Share */ get shareWith() { - return this.#share.share_with + return this._share.share_with } /** @@ -151,8 +151,8 @@ export default class Share { * @memberof Share */ get shareWithDisplayName() { - return this.#share.share_with_displayname - || this.#share.share_with + return this._share.share_with_displayname + || this._share.share_with } /** @@ -164,8 +164,8 @@ export default class Share { * @memberof Share */ get shareWithDisplayNameUnique() { - return this.#share.share_with_displayname_unique - || this.#share.share_with + return this._share.share_with_displayname_unique + || this._share.share_with } /** @@ -176,7 +176,7 @@ export default class Share { * @memberof Share */ get shareWithLink() { - return this.#share.share_with_link + return this._share.share_with_link } /** @@ -187,7 +187,7 @@ export default class Share { * @memberof Share */ get shareWithAvatar() { - return this.#share.share_with_avatar + return this._share.share_with_avatar } // SHARED FILE OR FOLDER OWNER ---------------------------------- @@ -199,7 +199,7 @@ export default class Share { * @memberof Share */ get uidFileOwner() { - return this.#share.uid_file_owner + return this._share.uid_file_owner } /** @@ -211,8 +211,8 @@ export default class Share { * @memberof Share */ get displaynameFileOwner() { - return this.#share.displayname_file_owner - || this.#share.uid_file_owner + return this._share.displayname_file_owner + || this._share.uid_file_owner } // TIME DATA ---------------------------------------------------- @@ -224,7 +224,7 @@ export default class Share { * @memberof Share */ get createdTime() { - return this.#share.stime + return this._share.stime } /** @@ -235,7 +235,7 @@ export default class Share { * @memberof Share */ get expireDate() { - return this.#share.expiration + return this._share.expiration } /** @@ -246,7 +246,7 @@ export default class Share { * @memberof Share */ set expireDate(date) { - this.#share.expiration = date + this._share.expiration = date } // EXTRA DATA --------------------------------------------------- @@ -258,7 +258,7 @@ export default class Share { * @memberof Share */ get token() { - return this.#share.token + return this._share.token } /** @@ -269,7 +269,7 @@ export default class Share { * @memberof Share */ get note() { - return this.#share.note + return this._share.note } /** @@ -279,7 +279,7 @@ export default class Share { * @memberof Share */ set note(note) { - this.#share.note = note + this._share.note = note } /** @@ -291,7 +291,7 @@ export default class Share { * @memberof Share */ get label() { - return this.#share.label + return this._share.label } /** @@ -302,7 +302,7 @@ export default class Share { * @memberof Share */ set label(label) { - this.#share.label = label + this._share.label = label } /** @@ -313,7 +313,7 @@ export default class Share { * @memberof Share */ get mailSend() { - return this.#share.mail_send === true + return this._share.mail_send === true } /** @@ -324,7 +324,7 @@ export default class Share { * @memberof Share */ get hideDownload() { - return this.#share.hide_download === true + return this._share.hide_download === true } /** @@ -334,7 +334,7 @@ export default class Share { * @memberof Share */ set hideDownload(state) { - this.#share.hide_download = state === true + this._share.hide_download = state === true } /** @@ -345,7 +345,7 @@ export default class Share { * @memberof Share */ get password() { - return this.#share.password + return this._share.password } /** @@ -355,7 +355,7 @@ export default class Share { * @memberof Share */ set password(password) { - this.#share.password = password + this._share.password = password } /** @@ -366,7 +366,7 @@ export default class Share { * @memberof Share */ get sendPasswordByTalk() { - return this.#share.send_password_by_talk + return this._share.send_password_by_talk } /** @@ -377,7 +377,7 @@ export default class Share { * @memberof Share */ set sendPasswordByTalk(sendPasswordByTalk) { - this.#share.send_password_by_talk = sendPasswordByTalk + this._share.send_password_by_talk = sendPasswordByTalk } // SHARED ITEM DATA --------------------------------------------- @@ -389,7 +389,7 @@ export default class Share { * @memberof Share */ get path() { - return this.#share.path + return this._share.path } /** @@ -400,7 +400,7 @@ export default class Share { * @memberof Share */ get itemType() { - return this.#share.item_type + return this._share.item_type } /** @@ -411,7 +411,7 @@ export default class Share { * @memberof Share */ get mimetype() { - return this.#share.mimetype + return this._share.mimetype } /** @@ -422,7 +422,7 @@ export default class Share { * @memberof Share */ get fileSource() { - return this.#share.file_source + return this._share.file_source } /** @@ -435,7 +435,7 @@ export default class Share { * @memberof Share */ get fileTarget() { - return this.#share.file_target + return this._share.file_target } /** @@ -446,7 +446,7 @@ export default class Share { * @memberof Share */ get fileParent() { - return this.#share.file_parent + return this._share.file_parent } // PERMISSIONS Shortcuts @@ -517,7 +517,7 @@ export default class Share { * @memberof Share */ get canEdit() { - return this.#share.can_edit === true + return this._share.can_edit === true } /** @@ -528,7 +528,7 @@ export default class Share { * @memberof Share */ get canDelete() { - return this.#share.can_delete === true + return this._share.can_delete === true } /** @@ -538,7 +538,7 @@ export default class Share { * @memberof Share */ get viaFileid() { - return this.#share.via_fileid + return this._share.via_fileid } /** @@ -548,29 +548,29 @@ export default class Share { * @memberof Share */ get viaPath() { - return this.#share.via_path + return this._share.via_path } // TODO: SORT THOSE PROPERTIES get parent() { - return this.#share.parent + return this._share.parent } get storageId() { - return this.#share.storage_id + return this._share.storage_id } get storage() { - return this.#share.storage + return this._share.storage } get itemSource() { - return this.#share.item_source + return this._share.item_source } get status() { - return this.#share.status + return this._share.status } } diff --git a/apps/files_sharing/src/services/ExternalLinkActions.js b/apps/files_sharing/src/services/ExternalLinkActions.js index 1a4b0c20b93..6bda05e166e 100644 --- a/apps/files_sharing/src/services/ExternalLinkActions.js +++ b/apps/files_sharing/src/services/ExternalLinkActions.js @@ -22,14 +22,14 @@ export default class ExternalLinkActions { - #state; + _state; constructor() { // init empty state - this.#state = {} + this._state = {} // init default values - this.#state.actions = [] + this._state.actions = [] console.debug('OCA.Sharing.ExternalLinkActions initialized') } @@ -41,7 +41,7 @@ export default class ExternalLinkActions { * @returns {Object} the data state */ get state() { - return this.#state + return this._state } /** @@ -53,7 +53,7 @@ export default class ExternalLinkActions { */ registerAction(action) { if (typeof action === 'object' && action.icon && action.name && action.url) { - this.#state.actions.push(action) + this._state.actions.push(action) return true } console.error('Invalid action provided', action) diff --git a/apps/files_sharing/src/services/ShareSearch.js b/apps/files_sharing/src/services/ShareSearch.js index be0bd8c9ffa..a96822223c5 100644 --- a/apps/files_sharing/src/services/ShareSearch.js +++ b/apps/files_sharing/src/services/ShareSearch.js @@ -22,14 +22,14 @@ export default class ShareSearch { - #state; + _state; constructor() { // init empty state - this.#state = {} + this._state = {} // init default values - this.#state.results = [] + this._state.results = [] console.debug('OCA.Sharing.ShareSearch initialized') } @@ -41,7 +41,7 @@ export default class ShareSearch { * @returns {Object} the data state */ get state() { - return this.#state + return this._state } /** @@ -61,7 +61,7 @@ export default class ShareSearch { addNewResult(result) { if (result.displayName.trim() !== '' && typeof result.handler === 'function') { - this.#state.results.push(result) + this._state.results.push(result) return true } console.error('Invalid search result provided', result) diff --git a/apps/files_sharing/src/services/TabSections.js b/apps/files_sharing/src/services/TabSections.js index fd32291a4e4..18fe37299f0 100644 --- a/apps/files_sharing/src/services/TabSections.js +++ b/apps/files_sharing/src/services/TabSections.js @@ -22,21 +22,21 @@ export default class TabSections { - #sections; + _sections; constructor() { - this.#sections = [] + this._sections = [] } /** * @param {registerSectionCallback} section To be called to mount the section to the sharing sidebar */ registerSection(section) { - this.#sections.push(section) + this._sections.push(section) } getSections() { - return this.#sections + return this._sections } } |