2 lines
7.2 KiB
JavaScript
2 lines
7.2 KiB
JavaScript
"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[5994],{55994:(e,t,s)=>{s.r(t),s.d(t,{default:()=>k});var i=s(70314),n=s(36891),o=s(12763),r=s(32394),a=s(97042),m=s(4500),l=s(43618),c=s(19601),d=s(83905),u=s(84073),p=s(910),y=s(84390),g=s.n(y),f=s(72060),h=s(45448),_=s(35683),v=s(23712),b=s(5647),E=s(21214);const M=[{name:"apiv3_deprecation",adminOnly:!0,title:g().createElement(f.FormattedMessage,{id:"system_notice.title",defaultMessage:"Notice from Mattermost"}),body:g().createElement(f.FormattedMessage,{id:"system_notice.body.api3",defaultMessage:"If you’ve created or installed integrations in the last two years, find out how <link>recent changes</link> may have affected them.",values:{link:e=>g().createElement(_.Z,{href:"https://api.mattermost.com/#tag/APIv3-Deprecation",location:"system_notices"},e)}}),allowForget:!0,show:(e,t)=>!(t.InstallationDate>=new Date(2018,5,16,0,0,0,0).getTime())},{name:"advanced_permissions",adminOnly:!0,title:g().createElement(f.FormattedMessage,{id:"system_notice.title",defaultMessage:"Notice from Mattermost"}),body:g().createElement(f.FormattedMessage,{id:"system_notice.body.permissions",defaultMessage:"Some policy and permission System Console settings have moved with the release of <link>advanced permissions</link> into Mattermost Free and Professional.",values:{link:e=>g().createElement(_.Z,{href:v.qB.ONBOARD_ADVANCED_PERMISSIONS,location:"system_notices"},e)}}),allowForget:!0,show:(e,t,s)=>!("false"===s.IsLicensed||t.InstallationDate>new Date(2018,5,16,0,0,0,0).getTime()||"true"===s.IsLicensed&&s.IssuedAt>new Date(2018,5,16,0,0,0,0).getTime())},{name:"ee_upgrade_advice",adminOnly:!0,title:g().createElement(f.FormattedMessage,{id:"system_notice.title",defaultMessage:"Notice from Mattermost"}),body:g().createElement(f.FormattedMessage,{id:"system_notice.body.ee_upgrade_advice",defaultMessage:"Enterprise Edition is recommended to ensure optimal operation and reliability. <link>Learn more</link>.",values:{link:e=>g().createElement(_.Z,{href:"https://mattermost.com/performance",location:"system_notices"},e)}}),allowForget:!1,show:(e,t,s,i)=>!(null==i||!i.hasOwnProperty("TOTAL_USERS")||i.TOTAL_USERS&&i.TOTAL_USERS<1e4||"true"===s.IsLicensed&&"true"===s.Cluster)},{name:"ie11_deprecation",title:g().createElement(f.FormattedMessage,{id:"system_notice.title",defaultMessage:"Notice from Mattermost"}),allowForget:!1,body:g().createElement(f.FormattedMessage,{id:"system_notice.body.ie11_deprecation",defaultMessage:"Your browser, IE11, will no longer be supported in an upcoming release. <link>Find out how to move to another browser in one simple step</link>.",values:{link:e=>g().createElement(_.Z,{href:"https://forum.mattermost.com/t/mattermost-is-dropping-support-for-internet-explorer-ie11-in-v5-16/7575",location:"system_notices"},e)}}),show:e=>!b.l(e,"5.16.0")&&!!E.w6()},{name:"GMasDM",allowForget:!0,title:g().createElement(f.FormattedMessage,{id:"system_notice.title.gm_as_dm",defaultMessage:"Updates to Group Messages"}),icon:g().createElement(h.InformationOutlineIcon,null),body:g().createElement(f.FormattedMessage,{id:"system_noticy.body.gm_as_dm",defaultMessage:"You will now be notified for all activity in your group messages along with a notification badge for every new message.{br}{br}You can configure this in notification preferences for each group message.",values:{br:g().createElement("br",null)}}),show:(e,t,s,i,n)=>"G"===(null==n?void 0:n.type)}];var w=s(23615),S=s.n(w),A=(s(14078),s(92189),s(93268));function N(e,t,s){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var i=s.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}class F extends g().PureComponent{constructor(){var e;super(...arguments),e=this,N(this,"getCurrentNotice",(()=>{for(const t of this.props.notices){var e;if(!this.props.dismissedNotices[t.name]&&!this.props.preferences[t.name]&&(!t.adminOnly||this.props.isSystemAdmin)&&null!==(e=t.show)&&void 0!==e&&e.call(t,this.props.serverVersion,this.props.config,this.props.license,this.props.analytics,this.props.currentChannel))return t}return null})),N(this,"hide",(function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const s=e.getCurrentNotice();s&&(t||e.props.actions.savePreferences(e.props.currentUserId,[{user_id:e.props.currentUserId,category:v.uP.CATEGORY_SYSTEM_NOTICE,name:s.name,value:"dismissed"}]),e.props.actions.dismissNotice(s.name))})),N(this,"hideAndRemind",(()=>{this.hide(!0)})),N(this,"hideAndForget",(()=>{this.hide(!1)}))}componentDidMount(){this.props.isSystemAdmin&&this.props.actions.getStandardAnalytics()}componentDidUpdate(e){e.isSystemAdmin!==this.props.isSystemAdmin&&this.props.isSystemAdmin&&this.props.actions.getStandardAnalytics()}render(){const e=this.getCurrentNotice();if(null==e)return null;let t;e.adminOnly&&(t=g().createElement("div",{className:"system-notice__info"},g().createElement("i",{className:"fa fa-eye",title:this.props.intl.formatMessage({id:"system_notice.adminVisible.icon",defaultMessage:"Only visible to System Admins Icon"})}),g().createElement(f.FormattedMessage,{id:"system_notice.adminVisible",defaultMessage:"Only visible to System Admins"})));const s=e.icon||g().createElement(A.Z,null);return g().createElement("div",{className:"system-notice bg--white"},g().createElement("div",{className:"system-notice__logo"},s),g().createElement("div",{className:"system-notice__body"},g().createElement("div",{className:"system-notice__title"},e.title),e.body,t,g().createElement("div",{className:"system-notice__footer"},g().createElement("button",{id:"systemnotice_remindme",className:"btn btn-sm btn-primary",onClick:this.hideAndRemind},g().createElement(f.FormattedMessage,{id:"system_notice.remind_me",defaultMessage:"Remind Me Later"})),e.allowForget&&g().createElement("button",{id:"systemnotice_dontshow",className:"btn btn-sm btn-tertiary",onClick:this.hideAndForget},g().createElement(f.FormattedMessage,{id:"system_notice.dont_show",defaultMessage:"Don't Show Again"})))))}}N(F,"propTypes",{currentUserId:S().string.isRequired,notices:S().array.isRequired,preferences:S().objectOf(S().any).isRequired,dismissedNotices:S().any.isRequired,isSystemAdmin:S().bool,serverVersion:S().string.isRequired,actions:S().shape({}).isRequired});const I=(0,f.injectIntl)(F),O=(0,d.YX)("getSystemNoticePreferences",v.uP.CATEGORY_SYSTEM_NOTICE),T=(0,m.P1)("getPreferenceNameMap",O,(e=>{const t={};return e.forEach((e=>{t[e.name]=e})),t})),k=(0,i.connect)((function(e){const t=(0,c.lJ)(e),s=(0,c.iE)(e),i=e.entities.general.serverVersion,n=e.entities.admin.analytics;return{currentUserId:e.entities.users.currentUserId,preferences:T(e),dismissedNotices:e.views.notice.hasBeenDismissed,isSystemAdmin:(0,u.AN)(e,{permission:a.Pl.MANAGE_SYSTEM}),notices:M,config:s,license:t,serverVersion:i,analytics:n,currentChannel:(0,l.TB)(e)}}),(function(e){return{actions:(0,n.bindActionCreators)({savePreferences:r.$A,dismissNotice:p.G,getStandardAnalytics:o.pu},e)}}))(I)}}]);
|
||
//# sourceMappingURL=5994.315384cb0363d4eb568f.js.map
|