mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 19:08:21 +00:00
2 lines
1.0 MiB
JavaScript
2 lines
1.0 MiB
JavaScript
![]() |
/*! For license information please see sharedFileViewAudio.addafb4b.js.LICENSE.txt */
|
||
|
(self.webpackChunkseahub_frontend=self.webpackChunkseahub_frontend||[]).push([[4069],{50268:function(e,t,n){"use strict";var r=n(23029),i=n(92901),a=n(39874),o=n(85501),s=n(9950),u=n(13336),l=(n(37253),n(44414)),c=function(e){function t(){return(0,r.A)(this,t),(0,a.A)(this,t,arguments)}return(0,o.A)(t,e),(0,i.A)(t,[{key:"componentDidMount",value:function(){this.player=(0,u.A)(this.videoNode,this.props,(function(){}))}},{key:"componentWillUnmount",value:function(){this.player&&this.player.dispose()}},{key:"render",value:function(){var e=this;return(0,l.jsx)("div",{"data-vjs-player":!0,children:(0,l.jsx)("audio",{ref:function(t){return e.videoNode=t},className:"video-js vjs-has-started"})})}}])}(s.Component);t.A=c},51925:function(e,t,n){"use strict";var r=n(23029),i=n(92901),a=n(39874),o=n(85501),s=n(9950),u=n(17119),l=n(65604),c=n(97011),d=n(40326),p=n(4086),h=n(44414),f=window.app.pageOptions.isOrgContext,m=function(e){function t(e){var n;return(0,r.A)(this,t),(n=(0,a.A)(this,t,[e])).getContainer=function(){return u.findDOMNode(n)},n.handleProps=function(){n.state.showInfo?n.addEvents():n.removeEvents()},n.addEvents=function(){["click","touchstart","keyup"].forEach((function(e){return document.addEventListener(e,n.handleDocumentClick,!0)}))},n.removeEvents=function(){["click","touchstart","keyup"].forEach((function(e){return document.removeEventListener(e,n.handleDocumentClick,!0)}))},n.handleDocumentClick=function(e){if(!e||3!==e.which&&("keyup"!==e.type||e.which===l.Aq.keyCodes.tab)){var t=n.getContainer();(!t.contains(e.target)||t===e.target||"keyup"===e.type&&e.which!==l.Aq.keyCodes.tab)&&n.setState({showInfo:!n.state.showInfo})}},n.onClickAccount=function(e){e.preventDefault(),n.isFirstMounted?(c.e.getAccountInfo().then((function(e){n.setState({userName:e.data.name,contactEmail:e.data.email,usageRate:e.data.space_usage,quotaUsage:l.Aq.bytesToSize(e.data.usage),quotaTotal:l.Aq.bytesToSize(e.data.total),isStaff:e.data.is_staff,isInstAdmin:e.data.is_inst_admin,isOrgStaff:1===e.data.is_org_staff,showInfo:!n.state.showInfo,enableSubscription:e.data.enable_subscription})})).catch((function(e){var t=l.Aq.getErrorMsg(e);p.A.danger(t)})),n.isFirstMounted=!1):n.setState({showInfo:!n.state.showInfo})},n.renderMenu=function(){var e,t=n.state,r=t.isStaff,i=t.isOrgStaff,a=t.isInstAdmin;return n.props.isAdminPanel?r?e={url:d.Yc,text:(0,d.AP)("Exit System Admin")}:i?e={url:d.Yc,text:(0,d.AP)("Exit Organization Admin")}:a&&(e={url:d.Yc,text:(0,d.AP)("Exit Institution Admin")}):r?e={url:"".concat(d.Yc,"sys/info/"),text:(0,d.AP)("System Admin")}:i?e={url:"".concat(d.Yc,"org/info/"),text:(0,d.AP)("Organization Admin")}:d.am&&a&&(e={url:"".concat(d.Yc,"inst/useradmin/"),text:(0,d.AP)("Institution Admin")}),e&&(0,h.jsx)("a",{href:e.url,title:e.text,className:"item",children:e.text})},n.renderAvatar=function(){return(0,h.jsx)("img",{src:d.wg,width:"36",height:"36",className:"avatar",alt:(0,d.AP)("Avatar")})},n.state={showInfo:!1,userName:"",contactEmail:"",quotaUsage:"",quotaTotal:"",isStaff:!1,isOrgStaff:!1,usageRate:"",enableSubscription:!1},n.isFirstMounted=!0,n}return(0,o.A)(t,e),(0,i.A)(t,[{key:"componentDidUpdate",value:function(e){this.handleProps()}},{key:"render",value:function(){return(0,h.jsxs)("div",{id:"account",children:[(0,h.jsx)("a",{id:"my-info",href:"#",onClick:this.onClickAccount,className:"account-toggle no-deco d-none d-md-block","aria-label":(0,d.AP)("View profile and more"),children:this.renderAvatar()}),(0,h.jsx)("span",{className:"account-toggle sf2-icon-more mobile-icon d-md-none","aria-label":(0,d.AP)("View profile and more"),onClick:this.onClickAccount}),(0,h.jsxs)("div",{id:"user-info-popup",className:"account-popup sf-popover ".concat(this.state.showInfo?"":"hide"),children:[(0,h.jsx)("div",{className:"outer-caret up-outer-caret",children:(0,h.jsx)("div",{className:"inner-caret"})}),(0,h.jsxs)("div",{className:"sf-popover-con",children:[(0,h.jsxs)("div",{className:"item o-hidden",children:[this.renderAvatar(),(0,h.jsx)("div",{className:"txt",children:this.state.userName})]}),(0,h.jsx)("div",{id:"space-traffi
|