Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-01-07 14:57:57 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2020-01-07 21:35:45 +0300
commit445274cf93dbae31c6995008dcc0f9834c05d9ca (patch)
tree5f33fb92ff778f2a7effd66a3bd92e345d4c1bc6 /apps
parentfbed6a3416dd96e3698575f67dc57fc861c2ed46 (diff)
Add pending share list to frontend
Signed-off-by: Julius Härtl <jus@bitgrid.net> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/css/files.scss1
-rw-r--r--apps/files/tests/Controller/ViewControllerTest.php11
-rw-r--r--apps/files_sharing/js/app.js81
-rw-r--r--apps/files_sharing/js/dist/files_sharing.js2
-rw-r--r--apps/files_sharing/js/dist/files_sharing.js.map2
-rw-r--r--apps/files_sharing/js/sharedfilelist.js20
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php9
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php30
8 files changed, 148 insertions, 8 deletions
diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss
index 40248360c29..bedca77a6f7 100644
--- a/apps/files/css/files.scss
+++ b/apps/files/css/files.scss
@@ -129,6 +129,7 @@
}
.nav-icon-sharingin,
.nav-icon-sharingout,
+.nav-icon-pendingshares,
.nav-icon-shareoverview {
@include icon-color('share', 'files', $color-black);
}
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php
index fd6ec5aaa3c..f07af2a2fe5 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -288,6 +288,13 @@ class ViewControllerTest extends TestCase {
'order' => 19,
'name' => \OC::$server->getL10N('files_sharing')->t('Deleted shares'),
],
+ [
+ 'id' => 'pendingshares',
+ 'appname' => 'files_sharing',
+ 'script' => 'list.php',
+ 'order' => 19,
+ 'name' => \OC::$server->getL10N('files_sharing')->t('Pending shares'),
+ ],
],
'active' => false,
'icon' => '',
@@ -348,6 +355,10 @@ class ViewControllerTest extends TestCase {
'id' => 'deletedshares',
'content' => null,
],
+ 'pendingshares' => [
+ 'id' => 'pendingshares',
+ 'content' => null
+ ],
'shareoverview' => [
'id' => 'shareoverview',
'content' => null,
diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js
index 6cf7a805ada..1a686ee228d 100644
--- a/apps/files_sharing/js/app.js
+++ b/apps/files_sharing/js/app.js
@@ -22,6 +22,7 @@ OCA.Sharing.App = {
_inFileList: null,
_outFileList: null,
_overviewFileList: null,
+ _pendingFileList: null,
initSharingIn: function($el) {
if (this._inFileList) {
@@ -129,6 +130,33 @@ OCA.Sharing.App = {
return this._deletedFileList
},
+ initSharingPening: function($el) {
+ if (this._pendingFileList) {
+ return this._pendingFileList
+ }
+ this._pendingFileList = new OCA.Sharing.FileList(
+ $el,
+ {
+ id: 'shares.pending',
+ showPending: true,
+ sharedWithUser: true,
+ fileActions: this._acceptShareAction(),
+ config: OCA.Files.App.getFilesConfig(),
+ // The file list is created when a "show" event is handled, so
+ // it should be marked as "shown" like it would have been done
+ // if handling the event with the file list already created.
+ shown: true,
+ }
+ )
+
+ this._extendFileList(this._pendingFileList)
+ this._pendingFileList.appName = t('files_sharing', 'Pending shares')
+ this._pendingFileList.$el.find('#emptycontent').html('<div class="icon-share"></div>'
+ + '<h2>' + t('files_sharing', 'No pending shares') + '</h2>'
+ + '<p>' + t('files_sharing', 'Shares you have received but not confirmed will show up here') + '</p>')
+ return this._pendingFileList
+ },
+
initShareingOverview: function($el) {
if (this._overviewFileList) {
return this._overviewFileList
@@ -178,6 +206,12 @@ OCA.Sharing.App = {
}
},
+ removeSharingPending: function() {
+ if (this._pendingFileList) {
+ this._pendingFileList.$fileList.empty()
+ }
+ },
+
removeSharingOverview: function() {
if (this._overviewFileList) {
this._overviewFileList.$fileList.empty()
@@ -249,6 +283,47 @@ OCA.Sharing.App = {
return fileActions
},
+ _acceptShareAction: function() {
+ const fileActions = new OCA.Files.FileActions()
+ fileActions.registerAction({
+ name: 'Accept share',
+ displayName: t('files_sharing', 'Accept share'),
+ mime: 'all',
+ permissions: OC.PERMISSION_ALL,
+ iconClass: 'icon-checkmark',
+ type: OCA.Files.FileActions.TYPE_INLINE,
+ actionHandler: function(fileName, context) {
+ const shareId = context.$file.data('shareId')
+ $.post(OC.linkToOCS('apps/files_sharing/api/v1/shares/pending', 2) + shareId)
+ .success(function(result) {
+ context.fileList.remove(context.fileInfoModel.attributes.name)
+ }).fail(function() {
+ OC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to accept the share.'))
+ })
+ },
+ })
+ fileActions.registerAction({
+ name: 'Reject share',
+ displayName: t('files_sharing', 'Reject share'),
+ mime: 'all',
+ permissions: OC.PERMISSION_ALL,
+ iconClass: 'icon-close',
+ type: OCA.Files.FileActions.TYPE_INLINE,
+ actionHandler: function(fileName, context) {
+ const shareId = context.$file.data('shareId')
+ $.ajax({
+ url: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + shareId,
+ type: 'DELETE',
+ }).success(function(result) {
+ context.fileList.remove(context.fileInfoModel.attributes.name)
+ }).fail(function() {
+ OC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to reject the share.'))
+ })
+ },
+ })
+ return fileActions
+ },
+
_onActionsUpdated: function(ev) {
_.each([this._inFileList, this._outFileList, this._linkFileList], function(list) {
if (!list) {
@@ -297,6 +372,12 @@ $(document).ready(function() {
$('#app-content-deletedshares').on('hide', function() {
OCA.Sharing.App.removeSharingDeleted()
})
+ $('#app-content-pendingshares').on('show', function(e) {
+ OCA.Sharing.App.initSharingPening($(e.target))
+ })
+ $('#app-content-pendingshares').on('hide', function() {
+ OCA.Sharing.App.removeSharingPending()
+ })
$('#app-content-shareoverview').on('show', function(e) {
OCA.Sharing.App.initShareingOverview($(e.target))
})
diff --git a/apps/files_sharing/js/dist/files_sharing.js b/apps/files_sharing/js/dist/files_sharing.js
index e89a4075e70..ee608f58f6c 100644
--- a/apps/files_sharing/js/dist/files_sharing.js
+++ b/apps/files_sharing/js/dist/files_sharing.js
@@ -1,2 +1,2 @@
-!function(e){var i={};function t(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=i,t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:s})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var n in e)t.d(s,n,function(i){return e[i]}.bind(null,n));return s},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="/js/",t(t.s=836)}({836:function(e,i,t){"use strict";t.r(i);t(837),t(838);t.nc=btoa(OC.requestToken),t.p=OC.linkTo("files_sharing","js/dist/")},837:function(e,i){OCA.Sharing||(OCA.Sharing={}),OCA.Sharing.App={_inFileList:null,_outFileList:null,_overviewFileList:null,initSharingIn:function(e){return this._inFileList?this._inFileList:(this._inFileList=new OCA.Sharing.FileList(e,{id:"shares.self",sharedWithUser:!0,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._inFileList),this._inFileList.appName=t("files_sharing","Shared with you"),this._inFileList.$el.find("#emptycontent").html('<div class="icon-shared"></div><h2>'+t("files_sharing","Nothing shared with you yet")+"</h2><p>"+t("files_sharing","Files and folders others share with you will show up here")+"</p>"),this._inFileList)},initSharingOut:function(e){return this._outFileList?this._outFileList:(this._outFileList=new OCA.Sharing.FileList(e,{id:"shares.others",sharedWithUser:!1,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._outFileList),this._outFileList.appName=t("files_sharing","Shared with others"),this._outFileList.$el.find("#emptycontent").html('<div class="icon-shared"></div><h2>'+t("files_sharing","Nothing shared yet")+"</h2><p>"+t("files_sharing","Files and folders you share will show up here")+"</p>"),this._outFileList)},initSharingLinks:function(e){return this._linkFileList?this._linkFileList:(this._linkFileList=new OCA.Sharing.FileList(e,{id:"shares.link",linksOnly:!0,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._linkFileList),this._linkFileList.appName=t("files_sharing","Shared by link"),this._linkFileList.$el.find("#emptycontent").html('<div class="icon-public"></div><h2>'+t("files_sharing","No shared links")+"</h2><p>"+t("files_sharing","Files and folders you share by link will show up here")+"</p>"),this._linkFileList)},initSharingDeleted:function(e){return this._deletedFileList?this._deletedFileList:(this._deletedFileList=new OCA.Sharing.FileList(e,{id:"shares.deleted",showDeleted:!0,sharedWithUser:!0,fileActions:this._restoreShareAction(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._deletedFileList),this._deletedFileList.appName=t("files_sharing","Deleted shares"),this._deletedFileList.$el.find("#emptycontent").html('<div class="icon-share"></div><h2>'+t("files_sharing","No deleted shares")+"</h2><p>"+t("files_sharing","Shares you deleted will show up here")+"</p>"),this._deletedFileList)},initShareingOverview:function(e){return this._overviewFileList?this._overviewFileList:(this._overviewFileList=new OCA.Sharing.FileList(e,{id:"shares.overview",config:OCA.Files.App.getFilesConfig(),isOverview:!0,shown:!0}),this._extendFileList(this._overviewFileList),this._overviewFileList.appName=t("files_sharing","Shares"),this._overviewFileList.$el.find("#emptycontent").html('<div class="icon-share"></div><h2>'+t("files_sharing","No shares")+"</h2><p>"+t("files_sharing","Shares will show up here")+"</p>"),this._overviewFileList)},removeSharingIn:function(){this._inFileList&&this._inFileList.$fileList.empty()},removeSharingOut:function(){this._outFileList&&this._outFileList.$fileList.empty()},removeSharingLinks:function(){this._linkFileList&&this._linkFileList.$fileList.empty()},removeSharingDeleted:function(){this._deletedFileList&&this._deletedFileList.$fileList.empty()},removeSharingOverview:function(){this._overviewFileList&&this._overviewFileList.$fileList.empty()},destroy:function(){OCA.Files.fileActions.off("setDefault.app-sharing",this._onActionsUpdated),OCA.Files.fileActions.off("registerAction.app-sharing",this._onActionsUpdated),this.removeSharingIn(),this.removeSharingOut(),this.removeSharingLinks(),this._inFileList=null,this._outFileList=null,this._linkFileList=null,this._overviewFileList=null,delete this._globalActionsInitialized},_createFileActions:function(){var e=new OCA.Files.FileActions;return e.registerDefaultActions(),e.merge(OCA.Files.fileActions),this._globalActionsInitialized||(this._onActionsUpdated=_.bind(this._onActionsUpdated,this),OCA.Files.fileActions.on("setDefault.app-sharing",this._onActionsUpdated),OCA.Files.fileActions.on("registerAction.app-sharing",this._onActionsUpdated),this._globalActionsInitialized=!0),e.register("dir","Open",OC.PERMISSION_READ,"",(function(e,i){OCA.Files.App.setActiveView("files",{silent:!0}),OCA.Files.App.fileList.changeDirectory(OC.joinPaths(i.$file.attr("data-path"),e),!0,!0)})),e.setDefault("dir","Open"),e},_restoreShareAction:function(){var e=new OCA.Files.FileActions;return e.registerAction({name:"Restore",displayName:"",altText:t("files_sharing","Restore share"),mime:"all",permissions:OC.PERMISSION_ALL,iconClass:"icon-history",type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(e,i){var s=i.$file.data("shareId");$.post(OC.linkToOCS("apps/files_sharing/api/v1/deletedshares",2)+s).success((function(e){i.fileList.remove(i.fileInfoModel.attributes.name)})).fail((function(){OC.Notification.showTemporary(t("files_sharing","Something happened. Unable to restore the share."))}))}}),e},_onActionsUpdated:function(e){_.each([this._inFileList,this._outFileList,this._linkFileList],(function(i){i&&(e.action?i.fileActions.registerAction(e.action):e.defaultAction&&i.fileActions.setDefault(e.defaultAction.mime,e.defaultAction.name))}))},_extendFileList:function(e){e.fileSummary.$el.find(".filesize").remove()}},$(document).ready((function(){$("#app-content-sharingin").on("show",(function(e){OCA.Sharing.App.initSharingIn($(e.target))})),$("#app-content-sharingin").on("hide",(function(){OCA.Sharing.App.removeSharingIn()})),$("#app-content-sharingout").on("show",(function(e){OCA.Sharing.App.initSharingOut($(e.target))})),$("#app-content-sharingout").on("hide",(function(){OCA.Sharing.App.removeSharingOut()})),$("#app-content-sharinglinks").on("show",(function(e){OCA.Sharing.App.initSharingLinks($(e.target))})),$("#app-content-sharinglinks").on("hide",(function(){OCA.Sharing.App.removeSharingLinks()})),$("#app-content-deletedshares").on("show",(function(e){OCA.Sharing.App.initSharingDeleted($(e.target))})),$("#app-content-deletedshares").on("hide",(function(){OCA.Sharing.App.removeSharingDeleted()})),$("#app-content-shareoverview").on("show",(function(e){OCA.Sharing.App.initShareingOverview($(e.target))})),$("#app-content-shareoverview").on("hide",(function(){OCA.Sharing.App.removeSharingOverview()}))}))},838:function(e,i){var s;(s=function(e,i){this.initialize(e,i)}).prototype=_.extend({},OCA.Files.FileList.prototype,{appName:"Shares",_sharedWithUser:!1,_linksOnly:!1,_showDeleted:!1,_clientSideSort:!0,_allowSelection:!1,_isOverview:!1,initialize:function(e,i){OCA.Files.FileList.prototype.initialize.apply(this,arguments),this.initialized||(i&&i.sharedWithUser&&(this._sharedWithUser=!0),i&&i.linksOnly&&(this._linksOnly=!0),i&&i.showDeleted&&(this._showDeleted=!0),i&&i.isOverview&&(this._isOverview=!0))},_renderRow:function(){return OCA.Files.FileList.prototype._renderRow.apply(this,arguments)},_createRow:function(e){var i=OCA.Files.FileList.prototype._createRow.apply(this,arguments);if(i.find(".filesize").remove(),i.find("td.date").before(i.children("td:first")),i.find("td.filename input:checkbox").remove(),i.attr("data-share-id",_.pluck(e.shares,"id").join(",")),this._sharedWithUser){i.attr("data-share-owner",e.shareOwner),i.attr("data-mounttype","shared-root");var s=parseInt(i.attr("data-permissions"))|OC.PERMISSION_DELETE;i.attr("data-permissions",s)}if(this._showDeleted&&(s=e.permissions,i.attr("data-share-permissions",s)),this._linksOnly){var n=0;e.shares&&null!==e.shares[0].expiration&&(n=moment(e.shares[0].expiration).valueOf()),i.attr("data-expiration",n);var r,a,o=Math.round((n-(new Date).getTime())/1e3/60/60/24*5);o>=160&&(o=160),n>0?(r=OC.Util.formatDate(n),a=OC.Util.relativeModifiedDate(n)):(r=t("files_sharing","No expiration date set"),a="",o=160),td=$("<td></td>").attr({class:"date"}),td.append($("<span></span>").attr({class:"modified",title:r,style:"color:rgb("+o+","+o+","+o+")"}).text(a).tooltip({placement:"top"})),i.append(td)}return i},setSharedWithUser:function(e){this._sharedWithUser=!!e},updateEmptyContent:function(){var e=this.getCurrentDirectory();"/"===e?(this.$el.find("#emptycontent").toggleClass("hidden",!this.isEmpty),this.$el.find("#filestable thead th").toggleClass("hidden",this.isEmpty),this._linksOnly||this.$el.find("th.column-expiration").addClass("hidden")):OCA.Files.FileList.prototype.updateEmptyContent.apply(this,arguments)},getDirectoryPermissions:function(){return OC.PERMISSION_READ|OC.PERMISSION_DELETE},updateStorageStatistics:function(){},updateRow:function(e,i,t){return e},reload:function(){this.showMask(),this._reloadCall&&this._reloadCall.abort(),this._setCurrentDir("/",!1);var e=[],i={url:OC.linkToOCS("apps/files_sharing/api/v1",2)+"deletedshares",data:{format:"json",include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},t={url:OC.linkToOCS("apps/files_sharing/api/v1")+"shares",data:{format:"json",shared_with_me:!1!==this._sharedWithUser,include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},s={url:OC.linkToOCS("apps/files_sharing/api/v1")+"remote_shares",data:{format:"json",include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}};this._showDeleted?e.push($.ajax(i)):(e.push($.ajax(t)),(!1!==this._sharedWithUser||this._isOverview)&&e.push($.ajax(s)),this._isOverview&&(t.data.shared_with_me=!t.data.shared_with_me,e.push($.ajax(t)))),this._reloadCall=$.when.apply($,e);var n=this.reloadCallback.bind(this);return this._reloadCall.then(n,n)},reloadCallback:function(e,i,s){delete this._reloadCall,this.hideMask(),this.$el.find("#headerSharedWith").text(t("files_sharing",this._sharedWithUser?"Shared by":"Shared with"));var n=[];return e[0]&&e[0].ocs&&(e=e[0]),i&&i[0]&&i[0].ocs&&(i=i[0]),s&&s[0]&&s[0].ocs&&(s=s[0]),e.ocs&&e.ocs.data&&(n=n.concat(this._makeFilesFromShares(e.ocs.data,this._sharedWithUser))),i&&i.ocs&&i.ocs.data&&(n=n.concat(this._makeFilesFromRemoteShares(i.ocs.data))),s&&s.ocs&&s.ocs.data&&(n=n.concat(this._makeFilesFromShares(s.ocs.data,!this._sharedWithUser))),this.setFiles(n),!0},_makeFilesFromRemoteShares:function(e){var i=e;return i=_.chain(i).map((function(e){var i={shareOwner:e.owner+"@"+e.remote.replace(/.*?:\/\//g,""),name:OC.basename(e.mountpoint),mtime:1e3*e.mtime,mimetype:e.mimetype,type:e.type,id:e.file_id,path:OC.dirname(e.mountpoint),permissions:e.permissions,tags:e.tags||[]};return i.shares=[{id:e.id,type:OC.Share.SHARE_TYPE_REMOTE}],i})).value()},_makeFilesFromShares:function(e,i){var t=e;return this._linksOnly&&(t=_.filter(e,(function(e){return e.share_type===OC.Share.SHARE_TYPE_LINK}))),(t=_.chain(t).map((function(e){var t={id:e.file_source,icon:OC.MimeType.getIconUrl(e.mimetype),mimetype:e.mimetype,tags:e.tags||[]};return"folder"===e.item_type?(t.type="dir",t.mimetype="httpd/unix-directory"):t.type="file",t.share={id:e.id,type:e.share_type,target:e.share_with,stime:1e3*e.stime,expiration:e.expiration},i?(t.shareOwner=e.displayname_owner,t.shareOwnerId=e.uid_owner,t.name=OC.basename(e.file_target),t.path=OC.dirname(e.file_target),t.permissions=e.permissions,t.path&&(t.extraData=e.file_target)):(e.share_type!==OC.Share.SHARE_TYPE_LINK&&(t.share.targetDisplayName=e.share_with_displayname,t.share.targetShareWithId=e.share_with),t.name=OC.basename(e.path),t.path=OC.dirname(e.path),t.permissions=OC.PERMISSION_ALL,t.path&&(t.extraData=e.path)),t})).reduce((function(e,i){var t=e[i.id],s=i.share.targetDisplayName,n=i.share.targetShareWithId;return t?(i.share.stime>t.mtime&&(t.mtime=i.share.stime),t.shares.push(i.share)):((t=e[i.id]=i).shares=[i.share],t.recipients={},t.recipientData={},t.shareTypes={},t.recipientsCount=0,t.mtime=i.share.stime),s&&(t.recipientsCount<4&&(t.recipients[s]=!0,t.recipientData[t.recipientsCount]={shareWith:n,shareWithDisplayName:s}),t.recipientsCount++),t.shareTypes[i.share.type]=!0,delete i.share,e}),{}).values().each((function(e){e.mountType="shared",delete e.recipientsCount,i?delete e.shareTypes:e.shareTypes=_.keys(e.shareTypes)})).value()).sort(this._sortComparator)}}),OCA.Sharing.FileList=s}});
+!function(e){var i={};function t(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=i,t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:s})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var n in e)t.d(s,n,function(i){return e[i]}.bind(null,n));return s},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="/js/",t(t.s=836)}({836:function(e,i,t){"use strict";t.r(i);t(837),t(838);t.nc=btoa(OC.requestToken),t.p=OC.linkTo("files_sharing","js/dist/")},837:function(e,i){OCA.Sharing||(OCA.Sharing={}),OCA.Sharing.App={_inFileList:null,_outFileList:null,_overviewFileList:null,_pendingFileList:null,initSharingIn:function(e){return this._inFileList?this._inFileList:(this._inFileList=new OCA.Sharing.FileList(e,{id:"shares.self",sharedWithUser:!0,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._inFileList),this._inFileList.appName=t("files_sharing","Shared with you"),this._inFileList.$el.find("#emptycontent").html('<div class="icon-shared"></div><h2>'+t("files_sharing","Nothing shared with you yet")+"</h2><p>"+t("files_sharing","Files and folders others share with you will show up here")+"</p>"),this._inFileList)},initSharingOut:function(e){return this._outFileList?this._outFileList:(this._outFileList=new OCA.Sharing.FileList(e,{id:"shares.others",sharedWithUser:!1,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._outFileList),this._outFileList.appName=t("files_sharing","Shared with others"),this._outFileList.$el.find("#emptycontent").html('<div class="icon-shared"></div><h2>'+t("files_sharing","Nothing shared yet")+"</h2><p>"+t("files_sharing","Files and folders you share will show up here")+"</p>"),this._outFileList)},initSharingLinks:function(e){return this._linkFileList?this._linkFileList:(this._linkFileList=new OCA.Sharing.FileList(e,{id:"shares.link",linksOnly:!0,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._linkFileList),this._linkFileList.appName=t("files_sharing","Shared by link"),this._linkFileList.$el.find("#emptycontent").html('<div class="icon-public"></div><h2>'+t("files_sharing","No shared links")+"</h2><p>"+t("files_sharing","Files and folders you share by link will show up here")+"</p>"),this._linkFileList)},initSharingDeleted:function(e){return this._deletedFileList?this._deletedFileList:(this._deletedFileList=new OCA.Sharing.FileList(e,{id:"shares.deleted",showDeleted:!0,sharedWithUser:!0,fileActions:this._restoreShareAction(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._deletedFileList),this._deletedFileList.appName=t("files_sharing","Deleted shares"),this._deletedFileList.$el.find("#emptycontent").html('<div class="icon-share"></div><h2>'+t("files_sharing","No deleted shares")+"</h2><p>"+t("files_sharing","Shares you deleted will show up here")+"</p>"),this._deletedFileList)},initSharingPening:function(e){return this._pendingFileList?this._pendingFileList:(this._pendingFileList=new OCA.Sharing.FileList(e,{id:"shares.pending",showPending:!0,sharedWithUser:!0,fileActions:this._acceptShareAction(),config:OCA.Files.App.getFilesConfig(),shown:!0}),this._extendFileList(this._pendingFileList),this._pendingFileList.appName=t("files_sharing","Pending shares"),this._pendingFileList.$el.find("#emptycontent").html('<div class="icon-share"></div><h2>'+t("files_sharing","No pending shares")+"</h2><p>"+t("files_sharing","Shares you have received but not confirmed will show up here")+"</p>"),this._pendingFileList)},initShareingOverview:function(e){return this._overviewFileList?this._overviewFileList:(this._overviewFileList=new OCA.Sharing.FileList(e,{id:"shares.overview",config:OCA.Files.App.getFilesConfig(),isOverview:!0,shown:!0}),this._extendFileList(this._overviewFileList),this._overviewFileList.appName=t("files_sharing","Shares"),this._overviewFileList.$el.find("#emptycontent").html('<div class="icon-share"></div><h2>'+t("files_sharing","No shares")+"</h2><p>"+t("files_sharing","Shares will show up here")+"</p>"),this._overviewFileList)},removeSharingIn:function(){this._inFileList&&this._inFileList.$fileList.empty()},removeSharingOut:function(){this._outFileList&&this._outFileList.$fileList.empty()},removeSharingLinks:function(){this._linkFileList&&this._linkFileList.$fileList.empty()},removeSharingDeleted:function(){this._deletedFileList&&this._deletedFileList.$fileList.empty()},removeSharingPending:function(){this._pendingFileList&&this._pendingFileList.$fileList.empty()},removeSharingOverview:function(){this._overviewFileList&&this._overviewFileList.$fileList.empty()},destroy:function(){OCA.Files.fileActions.off("setDefault.app-sharing",this._onActionsUpdated),OCA.Files.fileActions.off("registerAction.app-sharing",this._onActionsUpdated),this.removeSharingIn(),this.removeSharingOut(),this.removeSharingLinks(),this._inFileList=null,this._outFileList=null,this._linkFileList=null,this._overviewFileList=null,delete this._globalActionsInitialized},_createFileActions:function(){var e=new OCA.Files.FileActions;return e.registerDefaultActions(),e.merge(OCA.Files.fileActions),this._globalActionsInitialized||(this._onActionsUpdated=_.bind(this._onActionsUpdated,this),OCA.Files.fileActions.on("setDefault.app-sharing",this._onActionsUpdated),OCA.Files.fileActions.on("registerAction.app-sharing",this._onActionsUpdated),this._globalActionsInitialized=!0),e.register("dir","Open",OC.PERMISSION_READ,"",(function(e,i){OCA.Files.App.setActiveView("files",{silent:!0}),OCA.Files.App.fileList.changeDirectory(OC.joinPaths(i.$file.attr("data-path"),e),!0,!0)})),e.setDefault("dir","Open"),e},_restoreShareAction:function(){var e=new OCA.Files.FileActions;return e.registerAction({name:"Restore",displayName:"",altText:t("files_sharing","Restore share"),mime:"all",permissions:OC.PERMISSION_ALL,iconClass:"icon-history",type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(e,i){var s=i.$file.data("shareId");$.post(OC.linkToOCS("apps/files_sharing/api/v1/deletedshares",2)+s).success((function(e){i.fileList.remove(i.fileInfoModel.attributes.name)})).fail((function(){OC.Notification.showTemporary(t("files_sharing","Something happened. Unable to restore the share."))}))}}),e},_acceptShareAction:function(){var e=new OCA.Files.FileActions;return e.registerAction({name:"Accept share",displayName:t("files_sharing","Accept share"),mime:"all",permissions:OC.PERMISSION_ALL,iconClass:"icon-checkmark",type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(e,i){var s=i.$file.data("shareId");$.post(OC.linkToOCS("apps/files_sharing/api/v1/shares/pending",2)+s).success((function(e){i.fileList.remove(i.fileInfoModel.attributes.name)})).fail((function(){OC.Notification.showTemporary(t("files_sharing","Something happened. Unable to accept the share."))}))}}),e.registerAction({name:"Reject share",displayName:t("files_sharing","Reject share"),mime:"all",permissions:OC.PERMISSION_ALL,iconClass:"icon-close",type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(e,i){var s=i.$file.data("shareId");$.ajax({url:OC.linkToOCS("apps/files_sharing/api/v1/shares",2)+s,type:"DELETE"}).success((function(e){i.fileList.remove(i.fileInfoModel.attributes.name)})).fail((function(){OC.Notification.showTemporary(t("files_sharing","Something happened. Unable to reject the share."))}))}}),e},_onActionsUpdated:function(e){_.each([this._inFileList,this._outFileList,this._linkFileList],(function(i){i&&(e.action?i.fileActions.registerAction(e.action):e.defaultAction&&i.fileActions.setDefault(e.defaultAction.mime,e.defaultAction.name))}))},_extendFileList:function(e){e.fileSummary.$el.find(".filesize").remove()}},$(document).ready((function(){$("#app-content-sharingin").on("show",(function(e){OCA.Sharing.App.initSharingIn($(e.target))})),$("#app-content-sharingin").on("hide",(function(){OCA.Sharing.App.removeSharingIn()})),$("#app-content-sharingout").on("show",(function(e){OCA.Sharing.App.initSharingOut($(e.target))})),$("#app-content-sharingout").on("hide",(function(){OCA.Sharing.App.removeSharingOut()})),$("#app-content-sharinglinks").on("show",(function(e){OCA.Sharing.App.initSharingLinks($(e.target))})),$("#app-content-sharinglinks").on("hide",(function(){OCA.Sharing.App.removeSharingLinks()})),$("#app-content-deletedshares").on("show",(function(e){OCA.Sharing.App.initSharingDeleted($(e.target))})),$("#app-content-deletedshares").on("hide",(function(){OCA.Sharing.App.removeSharingDeleted()})),$("#app-content-pendingshares").on("show",(function(e){OCA.Sharing.App.initSharingPening($(e.target))})),$("#app-content-pendingshares").on("hide",(function(){OCA.Sharing.App.removeSharingPending()})),$("#app-content-shareoverview").on("show",(function(e){OCA.Sharing.App.initShareingOverview($(e.target))})),$("#app-content-shareoverview").on("hide",(function(){OCA.Sharing.App.removeSharingOverview()}))}))},838:function(e,i){var s;(s=function(e,i){this.initialize(e,i)}).prototype=_.extend({},OCA.Files.FileList.prototype,{appName:"Shares",_sharedWithUser:!1,_linksOnly:!1,_showDeleted:!1,_showPending:!1,_clientSideSort:!0,_allowSelection:!1,_isOverview:!1,initialize:function(e,i){OCA.Files.FileList.prototype.initialize.apply(this,arguments),this.initialized||(i&&i.sharedWithUser&&(this._sharedWithUser=!0),i&&i.linksOnly&&(this._linksOnly=!0),i&&i.showDeleted&&(this._showDeleted=!0),i&&i.showPending&&(this._showPending=!0),i&&i.isOverview&&(this._isOverview=!0))},_renderRow:function(){return OCA.Files.FileList.prototype._renderRow.apply(this,arguments)},_createRow:function(e){var i=OCA.Files.FileList.prototype._createRow.apply(this,arguments);if(i.find(".filesize").remove(),i.find("td.date").before(i.children("td:first")),i.find("td.filename input:checkbox").remove(),i.attr("data-share-id",_.pluck(e.shares,"id").join(",")),this._sharedWithUser){i.attr("data-share-owner",e.shareOwner),i.attr("data-mounttype","shared-root");var s=parseInt(i.attr("data-permissions"))|OC.PERMISSION_DELETE;i.attr("data-permissions",s)}if((this._showDeleted||this._showPending)&&(s=e.permissions,i.attr("data-share-permissions",s)),this._linksOnly){var n=0;e.shares&&null!==e.shares[0].expiration&&(n=moment(e.shares[0].expiration).valueOf()),i.attr("data-expiration",n);var a,r,o=Math.round((n-(new Date).getTime())/1e3/60/60/24*5);o>=160&&(o=160),n>0?(a=OC.Util.formatDate(n),r=OC.Util.relativeModifiedDate(n)):(a=t("files_sharing","No expiration date set"),r="",o=160),td=$("<td></td>").attr({class:"date"}),td.append($("<span></span>").attr({class:"modified",title:a,style:"color:rgb("+o+","+o+","+o+")"}).text(r).tooltip({placement:"top"})),i.append(td)}return i},setSharedWithUser:function(e){this._sharedWithUser=!!e},updateEmptyContent:function(){var e=this.getCurrentDirectory();"/"===e?(this.$el.find("#emptycontent").toggleClass("hidden",!this.isEmpty),this.$el.find("#filestable thead th").toggleClass("hidden",this.isEmpty),this._linksOnly||this.$el.find("th.column-expiration").addClass("hidden")):OCA.Files.FileList.prototype.updateEmptyContent.apply(this,arguments)},getDirectoryPermissions:function(){return OC.PERMISSION_READ|OC.PERMISSION_DELETE},updateStorageStatistics:function(){},updateRow:function(e,i,t){return e},reload:function(){this.showMask(),this._reloadCall&&this._reloadCall.abort(),this._setCurrentDir("/",!1);var e=[],i={url:OC.linkToOCS("apps/files_sharing/api/v1",2)+"deletedshares",data:{format:"json",include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},t={url:OC.linkToOCS("apps/files_sharing/api/v1/shares",2)+"pending",data:{format:"json"},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},s={url:OC.linkToOCS("apps/files_sharing/api/v1")+"shares",data:{format:"json",shared_with_me:!1!==this._sharedWithUser,include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},n={url:OC.linkToOCS("apps/files_sharing/api/v1")+"remote_shares",data:{format:"json",include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}};this._showDeleted?e.push($.ajax(i)):this._showPending?e.push($.ajax(t)):(e.push($.ajax(s)),(!1!==this._sharedWithUser||this._isOverview)&&e.push($.ajax(n)),this._isOverview&&(s.data.shared_with_me=!s.data.shared_with_me,e.push($.ajax(s)))),this._reloadCall=$.when.apply($,e);var a=this.reloadCallback.bind(this);return this._reloadCall.then(a,a)},reloadCallback:function(e,i,s){delete this._reloadCall,this.hideMask(),this.$el.find("#headerSharedWith").text(t("files_sharing",this._sharedWithUser?"Shared by":"Shared with"));var n=[];return e[0]&&e[0].ocs&&(e=e[0]),i&&i[0]&&i[0].ocs&&(i=i[0]),s&&s[0]&&s[0].ocs&&(s=s[0]),e.ocs&&e.ocs.data&&(n=n.concat(this._makeFilesFromShares(e.ocs.data,this._sharedWithUser))),i&&i.ocs&&i.ocs.data&&(n=n.concat(this._makeFilesFromRemoteShares(i.ocs.data))),s&&s.ocs&&s.ocs.data&&(n=n.concat(this._makeFilesFromShares(s.ocs.data,!this._sharedWithUser))),this.setFiles(n),!0},_makeFilesFromRemoteShares:function(e){var i=e;return i=_.chain(i).map((function(e){var i={shareOwner:e.owner+"@"+e.remote.replace(/.*?:\/\//g,""),name:OC.basename(e.mountpoint),mtime:1e3*e.mtime,mimetype:e.mimetype,type:e.type,id:e.file_id,path:OC.dirname(e.mountpoint),permissions:e.permissions,tags:e.tags||[]};return i.shares=[{id:e.id,type:OC.Share.SHARE_TYPE_REMOTE}],i})).value()},_makeFilesFromShares:function(e,i){var t=e;return this._linksOnly&&(t=_.filter(e,(function(e){return e.share_type===OC.Share.SHARE_TYPE_LINK}))),(t=_.chain(t).map((function(e){var t={id:e.file_source,icon:OC.MimeType.getIconUrl(e.mimetype),mimetype:e.mimetype,tags:e.tags||[]};return"folder"===e.item_type?(t.type="dir",t.mimetype="httpd/unix-directory"):t.type="file",t.share={id:e.id,type:e.share_type,target:e.share_with,stime:1e3*e.stime,expiration:e.expiration},i?(t.shareOwner=e.displayname_owner,t.shareOwnerId=e.uid_owner,t.name=OC.basename(e.file_target),t.path=OC.dirname(e.file_target),t.permissions=e.permissions,t.path&&(t.extraData=e.file_target)):(e.share_type!==OC.Share.SHARE_TYPE_LINK&&(t.share.targetDisplayName=e.share_with_displayname,t.share.targetShareWithId=e.share_with),t.name=OC.basename(e.path),t.path=OC.dirname(e.path),t.permissions=OC.PERMISSION_ALL,t.path&&(t.extraData=e.path)),t})).reduce((function(e,i){var t=e[i.id],s=i.share.targetDisplayName,n=i.share.targetShareWithId;return t?(i.share.stime>t.mtime&&(t.mtime=i.share.stime),t.shares.push(i.share)):((t=e[i.id]=i).shares=[i.share],t.recipients={},t.recipientData={},t.shareTypes={},t.recipientsCount=0,t.mtime=i.share.stime),s&&(t.recipientsCount<4&&(t.recipients[s]=!0,t.recipientData[t.recipientsCount]={shareWith:n,shareWithDisplayName:s}),t.recipientsCount++),t.shareTypes[i.share.type]=!0,delete i.share,e}),{}).values().each((function(e){e.mountType="shared",delete e.recipientsCount,i?delete e.shareTypes:e.shareTypes=_.keys(e.shareTypes)})).value()).sort(this._sortComparator)}}),OCA.Sharing.FileList=s}});
//# sourceMappingURL=files_sharing.js.map \ No newline at end of file
diff --git a/apps/files_sharing/js/dist/files_sharing.js.map b/apps/files_sharing/js/dist/files_sharing.js.map
index 208ceb155b4..447bb7f9afe 100644
--- a/apps/files_sharing/js/dist/files_sharing.js.map
+++ b/apps/files_sharing/js/dist/files_sharing.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/files_sharing.js","webpack:///./apps/files_sharing/js/app.js","webpack:///./apps/files_sharing/js/sharedfilelist.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_nonce__","btoa","OC","requestToken","__webpack_public_path__","linkTo","OCA","Sharing","App","_inFileList","_outFileList","_overviewFileList","initSharingIn","$el","this","FileList","id","sharedWithUser","fileActions","_createFileActions","config","Files","getFilesConfig","shown","_extendFileList","appName","find","html","initSharingOut","initSharingLinks","_linkFileList","linksOnly","initSharingDeleted","_deletedFileList","showDeleted","_restoreShareAction","initShareingOverview","isOverview","removeSharingIn","$fileList","empty","removeSharingOut","removeSharingLinks","removeSharingDeleted","removeSharingOverview","destroy","off","_onActionsUpdated","_globalActionsInitialized","FileActions","registerDefaultActions","merge","_","on","register","PERMISSION_READ","filename","context","setActiveView","silent","fileList","changeDirectory","joinPaths","$file","attr","setDefault","registerAction","displayName","altText","mime","permissions","PERMISSION_ALL","iconClass","type","TYPE_INLINE","actionHandler","fileName","shareId","data","$","post","linkToOCS","success","result","remove","fileInfoModel","attributes","fail","Notification","showTemporary","ev","each","list","action","defaultAction","fileSummary","document","ready","e","target","options","initialize","extend","_sharedWithUser","_linksOnly","_showDeleted","_clientSideSort","_allowSelection","_isOverview","apply","arguments","initialized","_renderRow","_createRow","fileData","$tr","before","children","pluck","shares","join","shareOwner","permission","parseInt","PERMISSION_DELETE","expirationTimestamp","expiration","moment","valueOf","formatted","text","modifiedColor","Math","round","Date","getTime","Util","formatDate","relativeModifiedDate","td","append","tooltip","placement","setSharedWithUser","state","updateEmptyContent","dir","getCurrentDirectory","toggleClass","isEmpty","addClass","getDirectoryPermissions","updateStorageStatistics","updateRow","fileInfo","reload","showMask","_reloadCall","abort","_setCurrentDir","promises","deletedShares","url","format","include_tags","beforeSend","xhr","setRequestHeader","shared_with_me","remoteShares","push","ajax","when","callBack","reloadCallback","then","additionalShares","hideMask","files","ocs","concat","_makeFilesFromShares","_makeFilesFromRemoteShares","setFiles","chain","map","share","file","owner","remote","replace","basename","mountpoint","mtime","mimetype","file_id","path","dirname","tags","Share","SHARE_TYPE_REMOTE","filter","share_type","SHARE_TYPE_LINK","file_source","icon","MimeType","getIconUrl","item_type","share_with","stime","displayname_owner","shareOwnerId","uid_owner","file_target","extraData","targetDisplayName","share_with_displayname","targetShareWithId","reduce","memo","recipient","recipientId","recipients","recipientData","shareTypes","recipientsCount","values","mountType","keys","sort","_sortComparator"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EA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,EAAKD,UAhBtB5G,EAAO8I,EAAKjC,EAAK3K,IAAM2K,GAClBpE,OAAS,CAACoE,EAAKD,OAGpB5G,EAAKiJ,WAAa,GAClBjJ,EAAKkJ,cAAgB,GAErBlJ,EAAKmJ,WAAa,GAElBnJ,EAAKoJ,gBAAkB,EACvBpJ,EAAKmH,MAAQN,EAAKD,MAAMwB,OASrBW,IAEC/I,EAAKoJ,gBAAkB,IAG1BpJ,EAAKiJ,WAAWF,IAAa,EAC7B/I,EAAKkJ,cAAclJ,EAAKoJ,iBAAmB,CAC1C,UAAaJ,EACb,qBAAwBD,IAG1B/I,EAAKoJ,mBAGNpJ,EAAKmJ,WAAWtC,EAAKD,MAAMjH,OAAQ,SAE5BkH,EAAKD,MACLkC,IACL,IAEFO,SAEAxI,MAAK,SAASb,GAGdA,EAAKsJ,UAAY,gBACVtJ,EAAKoJ,gBACRjN,SAEI6D,EAAKmJ,WAEZnJ,EAAKmJ,WAAa7K,EAAEiL,KAAKvJ,EAAKmJ,eAI/BhP,SAGWqP,KAAKxN,KAAKyN,oBA0C1BjO,IAAIC,QAAQQ,SAAWA","file":"files_sharing.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 836);\n","import '../js/app'\nimport '../js/sharedfilelist'\n\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n// eslint-disable-next-line camelcase\n__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')\n","/*\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\nif (!OCA.Sharing) {\n\t/**\n\t * @namespace OCA.Sharing\n\t */\n\tOCA.Sharing = {}\n}\n/**\n * @namespace\n */\nOCA.Sharing.App = {\n\n\t_inFileList: null,\n\t_outFileList: null,\n\t_overviewFileList: null,\n\n\tinitSharingIn: function($el) {\n\t\tif (this._inFileList) {\n\t\t\treturn this._inFileList\n\t\t}\n\n\t\tthis._inFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.self',\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._inFileList)\n\t\tthis._inFileList.appName = t('files_sharing', 'Shared with you')\n\t\tthis._inFileList.$el.find('#emptycontent').html('<div class=\"icon-shared\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'Nothing shared with you yet') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders others share with you will show up here') + '</p>')\n\t\treturn this._inFileList\n\t},\n\n\tinitSharingOut: function($el) {\n\t\tif (this._outFileList) {\n\t\t\treturn this._outFileList\n\t\t}\n\t\tthis._outFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.others',\n\t\t\t\tsharedWithUser: false,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._outFileList)\n\t\tthis._outFileList.appName = t('files_sharing', 'Shared with others')\n\t\tthis._outFileList.$el.find('#emptycontent').html('<div class=\"icon-shared\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'Nothing shared yet') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders you share will show up here') + '</p>')\n\t\treturn this._outFileList\n\t},\n\n\tinitSharingLinks: function($el) {\n\t\tif (this._linkFileList) {\n\t\t\treturn this._linkFileList\n\t\t}\n\t\tthis._linkFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.link',\n\t\t\t\tlinksOnly: true,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._linkFileList)\n\t\tthis._linkFileList.appName = t('files_sharing', 'Shared by link')\n\t\tthis._linkFileList.$el.find('#emptycontent').html('<div class=\"icon-public\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No shared links') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders you share by link will show up here') + '</p>')\n\t\treturn this._linkFileList\n\t},\n\n\tinitSharingDeleted: function($el) {\n\t\tif (this._deletedFileList) {\n\t\t\treturn this._deletedFileList\n\t\t}\n\t\tthis._deletedFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.deleted',\n\t\t\t\tshowDeleted: true,\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._restoreShareAction(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._deletedFileList)\n\t\tthis._deletedFileList.appName = t('files_sharing', 'Deleted shares')\n\t\tthis._deletedFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No deleted shares') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Shares you deleted will show up here') + '</p>')\n\t\treturn this._deletedFileList\n\t},\n\n\tinitShareingOverview: function($el) {\n\t\tif (this._overviewFileList) {\n\t\t\treturn this._overviewFileList\n\t\t}\n\t\tthis._overviewFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.overview',\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\tisOverview: true,\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._overviewFileList)\n\t\tthis._overviewFileList.appName = t('files_sharing', 'Shares')\n\t\tthis._overviewFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No shares') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Shares will show up here') + '</p>')\n\t\treturn this._overviewFileList\n\t},\n\n\tremoveSharingIn: function() {\n\t\tif (this._inFileList) {\n\t\t\tthis._inFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingOut: function() {\n\t\tif (this._outFileList) {\n\t\t\tthis._outFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingLinks: function() {\n\t\tif (this._linkFileList) {\n\t\t\tthis._linkFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingDeleted: function() {\n\t\tif (this._deletedFileList) {\n\t\t\tthis._deletedFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingOverview: function() {\n\t\tif (this._overviewFileList) {\n\t\t\tthis._overviewFileList.$fileList.empty()\n\t\t}\n\t},\n\n\t/**\n\t * Destroy the app\n\t */\n\tdestroy: function() {\n\t\tOCA.Files.fileActions.off('setDefault.app-sharing', this._onActionsUpdated)\n\t\tOCA.Files.fileActions.off('registerAction.app-sharing', this._onActionsUpdated)\n\t\tthis.removeSharingIn()\n\t\tthis.removeSharingOut()\n\t\tthis.removeSharingLinks()\n\t\tthis._inFileList = null\n\t\tthis._outFileList = null\n\t\tthis._linkFileList = null\n\t\tthis._overviewFileList = null\n\t\tdelete this._globalActionsInitialized\n\t},\n\n\t_createFileActions: function() {\n\t\t// inherit file actions from the files app\n\t\tconst fileActions = new OCA.Files.FileActions()\n\t\t// note: not merging the legacy actions because legacy apps are not\n\t\t// compatible with the sharing overview and need to be adapted first\n\t\tfileActions.registerDefaultActions()\n\t\tfileActions.merge(OCA.Files.fileActions)\n\n\t\tif (!this._globalActionsInitialized) {\n\t\t\t// in case actions are registered later\n\t\t\tthis._onActionsUpdated = _.bind(this._onActionsUpdated, this)\n\t\t\tOCA.Files.fileActions.on('setDefault.app-sharing', this._onActionsUpdated)\n\t\t\tOCA.Files.fileActions.on('registerAction.app-sharing', this._onActionsUpdated)\n\t\t\tthis._globalActionsInitialized = true\n\t\t}\n\n\t\t// when the user clicks on a folder, redirect to the corresponding\n\t\t// folder in the files app instead of opening it directly\n\t\tfileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) {\n\t\t\tOCA.Files.App.setActiveView('files', { silent: true })\n\t\t\tOCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true)\n\t\t})\n\t\tfileActions.setDefault('dir', 'Open')\n\t\treturn fileActions\n\t},\n\n\t_restoreShareAction: function() {\n\t\tconst fileActions = new OCA.Files.FileActions()\n\t\tfileActions.registerAction({\n\t\t\tname: 'Restore',\n\t\t\tdisplayName: '',\n\t\t\taltText: t('files_sharing', 'Restore share'),\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_ALL,\n\t\t\ticonClass: 'icon-history',\n\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\tconst shareId = context.$file.data('shareId')\n\t\t\t\t$.post(OC.linkToOCS('apps/files_sharing/api/v1/deletedshares', 2) + shareId)\n\t\t\t\t\t.success(function(result) {\n\t\t\t\t\t\tcontext.fileList.remove(context.fileInfoModel.attributes.name)\n\t\t\t\t\t}).fail(function() {\n\t\t\t\t\t\tOC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to restore the share.'))\n\t\t\t\t\t})\n\t\t\t},\n\t\t})\n\t\treturn fileActions\n\t},\n\n\t_onActionsUpdated: function(ev) {\n\t\t_.each([this._inFileList, this._outFileList, this._linkFileList], function(list) {\n\t\t\tif (!list) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (ev.action) {\n\t\t\t\tlist.fileActions.registerAction(ev.action)\n\t\t\t} else if (ev.defaultAction) {\n\t\t\t\tlist.fileActions.setDefault(\n\t\t\t\t\tev.defaultAction.mime,\n\t\t\t\t\tev.defaultAction.name\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t},\n\n\t_extendFileList: function(fileList) {\n\t\t// remove size column from summary\n\t\tfileList.fileSummary.$el.find('.filesize').remove()\n\t},\n}\n\n$(document).ready(function() {\n\t$('#app-content-sharingin').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingIn($(e.target))\n\t})\n\t$('#app-content-sharingin').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingIn()\n\t})\n\t$('#app-content-sharingout').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingOut($(e.target))\n\t})\n\t$('#app-content-sharingout').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingOut()\n\t})\n\t$('#app-content-sharinglinks').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingLinks($(e.target))\n\t})\n\t$('#app-content-sharinglinks').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingLinks()\n\t})\n\t$('#app-content-deletedshares').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingDeleted($(e.target))\n\t})\n\t$('#app-content-deletedshares').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingDeleted()\n\t})\n\t$('#app-content-shareoverview').on('show', function(e) {\n\t\tOCA.Sharing.App.initShareingOverview($(e.target))\n\t})\n\t$('#app-content-shareoverview').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingOverview()\n\t})\n})\n","/* eslint-disable */\n/*\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n(function() {\n\n\t/**\n\t * @class OCA.Sharing.FileList\n\t * @augments OCA.Files.FileList\n\t *\n\t * @classdesc Sharing file list.\n\t * Contains both \"shared with others\" and \"shared with you\" modes.\n\t *\n\t * @param $el container element with existing markup for the #controls\n\t * and a table\n\t * @param [options] map of options, see other parameters\n\t * @param {boolean} [options.sharedWithUser] true to return files shared with\n\t * the current user, false to return files that the user shared with others.\n\t * Defaults to false.\n\t * @param {boolean} [options.linksOnly] true to return only link shares\n\t */\n\tvar FileList = function($el, options) {\n\t\tthis.initialize($el, options)\n\t}\n\tFileList.prototype = _.extend({}, OCA.Files.FileList.prototype,\n\t\t/** @lends OCA.Sharing.FileList.prototype */ {\n\t\t\tappName: 'Shares',\n\n\t\t\t/**\n\t\t * Whether the list shows the files shared with the user (true) or\n\t\t * the files that the user shared with others (false).\n\t\t */\n\t\t\t_sharedWithUser: false,\n\t\t\t_linksOnly: false,\n\t\t\t_showDeleted: false,\n\t\t\t_clientSideSort: true,\n\t\t\t_allowSelection: false,\n\t\t\t_isOverview: false,\n\n\t\t\t/**\n\t\t * @private\n\t\t */\n\t\t\tinitialize: function($el, options) {\n\t\t\t\tOCA.Files.FileList.prototype.initialize.apply(this, arguments)\n\t\t\t\tif (this.initialized) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// TODO: consolidate both options\n\t\t\t\tif (options && options.sharedWithUser) {\n\t\t\t\t\tthis._sharedWithUser = true\n\t\t\t\t}\n\t\t\t\tif (options && options.linksOnly) {\n\t\t\t\t\tthis._linksOnly = true\n\t\t\t\t}\n\t\t\t\tif (options && options.showDeleted) {\n\t\t\t\t\tthis._showDeleted = true\n\t\t\t\t}\n\t\t\t\tif (options && options.isOverview) {\n\t\t\t\t\tthis._isOverview = true\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_renderRow: function() {\n\t\t\t// HACK: needed to call the overridden _renderRow\n\t\t\t// this is because at the time this class is created\n\t\t\t// the overriding hasn't been done yet...\n\t\t\t\treturn OCA.Files.FileList.prototype._renderRow.apply(this, arguments)\n\t\t\t},\n\n\t\t\t_createRow: function(fileData) {\n\t\t\t// TODO: hook earlier and render the whole row here\n\t\t\t\tvar $tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments)\n\t\t\t\t$tr.find('.filesize').remove()\n\t\t\t\t$tr.find('td.date').before($tr.children('td:first'))\n\t\t\t\t$tr.find('td.filename input:checkbox').remove()\n\t\t\t\t$tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','))\n\t\t\t\tif (this._sharedWithUser) {\n\t\t\t\t\t$tr.attr('data-share-owner', fileData.shareOwner)\n\t\t\t\t\t$tr.attr('data-mounttype', 'shared-root')\n\t\t\t\t\tvar permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE\n\t\t\t\t\t$tr.attr('data-permissions', permission)\n\t\t\t\t}\n\t\t\t\tif (this._showDeleted) {\n\t\t\t\t\tvar permission = fileData.permissions\n\t\t\t\t\t$tr.attr('data-share-permissions', permission)\n\t\t\t\t}\n\n\t\t\t\t// add row with expiration date for link only shares - influenced by _createRow of filelist\n\t\t\t\tif (this._linksOnly) {\n\t\t\t\t\tvar expirationTimestamp = 0\n\t\t\t\t\tif (fileData.shares && fileData.shares[0].expiration !== null) {\n\t\t\t\t\t\texpirationTimestamp = moment(fileData.shares[0].expiration).valueOf()\n\t\t\t\t\t}\n\t\t\t\t\t$tr.attr('data-expiration', expirationTimestamp)\n\n\t\t\t\t\t// date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)\n\t\t\t\t\t// difference in days multiplied by 5 - brightest shade for expiry dates in more than 32 days (160/5)\n\t\t\t\t\tvar modifiedColor = Math.round((expirationTimestamp - (new Date()).getTime()) / 1000 / 60 / 60 / 24 * 5)\n\t\t\t\t\t// ensure that the brightest color is still readable\n\t\t\t\t\tif (modifiedColor >= 160) {\n\t\t\t\t\t\tmodifiedColor = 160\n\t\t\t\t\t}\n\n\t\t\t\t\tvar formatted\n\t\t\t\t\tvar text\n\t\t\t\t\tif (expirationTimestamp > 0) {\n\t\t\t\t\t\tformatted = OC.Util.formatDate(expirationTimestamp)\n\t\t\t\t\t\ttext = OC.Util.relativeModifiedDate(expirationTimestamp)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tformatted = t('files_sharing', 'No expiration date set')\n\t\t\t\t\t\ttext = ''\n\t\t\t\t\t\tmodifiedColor = 160\n\t\t\t\t\t}\n\t\t\t\t\ttd = $('<td></td>').attr({ 'class': 'date' })\n\t\t\t\t\ttd.append($('<span></span>').attr({\n\t\t\t\t\t\t'class': 'modified',\n\t\t\t\t\t\t'title': formatted,\n\t\t\t\t\t\t'style': 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'\n\t\t\t\t\t}).text(text)\n\t\t\t\t\t\t.tooltip({ placement: 'top' })\n\t\t\t\t\t)\n\n\t\t\t\t\t$tr.append(td)\n\t\t\t\t}\n\t\t\t\treturn $tr\n\t\t\t},\n\n\t\t\t/**\n\t\t * Set whether the list should contain outgoing shares\n\t\t * or incoming shares.\n\t\t *\n\t\t * @param state true for incoming shares, false otherwise\n\t\t */\n\t\t\tsetSharedWithUser: function(state) {\n\t\t\t\tthis._sharedWithUser = !!state\n\t\t\t},\n\n\t\t\tupdateEmptyContent: function() {\n\t\t\t\tvar dir = this.getCurrentDirectory()\n\t\t\t\tif (dir === '/') {\n\t\t\t\t// root has special permissions\n\t\t\t\t\tthis.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty)\n\t\t\t\t\tthis.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty)\n\n\t\t\t\t\t// hide expiration date header for non link only shares\n\t\t\t\t\tif (!this._linksOnly) {\n\t\t\t\t\t\tthis.$el.find('th.column-expiration').addClass('hidden')\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tOCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments)\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetDirectoryPermissions: function() {\n\t\t\t\treturn OC.PERMISSION_READ | OC.PERMISSION_DELETE\n\t\t\t},\n\n\t\t\tupdateStorageStatistics: function() {\n\t\t\t// no op because it doesn't have\n\t\t\t// storage info like free space / used space\n\t\t\t},\n\n\t\t\tupdateRow: function($tr, fileInfo, options) {\n\t\t\t// no-op, suppress re-rendering\n\t\t\t\treturn $tr\n\t\t\t},\n\n\t\t\treload: function() {\n\t\t\t\tthis.showMask()\n\t\t\t\tif (this._reloadCall) {\n\t\t\t\t\tthis._reloadCall.abort()\n\t\t\t\t}\n\n\t\t\t\t// there is only root\n\t\t\t\tthis._setCurrentDir('/', false)\n\n\t\t\t\tvar promises = []\n\n\t\t\t\tvar deletedShares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'deletedshares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar shares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tshared_with_me: this._sharedWithUser !== false,\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar remoteShares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1') + 'remote_shares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Add the proper ajax requests to the list and run them\n\t\t\t\t// and make sure we have 2 promises\n\t\t\t\tif (this._showDeleted) {\n\t\t\t\t\tpromises.push($.ajax(deletedShares))\n\t\t\t\t} else {\n\t\t\t\t\tpromises.push($.ajax(shares))\n\n\t\t\t\t\tif (this._sharedWithUser !== false || this._isOverview) {\n\t\t\t\t\t\tpromises.push($.ajax(remoteShares))\n\t\t\t\t\t}\n\t\t\t\t\tif (this._isOverview) {\n\t\t\t\t\t\tshares.data.shared_with_me = !shares.data.shared_with_me\n\t\t\t\t\t\tpromises.push($.ajax(shares))\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._reloadCall = $.when.apply($, promises)\n\t\t\t\tvar callBack = this.reloadCallback.bind(this)\n\t\t\t\treturn this._reloadCall.then(callBack, callBack)\n\t\t\t},\n\n\t\t\treloadCallback: function(shares, remoteShares, additionalShares) {\n\t\t\t\tdelete this._reloadCall\n\t\t\t\tthis.hideMask()\n\n\t\t\t\tthis.$el.find('#headerSharedWith').text(\n\t\t\t\t\tt('files_sharing', this._sharedWithUser ? 'Shared by' : 'Shared with')\n\t\t\t\t)\n\n\t\t\t\tvar files = []\n\n\t\t\t\t// make sure to use the same format\n\t\t\t\tif (shares[0] && shares[0].ocs) {\n\t\t\t\t\tshares = shares[0]\n\t\t\t\t}\n\t\t\t\tif (remoteShares && remoteShares[0] && remoteShares[0].ocs) {\n\t\t\t\t\tremoteShares = remoteShares[0]\n\t\t\t\t}\n\t\t\t\tif (additionalShares && additionalShares[0] && additionalShares[0].ocs) {\n\t\t\t\t\tadditionalShares = additionalShares[0]\n\t\t\t\t}\n\n\t\t\t\tif (shares.ocs && shares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromShares(shares.ocs.data, this._sharedWithUser))\n\t\t\t\t}\n\n\t\t\t\tif (remoteShares && remoteShares.ocs && remoteShares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromRemoteShares(remoteShares.ocs.data))\n\t\t\t\t}\n\n\t\t\t\tif (additionalShares && additionalShares.ocs && additionalShares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromShares(additionalShares.ocs.data, !this._sharedWithUser))\n\t\t\t\t}\n\n\t\t\t\tthis.setFiles(files)\n\t\t\t\treturn true\n\t\t\t},\n\n\t\t\t_makeFilesFromRemoteShares: function(data) {\n\t\t\t\tvar files = data\n\n\t\t\t\tfiles = _.chain(files)\n\t\t\t\t// convert share data to file data\n\t\t\t\t\t.map(function(share) {\n\t\t\t\t\t\tvar file = {\n\t\t\t\t\t\t\tshareOwner: share.owner + '@' + share.remote.replace(/.*?:\\/\\//g, ''),\n\t\t\t\t\t\t\tname: OC.basename(share.mountpoint),\n\t\t\t\t\t\t\tmtime: share.mtime * 1000,\n\t\t\t\t\t\t\tmimetype: share.mimetype,\n\t\t\t\t\t\t\ttype: share.type,\n\t\t\t\t\t\t\tid: share.file_id,\n\t\t\t\t\t\t\tpath: OC.dirname(share.mountpoint),\n\t\t\t\t\t\t\tpermissions: share.permissions,\n\t\t\t\t\t\t\ttags: share.tags || []\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfile.shares = [{\n\t\t\t\t\t\t\tid: share.id,\n\t\t\t\t\t\t\ttype: OC.Share.SHARE_TYPE_REMOTE\n\t\t\t\t\t\t}]\n\t\t\t\t\t\treturn file\n\t\t\t\t\t})\n\t\t\t\t\t.value()\n\t\t\t\treturn files\n\t\t\t},\n\n\t\t\t/**\n\t\t * Converts the OCS API share response data to a file info\n\t\t * list\n\t\t * @param {Array} data OCS API share array\n\t\t * @param {bool} sharedWithUser\n\t\t * @returns {Array.<OCA.Sharing.SharedFileInfo>} array of shared file info\n\t\t */\n\t\t\t_makeFilesFromShares: function(data, sharedWithUser) {\n\t\t\t/* jshint camelcase: false */\n\t\t\t\tvar files = data\n\n\t\t\t\tif (this._linksOnly) {\n\t\t\t\t\tfiles = _.filter(data, function(share) {\n\t\t\t\t\t\treturn share.share_type === OC.Share.SHARE_TYPE_LINK\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// OCS API uses non-camelcased names\n\t\t\t\tfiles = _.chain(files)\n\t\t\t\t// convert share data to file data\n\t\t\t\t\t.map(function(share) {\n\t\t\t\t\t// TODO: use OC.Files.FileInfo\n\t\t\t\t\t\tvar file = {\n\t\t\t\t\t\t\tid: share.file_source,\n\t\t\t\t\t\t\ticon: OC.MimeType.getIconUrl(share.mimetype),\n\t\t\t\t\t\t\tmimetype: share.mimetype,\n\t\t\t\t\t\t\ttags: share.tags || []\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (share.item_type === 'folder') {\n\t\t\t\t\t\t\tfile.type = 'dir'\n\t\t\t\t\t\t\tfile.mimetype = 'httpd/unix-directory'\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfile.type = 'file'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfile.share = {\n\t\t\t\t\t\t\tid: share.id,\n\t\t\t\t\t\t\ttype: share.share_type,\n\t\t\t\t\t\t\ttarget: share.share_with,\n\t\t\t\t\t\t\tstime: share.stime * 1000,\n\t\t\t\t\t\t\texpiration: share.expiration\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (sharedWithUser) {\n\t\t\t\t\t\t\tfile.shareOwner = share.displayname_owner\n\t\t\t\t\t\t\tfile.shareOwnerId = share.uid_owner\n\t\t\t\t\t\t\tfile.name = OC.basename(share.file_target)\n\t\t\t\t\t\t\tfile.path = OC.dirname(share.file_target)\n\t\t\t\t\t\t\tfile.permissions = share.permissions\n\t\t\t\t\t\t\tif (file.path) {\n\t\t\t\t\t\t\t\tfile.extraData = share.file_target\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (share.share_type !== OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\t\tfile.share.targetDisplayName = share.share_with_displayname\n\t\t\t\t\t\t\t\tfile.share.targetShareWithId = share.share_with\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfile.name = OC.basename(share.path)\n\t\t\t\t\t\t\tfile.path = OC.dirname(share.path)\n\t\t\t\t\t\t\tfile.permissions = OC.PERMISSION_ALL\n\t\t\t\t\t\t\tif (file.path) {\n\t\t\t\t\t\t\t\tfile.extraData = share.path\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn file\n\t\t\t\t\t})\n\t\t\t\t// Group all files and have a \"shares\" array with\n\t\t\t\t// the share info for each file.\n\t\t\t\t//\n\t\t\t\t// This uses a hash memo to cumulate share information\n\t\t\t\t// inside the same file object (by file id).\n\t\t\t\t\t.reduce(function(memo, file) {\n\t\t\t\t\t\tvar data = memo[file.id]\n\t\t\t\t\t\tvar recipient = file.share.targetDisplayName\n\t\t\t\t\t\tvar recipientId = file.share.targetShareWithId\n\t\t\t\t\t\tif (!data) {\n\t\t\t\t\t\t\tdata = memo[file.id] = file\n\t\t\t\t\t\t\tdata.shares = [file.share]\n\t\t\t\t\t\t\t// using a hash to make them unique,\n\t\t\t\t\t\t\t// this is only a list to be displayed\n\t\t\t\t\t\t\tdata.recipients = {}\n\t\t\t\t\t\t\tdata.recipientData = {}\n\t\t\t\t\t\t\t// share types\n\t\t\t\t\t\t\tdata.shareTypes = {}\n\t\t\t\t\t\t\t// counter is cheaper than calling _.keys().length\n\t\t\t\t\t\t\tdata.recipientsCount = 0\n\t\t\t\t\t\t\tdata.mtime = file.share.stime\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t// always take the most recent stime\n\t\t\t\t\t\t\tif (file.share.stime > data.mtime) {\n\t\t\t\t\t\t\t\tdata.mtime = file.share.stime\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdata.shares.push(file.share)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (recipient) {\n\t\t\t\t\t\t// limit counterparts for output\n\t\t\t\t\t\t\tif (data.recipientsCount < 4) {\n\t\t\t\t\t\t\t// only store the first ones, they will be the only ones\n\t\t\t\t\t\t\t// displayed\n\t\t\t\t\t\t\t\tdata.recipients[recipient] = true\n\t\t\t\t\t\t\t\tdata.recipientData[data.recipientsCount] = {\n\t\t\t\t\t\t\t\t\t'shareWith': recipientId,\n\t\t\t\t\t\t\t\t\t'shareWithDisplayName': recipient\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdata.recipientsCount++\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.shareTypes[file.share.type] = true\n\n\t\t\t\t\t\tdelete file.share\n\t\t\t\t\t\treturn memo\n\t\t\t\t\t}, {})\n\t\t\t\t// Retrieve only the values of the returned hash\n\t\t\t\t\t.values()\n\t\t\t\t// Clean up\n\t\t\t\t\t.each(function(data) {\n\t\t\t\t\t// convert the recipients map to a flat\n\t\t\t\t\t// array of sorted names\n\t\t\t\t\t\tdata.mountType = 'shared'\n\t\t\t\t\t\tdelete data.recipientsCount\n\t\t\t\t\t\tif (sharedWithUser) {\n\t\t\t\t\t\t// only for outgoing shares\n\t\t\t\t\t\t\tdelete data.shareTypes\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdata.shareTypes = _.keys(data.shareTypes)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t// Finish the chain by getting the result\n\t\t\t\t\t.value()\n\n\t\t\t\t// Sort by expected sort comparator\n\t\t\t\treturn files.sort(this._sortComparator)\n\t\t\t}\n\t\t})\n\n\t/**\n\t * Share info attributes.\n\t *\n\t * @typedef {Object} OCA.Sharing.ShareInfo\n\t *\n\t * @property {int} id share ID\n\t * @property {int} type share type\n\t * @property {String} target share target, either user name or group name\n\t * @property {int} stime share timestamp in milliseconds\n\t * @property {String} [targetDisplayName] display name of the recipient\n\t * (only when shared with others)\n\t * @property {String} [targetShareWithId] id of the recipient\n\t *\n\t */\n\n\t/**\n\t * Recipient attributes\n\t *\n\t * @typedef {Object} OCA.Sharing.RecipientInfo\n\t * @property {String} shareWith the id of the recipient\n\t * @property {String} shareWithDisplayName the display name of the recipient\n\t */\n\n\t/**\n\t * Shared file info attributes.\n\t *\n\t * @typedef {OCA.Files.FileInfo} OCA.Sharing.SharedFileInfo\n\t *\n\t * @property {Array.<OCA.Sharing.ShareInfo>} shares array of shares for\n\t * this file\n\t * @property {int} mtime most recent share time (if multiple shares)\n\t * @property {String} shareOwner name of the share owner\n\t * @property {Array.<String>} recipients name of the first 4 recipients\n\t * (this is mostly for display purposes)\n\t * @property {Object.<OCA.Sharing.RecipientInfo>} recipientData (as object for easier\n\t * passing to HTML data attributes with jQuery)\n\t */\n\n\tOCA.Sharing.FileList = FileList\n})()\n"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/files_sharing.js","webpack:///./apps/files_sharing/js/app.js","webpack:///./apps/files_sharing/js/sharedfilelist.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_nonce__","btoa","OC","requestToken","__webpack_public_path__","linkTo","OCA","Sharing","App","_inFileList","_outFileList","_overviewFileList","_pendingFileList","initSharingIn","$el","this","FileList","id","sharedWithUser","fileActions","_createFileActions","config","Files","getFilesConfig","shown","_extendFileList","appName","find","html","initSharingOut","initSharingLinks","_linkFileList","linksOnly","initSharingDeleted","_deletedFileList","showDeleted","_restoreShareAction","initSharingPening","showPending","_acceptShareAction","initShareingOverview","isOverview","removeSharingIn","$fileList","empty","removeSharingOut","removeSharingLinks","removeSharingDeleted","removeSharingPending","removeSharingOverview","destroy","off","_onActionsUpdated","_globalActionsInitialized","FileActions","registerDefaultActions","merge","_","on","register","PERMISSION_READ","filename","context","setActiveView","silent","fileList","changeDirectory","joinPaths","$file","attr","setDefault","registerAction","displayName","altText","mime","permissions","PERMISSION_ALL","iconClass","type","TYPE_INLINE","actionHandler","fileName","shareId","data","$","post","linkToOCS","success","result","remove","fileInfoModel","attributes","fail","Notification","showTemporary","ajax","url","ev","each","list","action","defaultAction","fileSummary","document","ready","e","target","options","initialize","extend","_sharedWithUser","_linksOnly","_showDeleted","_showPending","_clientSideSort","_allowSelection","_isOverview","apply","arguments","initialized","_renderRow","_createRow","fileData","$tr","before","children","pluck","shares","join","shareOwner","permission","parseInt","PERMISSION_DELETE","expirationTimestamp","expiration","moment","valueOf","formatted","text","modifiedColor","Math","round","Date","getTime","Util","formatDate","relativeModifiedDate","td","append","tooltip","placement","setSharedWithUser","state","updateEmptyContent","dir","getCurrentDirectory","toggleClass","isEmpty","addClass","getDirectoryPermissions","updateStorageStatistics","updateRow","fileInfo","reload","showMask","_reloadCall","abort","_setCurrentDir","promises","deletedShares","format","include_tags","beforeSend","xhr","setRequestHeader","pendingShares","shared_with_me","remoteShares","push","when","callBack","reloadCallback","then","additionalShares","hideMask","files","ocs","concat","_makeFilesFromShares","_makeFilesFromRemoteShares","setFiles","chain","map","share","file","owner","remote","replace","basename","mountpoint","mtime","mimetype","file_id","path","dirname","tags","Share","SHARE_TYPE_REMOTE","filter","share_type","SHARE_TYPE_LINK","file_source","icon","MimeType","getIconUrl","item_type","share_with","stime","displayname_owner","shareOwnerId","uid_owner","file_target","extraData","targetDisplayName","share_with_displayname","targetShareWithId","reduce","memo","recipient","recipientId","recipients","recipientData","shareTypes","recipientsCount","values","mountType","keys","sort","_sortComparator"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAA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AAa/K,EAAEmL,KAAKzJ,EAAKqJ,eAI/BvP,SAGW4P,KAAK9N,KAAK+N,oBA0C1BxO,IAAIC,QAAQS,SAAWA","file":"files_sharing.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 836);\n","import '../js/app'\nimport '../js/sharedfilelist'\n\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n// eslint-disable-next-line camelcase\n__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')\n","/*\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\nif (!OCA.Sharing) {\n\t/**\n\t * @namespace OCA.Sharing\n\t */\n\tOCA.Sharing = {}\n}\n/**\n * @namespace\n */\nOCA.Sharing.App = {\n\n\t_inFileList: null,\n\t_outFileList: null,\n\t_overviewFileList: null,\n\t_pendingFileList: null,\n\n\tinitSharingIn: function($el) {\n\t\tif (this._inFileList) {\n\t\t\treturn this._inFileList\n\t\t}\n\n\t\tthis._inFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.self',\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._inFileList)\n\t\tthis._inFileList.appName = t('files_sharing', 'Shared with you')\n\t\tthis._inFileList.$el.find('#emptycontent').html('<div class=\"icon-shared\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'Nothing shared with you yet') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders others share with you will show up here') + '</p>')\n\t\treturn this._inFileList\n\t},\n\n\tinitSharingOut: function($el) {\n\t\tif (this._outFileList) {\n\t\t\treturn this._outFileList\n\t\t}\n\t\tthis._outFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.others',\n\t\t\t\tsharedWithUser: false,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._outFileList)\n\t\tthis._outFileList.appName = t('files_sharing', 'Shared with others')\n\t\tthis._outFileList.$el.find('#emptycontent').html('<div class=\"icon-shared\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'Nothing shared yet') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders you share will show up here') + '</p>')\n\t\treturn this._outFileList\n\t},\n\n\tinitSharingLinks: function($el) {\n\t\tif (this._linkFileList) {\n\t\t\treturn this._linkFileList\n\t\t}\n\t\tthis._linkFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.link',\n\t\t\t\tlinksOnly: true,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._linkFileList)\n\t\tthis._linkFileList.appName = t('files_sharing', 'Shared by link')\n\t\tthis._linkFileList.$el.find('#emptycontent').html('<div class=\"icon-public\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No shared links') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders you share by link will show up here') + '</p>')\n\t\treturn this._linkFileList\n\t},\n\n\tinitSharingDeleted: function($el) {\n\t\tif (this._deletedFileList) {\n\t\t\treturn this._deletedFileList\n\t\t}\n\t\tthis._deletedFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.deleted',\n\t\t\t\tshowDeleted: true,\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._restoreShareAction(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._deletedFileList)\n\t\tthis._deletedFileList.appName = t('files_sharing', 'Deleted shares')\n\t\tthis._deletedFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No deleted shares') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Shares you deleted will show up here') + '</p>')\n\t\treturn this._deletedFileList\n\t},\n\n\tinitSharingPening: function($el) {\n\t\tif (this._pendingFileList) {\n\t\t\treturn this._pendingFileList\n\t\t}\n\t\tthis._pendingFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.pending',\n\t\t\t\tshowPending: true,\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._acceptShareAction(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._pendingFileList)\n\t\tthis._pendingFileList.appName = t('files_sharing', 'Pending shares')\n\t\tthis._pendingFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No pending shares') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Shares you have received but not confirmed will show up here') + '</p>')\n\t\treturn this._pendingFileList\n\t},\n\n\tinitShareingOverview: function($el) {\n\t\tif (this._overviewFileList) {\n\t\t\treturn this._overviewFileList\n\t\t}\n\t\tthis._overviewFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.overview',\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\tisOverview: true,\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true,\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._overviewFileList)\n\t\tthis._overviewFileList.appName = t('files_sharing', 'Shares')\n\t\tthis._overviewFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No shares') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Shares will show up here') + '</p>')\n\t\treturn this._overviewFileList\n\t},\n\n\tremoveSharingIn: function() {\n\t\tif (this._inFileList) {\n\t\t\tthis._inFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingOut: function() {\n\t\tif (this._outFileList) {\n\t\t\tthis._outFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingLinks: function() {\n\t\tif (this._linkFileList) {\n\t\t\tthis._linkFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingDeleted: function() {\n\t\tif (this._deletedFileList) {\n\t\t\tthis._deletedFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingPending: function() {\n\t\tif (this._pendingFileList) {\n\t\t\tthis._pendingFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingOverview: function() {\n\t\tif (this._overviewFileList) {\n\t\t\tthis._overviewFileList.$fileList.empty()\n\t\t}\n\t},\n\n\t/**\n\t * Destroy the app\n\t */\n\tdestroy: function() {\n\t\tOCA.Files.fileActions.off('setDefault.app-sharing', this._onActionsUpdated)\n\t\tOCA.Files.fileActions.off('registerAction.app-sharing', this._onActionsUpdated)\n\t\tthis.removeSharingIn()\n\t\tthis.removeSharingOut()\n\t\tthis.removeSharingLinks()\n\t\tthis._inFileList = null\n\t\tthis._outFileList = null\n\t\tthis._linkFileList = null\n\t\tthis._overviewFileList = null\n\t\tdelete this._globalActionsInitialized\n\t},\n\n\t_createFileActions: function() {\n\t\t// inherit file actions from the files app\n\t\tconst fileActions = new OCA.Files.FileActions()\n\t\t// note: not merging the legacy actions because legacy apps are not\n\t\t// compatible with the sharing overview and need to be adapted first\n\t\tfileActions.registerDefaultActions()\n\t\tfileActions.merge(OCA.Files.fileActions)\n\n\t\tif (!this._globalActionsInitialized) {\n\t\t\t// in case actions are registered later\n\t\t\tthis._onActionsUpdated = _.bind(this._onActionsUpdated, this)\n\t\t\tOCA.Files.fileActions.on('setDefault.app-sharing', this._onActionsUpdated)\n\t\t\tOCA.Files.fileActions.on('registerAction.app-sharing', this._onActionsUpdated)\n\t\t\tthis._globalActionsInitialized = true\n\t\t}\n\n\t\t// when the user clicks on a folder, redirect to the corresponding\n\t\t// folder in the files app instead of opening it directly\n\t\tfileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) {\n\t\t\tOCA.Files.App.setActiveView('files', { silent: true })\n\t\t\tOCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true)\n\t\t})\n\t\tfileActions.setDefault('dir', 'Open')\n\t\treturn fileActions\n\t},\n\n\t_restoreShareAction: function() {\n\t\tconst fileActions = new OCA.Files.FileActions()\n\t\tfileActions.registerAction({\n\t\t\tname: 'Restore',\n\t\t\tdisplayName: '',\n\t\t\taltText: t('files_sharing', 'Restore share'),\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_ALL,\n\t\t\ticonClass: 'icon-history',\n\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\tconst shareId = context.$file.data('shareId')\n\t\t\t\t$.post(OC.linkToOCS('apps/files_sharing/api/v1/deletedshares', 2) + shareId)\n\t\t\t\t\t.success(function(result) {\n\t\t\t\t\t\tcontext.fileList.remove(context.fileInfoModel.attributes.name)\n\t\t\t\t\t}).fail(function() {\n\t\t\t\t\t\tOC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to restore the share.'))\n\t\t\t\t\t})\n\t\t\t},\n\t\t})\n\t\treturn fileActions\n\t},\n\n\t_acceptShareAction: function() {\n\t\tconst fileActions = new OCA.Files.FileActions()\n\t\tfileActions.registerAction({\n\t\t\tname: 'Accept share',\n\t\t\tdisplayName: t('files_sharing', 'Accept share'),\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_ALL,\n\t\t\ticonClass: 'icon-checkmark',\n\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\tconst shareId = context.$file.data('shareId')\n\t\t\t\t$.post(OC.linkToOCS('apps/files_sharing/api/v1/shares/pending', 2) + shareId)\n\t\t\t\t\t.success(function(result) {\n\t\t\t\t\t\tcontext.fileList.remove(context.fileInfoModel.attributes.name)\n\t\t\t\t\t}).fail(function() {\n\t\t\t\t\t\tOC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to accept the share.'))\n\t\t\t\t\t})\n\t\t\t},\n\t\t})\n\t\tfileActions.registerAction({\n\t\t\tname: 'Reject share',\n\t\t\tdisplayName: t('files_sharing', 'Reject share'),\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_ALL,\n\t\t\ticonClass: 'icon-close',\n\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\tconst shareId = context.$file.data('shareId')\n\t\t\t\t$.ajax({\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + shareId,\n\t\t\t\t\ttype: 'DELETE',\n\t\t\t\t}).success(function(result) {\n\t\t\t\t\tcontext.fileList.remove(context.fileInfoModel.attributes.name)\n\t\t\t\t}).fail(function() {\n\t\t\t\t\tOC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to reject the share.'))\n\t\t\t\t})\n\t\t\t},\n\t\t})\n\t\treturn fileActions\n\t},\n\n\t_onActionsUpdated: function(ev) {\n\t\t_.each([this._inFileList, this._outFileList, this._linkFileList], function(list) {\n\t\t\tif (!list) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (ev.action) {\n\t\t\t\tlist.fileActions.registerAction(ev.action)\n\t\t\t} else if (ev.defaultAction) {\n\t\t\t\tlist.fileActions.setDefault(\n\t\t\t\t\tev.defaultAction.mime,\n\t\t\t\t\tev.defaultAction.name\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t},\n\n\t_extendFileList: function(fileList) {\n\t\t// remove size column from summary\n\t\tfileList.fileSummary.$el.find('.filesize').remove()\n\t},\n}\n\n$(document).ready(function() {\n\t$('#app-content-sharingin').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingIn($(e.target))\n\t})\n\t$('#app-content-sharingin').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingIn()\n\t})\n\t$('#app-content-sharingout').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingOut($(e.target))\n\t})\n\t$('#app-content-sharingout').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingOut()\n\t})\n\t$('#app-content-sharinglinks').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingLinks($(e.target))\n\t})\n\t$('#app-content-sharinglinks').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingLinks()\n\t})\n\t$('#app-content-deletedshares').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingDeleted($(e.target))\n\t})\n\t$('#app-content-deletedshares').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingDeleted()\n\t})\n\t$('#app-content-pendingshares').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingPening($(e.target))\n\t})\n\t$('#app-content-pendingshares').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingPending()\n\t})\n\t$('#app-content-shareoverview').on('show', function(e) {\n\t\tOCA.Sharing.App.initShareingOverview($(e.target))\n\t})\n\t$('#app-content-shareoverview').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingOverview()\n\t})\n})\n","/* eslint-disable */\n/*\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n(function() {\n\n\t/**\n\t * @class OCA.Sharing.FileList\n\t * @augments OCA.Files.FileList\n\t *\n\t * @classdesc Sharing file list.\n\t * Contains both \"shared with others\" and \"shared with you\" modes.\n\t *\n\t * @param $el container element with existing markup for the #controls\n\t * and a table\n\t * @param [options] map of options, see other parameters\n\t * @param {boolean} [options.sharedWithUser] true to return files shared with\n\t * the current user, false to return files that the user shared with others.\n\t * Defaults to false.\n\t * @param {boolean} [options.linksOnly] true to return only link shares\n\t */\n\tvar FileList = function($el, options) {\n\t\tthis.initialize($el, options)\n\t}\n\tFileList.prototype = _.extend({}, OCA.Files.FileList.prototype,\n\t\t/** @lends OCA.Sharing.FileList.prototype */ {\n\t\t\tappName: 'Shares',\n\n\t\t\t/**\n\t\t * Whether the list shows the files shared with the user (true) or\n\t\t * the files that the user shared with others (false).\n\t\t */\n\t\t\t_sharedWithUser: false,\n\t\t\t_linksOnly: false,\n\t\t\t_showDeleted: false,\n\t\t\t_showPending: false,\n\t\t\t_clientSideSort: true,\n\t\t\t_allowSelection: false,\n\t\t\t_isOverview: false,\n\n\t\t\t/**\n\t\t * @private\n\t\t */\n\t\t\tinitialize: function($el, options) {\n\t\t\t\tOCA.Files.FileList.prototype.initialize.apply(this, arguments)\n\t\t\t\tif (this.initialized) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// TODO: consolidate both options\n\t\t\t\tif (options && options.sharedWithUser) {\n\t\t\t\t\tthis._sharedWithUser = true\n\t\t\t\t}\n\t\t\t\tif (options && options.linksOnly) {\n\t\t\t\t\tthis._linksOnly = true\n\t\t\t\t}\n\t\t\t\tif (options && options.showDeleted) {\n\t\t\t\t\tthis._showDeleted = true\n\t\t\t\t}\n\t\t\t\tif (options && options.showPending) {\n\t\t\t\t\tthis._showPending = true\n\t\t\t\t}\n\t\t\t\tif (options && options.isOverview) {\n\t\t\t\t\tthis._isOverview = true\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_renderRow: function() {\n\t\t\t// HACK: needed to call the overridden _renderRow\n\t\t\t// this is because at the time this class is created\n\t\t\t// the overriding hasn't been done yet...\n\t\t\t\treturn OCA.Files.FileList.prototype._renderRow.apply(this, arguments)\n\t\t\t},\n\n\t\t\t_createRow: function(fileData) {\n\t\t\t// TODO: hook earlier and render the whole row here\n\t\t\t\tvar $tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments)\n\t\t\t\t$tr.find('.filesize').remove()\n\t\t\t\t$tr.find('td.date').before($tr.children('td:first'))\n\t\t\t\t$tr.find('td.filename input:checkbox').remove()\n\t\t\t\t$tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','))\n\t\t\t\tif (this._sharedWithUser) {\n\t\t\t\t\t$tr.attr('data-share-owner', fileData.shareOwner)\n\t\t\t\t\t$tr.attr('data-mounttype', 'shared-root')\n\t\t\t\t\tvar permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE\n\t\t\t\t\t$tr.attr('data-permissions', permission)\n\t\t\t\t}\n\t\t\t\tif (this._showDeleted || this._showPending) {\n\t\t\t\t\tvar permission = fileData.permissions\n\t\t\t\t\t$tr.attr('data-share-permissions', permission)\n\t\t\t\t}\n\n\t\t\t\t// add row with expiration date for link only shares - influenced by _createRow of filelist\n\t\t\t\tif (this._linksOnly) {\n\t\t\t\t\tvar expirationTimestamp = 0\n\t\t\t\t\tif (fileData.shares && fileData.shares[0].expiration !== null) {\n\t\t\t\t\t\texpirationTimestamp = moment(fileData.shares[0].expiration).valueOf()\n\t\t\t\t\t}\n\t\t\t\t\t$tr.attr('data-expiration', expirationTimestamp)\n\n\t\t\t\t\t// date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)\n\t\t\t\t\t// difference in days multiplied by 5 - brightest shade for expiry dates in more than 32 days (160/5)\n\t\t\t\t\tvar modifiedColor = Math.round((expirationTimestamp - (new Date()).getTime()) / 1000 / 60 / 60 / 24 * 5)\n\t\t\t\t\t// ensure that the brightest color is still readable\n\t\t\t\t\tif (modifiedColor >= 160) {\n\t\t\t\t\t\tmodifiedColor = 160\n\t\t\t\t\t}\n\n\t\t\t\t\tvar formatted\n\t\t\t\t\tvar text\n\t\t\t\t\tif (expirationTimestamp > 0) {\n\t\t\t\t\t\tformatted = OC.Util.formatDate(expirationTimestamp)\n\t\t\t\t\t\ttext = OC.Util.relativeModifiedDate(expirationTimestamp)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tformatted = t('files_sharing', 'No expiration date set')\n\t\t\t\t\t\ttext = ''\n\t\t\t\t\t\tmodifiedColor = 160\n\t\t\t\t\t}\n\t\t\t\t\ttd = $('<td></td>').attr({ 'class': 'date' })\n\t\t\t\t\ttd.append($('<span></span>').attr({\n\t\t\t\t\t\t'class': 'modified',\n\t\t\t\t\t\t'title': formatted,\n\t\t\t\t\t\t'style': 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'\n\t\t\t\t\t}).text(text)\n\t\t\t\t\t\t.tooltip({ placement: 'top' })\n\t\t\t\t\t)\n\n\t\t\t\t\t$tr.append(td)\n\t\t\t\t}\n\t\t\t\treturn $tr\n\t\t\t},\n\n\t\t\t/**\n\t\t * Set whether the list should contain outgoing shares\n\t\t * or incoming shares.\n\t\t *\n\t\t * @param state true for incoming shares, false otherwise\n\t\t */\n\t\t\tsetSharedWithUser: function(state) {\n\t\t\t\tthis._sharedWithUser = !!state\n\t\t\t},\n\n\t\t\tupdateEmptyContent: function() {\n\t\t\t\tvar dir = this.getCurrentDirectory()\n\t\t\t\tif (dir === '/') {\n\t\t\t\t// root has special permissions\n\t\t\t\t\tthis.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty)\n\t\t\t\t\tthis.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty)\n\n\t\t\t\t\t// hide expiration date header for non link only shares\n\t\t\t\t\tif (!this._linksOnly) {\n\t\t\t\t\t\tthis.$el.find('th.column-expiration').addClass('hidden')\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tOCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments)\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetDirectoryPermissions: function() {\n\t\t\t\treturn OC.PERMISSION_READ | OC.PERMISSION_DELETE\n\t\t\t},\n\n\t\t\tupdateStorageStatistics: function() {\n\t\t\t// no op because it doesn't have\n\t\t\t// storage info like free space / used space\n\t\t\t},\n\n\t\t\tupdateRow: function($tr, fileInfo, options) {\n\t\t\t// no-op, suppress re-rendering\n\t\t\t\treturn $tr\n\t\t\t},\n\n\t\t\treload: function() {\n\t\t\t\tthis.showMask()\n\t\t\t\tif (this._reloadCall) {\n\t\t\t\t\tthis._reloadCall.abort()\n\t\t\t\t}\n\n\t\t\t\t// there is only root\n\t\t\t\tthis._setCurrentDir('/', false)\n\n\t\t\t\tvar promises = []\n\n\t\t\t\tvar deletedShares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'deletedshares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar pendingShares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + 'pending',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json'\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar shares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tshared_with_me: this._sharedWithUser !== false,\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar remoteShares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1') + 'remote_shares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Add the proper ajax requests to the list and run them\n\t\t\t\t// and make sure we have 2 promises\n\t\t\t\tif (this._showDeleted) {\n\t\t\t\t\tpromises.push($.ajax(deletedShares))\n\t\t\t\t} else if (this._showPending) {\n\t\t\t\t\tpromises.push($.ajax(pendingShares))\n\t\t\t\t} else {\n\t\t\t\t\tpromises.push($.ajax(shares))\n\n\t\t\t\t\tif (this._sharedWithUser !== false || this._isOverview) {\n\t\t\t\t\t\tpromises.push($.ajax(remoteShares))\n\t\t\t\t\t}\n\t\t\t\t\tif (this._isOverview) {\n\t\t\t\t\t\tshares.data.shared_with_me = !shares.data.shared_with_me\n\t\t\t\t\t\tpromises.push($.ajax(shares))\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._reloadCall = $.when.apply($, promises)\n\t\t\t\tvar callBack = this.reloadCallback.bind(this)\n\t\t\t\treturn this._reloadCall.then(callBack, callBack)\n\t\t\t},\n\n\t\t\treloadCallback: function(shares, remoteShares, additionalShares) {\n\t\t\t\tdelete this._reloadCall\n\t\t\t\tthis.hideMask()\n\n\t\t\t\tthis.$el.find('#headerSharedWith').text(\n\t\t\t\t\tt('files_sharing', this._sharedWithUser ? 'Shared by' : 'Shared with')\n\t\t\t\t)\n\n\t\t\t\tvar files = []\n\n\t\t\t\t// make sure to use the same format\n\t\t\t\tif (shares[0] && shares[0].ocs) {\n\t\t\t\t\tshares = shares[0]\n\t\t\t\t}\n\t\t\t\tif (remoteShares && remoteShares[0] && remoteShares[0].ocs) {\n\t\t\t\t\tremoteShares = remoteShares[0]\n\t\t\t\t}\n\t\t\t\tif (additionalShares && additionalShares[0] && additionalShares[0].ocs) {\n\t\t\t\t\tadditionalShares = additionalShares[0]\n\t\t\t\t}\n\n\t\t\t\tif (shares.ocs && shares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromShares(shares.ocs.data, this._sharedWithUser))\n\t\t\t\t}\n\n\t\t\t\tif (remoteShares && remoteShares.ocs && remoteShares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromRemoteShares(remoteShares.ocs.data))\n\t\t\t\t}\n\n\t\t\t\tif (additionalShares && additionalShares.ocs && additionalShares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromShares(additionalShares.ocs.data, !this._sharedWithUser))\n\t\t\t\t}\n\n\t\t\t\tthis.setFiles(files)\n\t\t\t\treturn true\n\t\t\t},\n\n\t\t\t_makeFilesFromRemoteShares: function(data) {\n\t\t\t\tvar files = data\n\n\t\t\t\tfiles = _.chain(files)\n\t\t\t\t// convert share data to file data\n\t\t\t\t\t.map(function(share) {\n\t\t\t\t\t\tvar file = {\n\t\t\t\t\t\t\tshareOwner: share.owner + '@' + share.remote.replace(/.*?:\\/\\//g, ''),\n\t\t\t\t\t\t\tname: OC.basename(share.mountpoint),\n\t\t\t\t\t\t\tmtime: share.mtime * 1000,\n\t\t\t\t\t\t\tmimetype: share.mimetype,\n\t\t\t\t\t\t\ttype: share.type,\n\t\t\t\t\t\t\tid: share.file_id,\n\t\t\t\t\t\t\tpath: OC.dirname(share.mountpoint),\n\t\t\t\t\t\t\tpermissions: share.permissions,\n\t\t\t\t\t\t\ttags: share.tags || []\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfile.shares = [{\n\t\t\t\t\t\t\tid: share.id,\n\t\t\t\t\t\t\ttype: OC.Share.SHARE_TYPE_REMOTE\n\t\t\t\t\t\t}]\n\t\t\t\t\t\treturn file\n\t\t\t\t\t})\n\t\t\t\t\t.value()\n\t\t\t\treturn files\n\t\t\t},\n\n\t\t\t/**\n\t\t * Converts the OCS API share response data to a file info\n\t\t * list\n\t\t * @param {Array} data OCS API share array\n\t\t * @param {bool} sharedWithUser\n\t\t * @returns {Array.<OCA.Sharing.SharedFileInfo>} array of shared file info\n\t\t */\n\t\t\t_makeFilesFromShares: function(data, sharedWithUser) {\n\t\t\t/* jshint camelcase: false */\n\t\t\t\tvar files = data\n\n\t\t\t\tif (this._linksOnly) {\n\t\t\t\t\tfiles = _.filter(data, function(share) {\n\t\t\t\t\t\treturn share.share_type === OC.Share.SHARE_TYPE_LINK\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// OCS API uses non-camelcased names\n\t\t\t\tfiles = _.chain(files)\n\t\t\t\t// convert share data to file data\n\t\t\t\t\t.map(function(share) {\n\t\t\t\t\t// TODO: use OC.Files.FileInfo\n\t\t\t\t\t\tvar file = {\n\t\t\t\t\t\t\tid: share.file_source,\n\t\t\t\t\t\t\ticon: OC.MimeType.getIconUrl(share.mimetype),\n\t\t\t\t\t\t\tmimetype: share.mimetype,\n\t\t\t\t\t\t\ttags: share.tags || []\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (share.item_type === 'folder') {\n\t\t\t\t\t\t\tfile.type = 'dir'\n\t\t\t\t\t\t\tfile.mimetype = 'httpd/unix-directory'\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfile.type = 'file'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfile.share = {\n\t\t\t\t\t\t\tid: share.id,\n\t\t\t\t\t\t\ttype: share.share_type,\n\t\t\t\t\t\t\ttarget: share.share_with,\n\t\t\t\t\t\t\tstime: share.stime * 1000,\n\t\t\t\t\t\t\texpiration: share.expiration\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (sharedWithUser) {\n\t\t\t\t\t\t\tfile.shareOwner = share.displayname_owner\n\t\t\t\t\t\t\tfile.shareOwnerId = share.uid_owner\n\t\t\t\t\t\t\tfile.name = OC.basename(share.file_target)\n\t\t\t\t\t\t\tfile.path = OC.dirname(share.file_target)\n\t\t\t\t\t\t\tfile.permissions = share.permissions\n\t\t\t\t\t\t\tif (file.path) {\n\t\t\t\t\t\t\t\tfile.extraData = share.file_target\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (share.share_type !== OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\t\tfile.share.targetDisplayName = share.share_with_displayname\n\t\t\t\t\t\t\t\tfile.share.targetShareWithId = share.share_with\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfile.name = OC.basename(share.path)\n\t\t\t\t\t\t\tfile.path = OC.dirname(share.path)\n\t\t\t\t\t\t\tfile.permissions = OC.PERMISSION_ALL\n\t\t\t\t\t\t\tif (file.path) {\n\t\t\t\t\t\t\t\tfile.extraData = share.path\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn file\n\t\t\t\t\t})\n\t\t\t\t// Group all files and have a \"shares\" array with\n\t\t\t\t// the share info for each file.\n\t\t\t\t//\n\t\t\t\t// This uses a hash memo to cumulate share information\n\t\t\t\t// inside the same file object (by file id).\n\t\t\t\t\t.reduce(function(memo, file) {\n\t\t\t\t\t\tvar data = memo[file.id]\n\t\t\t\t\t\tvar recipient = file.share.targetDisplayName\n\t\t\t\t\t\tvar recipientId = file.share.targetShareWithId\n\t\t\t\t\t\tif (!data) {\n\t\t\t\t\t\t\tdata = memo[file.id] = file\n\t\t\t\t\t\t\tdata.shares = [file.share]\n\t\t\t\t\t\t\t// using a hash to make them unique,\n\t\t\t\t\t\t\t// this is only a list to be displayed\n\t\t\t\t\t\t\tdata.recipients = {}\n\t\t\t\t\t\t\tdata.recipientData = {}\n\t\t\t\t\t\t\t// share types\n\t\t\t\t\t\t\tdata.shareTypes = {}\n\t\t\t\t\t\t\t// counter is cheaper than calling _.keys().length\n\t\t\t\t\t\t\tdata.recipientsCount = 0\n\t\t\t\t\t\t\tdata.mtime = file.share.stime\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t// always take the most recent stime\n\t\t\t\t\t\t\tif (file.share.stime > data.mtime) {\n\t\t\t\t\t\t\t\tdata.mtime = file.share.stime\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdata.shares.push(file.share)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (recipient) {\n\t\t\t\t\t\t// limit counterparts for output\n\t\t\t\t\t\t\tif (data.recipientsCount < 4) {\n\t\t\t\t\t\t\t// only store the first ones, they will be the only ones\n\t\t\t\t\t\t\t// displayed\n\t\t\t\t\t\t\t\tdata.recipients[recipient] = true\n\t\t\t\t\t\t\t\tdata.recipientData[data.recipientsCount] = {\n\t\t\t\t\t\t\t\t\t'shareWith': recipientId,\n\t\t\t\t\t\t\t\t\t'shareWithDisplayName': recipient\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdata.recipientsCount++\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.shareTypes[file.share.type] = true\n\n\t\t\t\t\t\tdelete file.share\n\t\t\t\t\t\treturn memo\n\t\t\t\t\t}, {})\n\t\t\t\t// Retrieve only the values of the returned hash\n\t\t\t\t\t.values()\n\t\t\t\t// Clean up\n\t\t\t\t\t.each(function(data) {\n\t\t\t\t\t// convert the recipients map to a flat\n\t\t\t\t\t// array of sorted names\n\t\t\t\t\t\tdata.mountType = 'shared'\n\t\t\t\t\t\tdelete data.recipientsCount\n\t\t\t\t\t\tif (sharedWithUser) {\n\t\t\t\t\t\t// only for outgoing shares\n\t\t\t\t\t\t\tdelete data.shareTypes\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdata.shareTypes = _.keys(data.shareTypes)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t// Finish the chain by getting the result\n\t\t\t\t\t.value()\n\n\t\t\t\t// Sort by expected sort comparator\n\t\t\t\treturn files.sort(this._sortComparator)\n\t\t\t}\n\t\t})\n\n\t/**\n\t * Share info attributes.\n\t *\n\t * @typedef {Object} OCA.Sharing.ShareInfo\n\t *\n\t * @property {int} id share ID\n\t * @property {int} type share type\n\t * @property {String} target share target, either user name or group name\n\t * @property {int} stime share timestamp in milliseconds\n\t * @property {String} [targetDisplayName] display name of the recipient\n\t * (only when shared with others)\n\t * @property {String} [targetShareWithId] id of the recipient\n\t *\n\t */\n\n\t/**\n\t * Recipient attributes\n\t *\n\t * @typedef {Object} OCA.Sharing.RecipientInfo\n\t * @property {String} shareWith the id of the recipient\n\t * @property {String} shareWithDisplayName the display name of the recipient\n\t */\n\n\t/**\n\t * Shared file info attributes.\n\t *\n\t * @typedef {OCA.Files.FileInfo} OCA.Sharing.SharedFileInfo\n\t *\n\t * @property {Array.<OCA.Sharing.ShareInfo>} shares array of shares for\n\t * this file\n\t * @property {int} mtime most recent share time (if multiple shares)\n\t * @property {String} shareOwner name of the share owner\n\t * @property {Array.<String>} recipients name of the first 4 recipients\n\t * (this is mostly for display purposes)\n\t * @property {Object.<OCA.Sharing.RecipientInfo>} recipientData (as object for easier\n\t * passing to HTML data attributes with jQuery)\n\t */\n\n\tOCA.Sharing.FileList = FileList\n})()\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index 5b198300589..f40a1f1a853 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -39,6 +39,7 @@
_sharedWithUser: false,
_linksOnly: false,
_showDeleted: false,
+ _showPending: false,
_clientSideSort: true,
_allowSelection: false,
_isOverview: false,
@@ -62,6 +63,9 @@
if (options && options.showDeleted) {
this._showDeleted = true
}
+ if (options && options.showPending) {
+ this._showPending = true
+ }
if (options && options.isOverview) {
this._isOverview = true
}
@@ -87,7 +91,7 @@
var permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE
$tr.attr('data-permissions', permission)
}
- if (this._showDeleted) {
+ if (this._showDeleted || this._showPending) {
var permission = fileData.permissions
$tr.attr('data-share-permissions', permission)
}
@@ -196,6 +200,18 @@
}
}
+ var pendingShares = {
+ url: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + 'pending',
+ /* jshint camelcase: false */
+ data: {
+ format: 'json'
+ },
+ type: 'GET',
+ beforeSend: function(xhr) {
+ xhr.setRequestHeader('OCS-APIREQUEST', 'true')
+ }
+ }
+
var shares = {
url: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',
/* jshint camelcase: false */
@@ -227,6 +243,8 @@
// and make sure we have 2 promises
if (this._showDeleted) {
promises.push($.ajax(deletedShares))
+ } else if (this._showPending) {
+ promises.push($.ajax(pendingShares))
} else {
promises.push($.ajax(shares))
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 48802617b4f..5a18cce8e49 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -278,6 +278,15 @@ class Application extends App {
'name' => $l->t('Deleted shares'),
]);
+ array_push($sharingSublistArray, [
+ 'id' => 'pendingshares',
+ 'appname' => 'files_sharing',
+ 'script' => 'list.php',
+ 'order' => 19,
+ 'name' => $l->t('Pending shares'),
+ ]);
+
+
// show_Quick_Access stored as string
\OCA\Files\App::getNavigationManager()->add([
'id' => 'shareoverview',
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index e7c9a414958..b71d3dac3a7 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -1100,11 +1100,31 @@ class ShareAPIController extends OCSController {
}
}
- $result = array_map(function (IShare $share) {
- return [
- 'id' => $share->getFullId(),
- ];
- }, $pendingShares);
+ $result = array_filter(array_map(function (IShare $share) {
+ $userFolder = $this->rootFolder->getUserFolder($share->getSharedBy());
+ $nodes = $userFolder->getById($share->getNodeId());
+ if (empty($nodes)) {
+ // fallback to guessing the path
+ $node = $userFolder->get($share->getTarget());
+ if ($node === null || $share->getTarget() === '') {
+ return null;
+ }
+ } else {
+ $node = $nodes[0];
+ }
+
+ try {
+ $formattedShare = $this->formatShare($share, $node);
+ $formattedShare['status'] = $share->getStatus();
+ $formattedShare['path'] = $share->getNode()->getName();
+ $formattedShare['permissions'] = 0;
+ return $formattedShare;
+ } catch (NotFoundException $e) {
+ return null;
+ }
+ }, $pendingShares), function ($entry) {
+ return $entry !== null;
+ });
return new DataResponse($result);
}