pleroma/priv/static/packs/flavours/glitch/async/getting_started.js
Haelwenn (lanodan) Monnier 2a850abbeb
MastoFE: Bundle 2020-01-20
2020-02-29 06:41:13 +01:00

2 lines
8.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{759:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i,a=n(0),s=n(7),o=n(3),r=n.n(o),c=n(6),u=Object(c.g)(i=function(e){function t(){return e.apply(this,arguments)||this}return Object(s.a)(t,e),t.prototype.render=function(){return Object(a.a)("div",{className:"getting-started__footer"},void 0,Object(a.a)("p",{},void 0,Object(a.a)(c.b,{id:"getting_started.mastofe_notice",defaultMessage:"Mastofe is a libre distribution of the frontend from {glitchsoc}, a friendly fork of {mastodon}. You can contribute or report issues at {mastofe}.",values:{mastofe:Object(a.a)("a",{href:"https://git.pleroma.social/pleroma/mastofe",rel:"noopener noreferrer",target:"_blank"},void 0,"Mastofe"),glitchsoc:Object(a.a)("a",{href:"https://github.com/glitch-soc/mastodon",rel:"noopener noreferrer",target:"_blank"},void 0,"glitch-soc"),mastodon:Object(a.a)("a",{href:"https://github.com/tootsuite/mastodon",rel:"noopener noreferrer",target:"_blank"},void 0,"Mastodon"),pleroma:Object(a.a)("a",{href:"https://pleroma.social",rel:"noopener noreferrer",target:"_blank"},void 0,"Pleroma")}})))},t}(r.a.PureComponent))||i},766:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return C}));var i,a,s,o,r=n(0),c=n(7),u=n(1),l=(n(3),n(730)),d=n(1075),f=n(1076),g=n(6),m=n(13),b=n(42),p=n(5),h=n.n(p),_=n(14),O=n.n(_),j=n(18),v=n(16),M=n(22),y=n(4),k=n(54),w=n(28),q=n(145),I=n(742),x=n(759),P=n(198),R=n(838),T=Object(g.f)(((i={heading:{id:"getting_started.heading",defaultMessage:"Getting started"},home_timeline:{id:"tabs_bar.home",defaultMessage:"Home"},notifications:{id:"tabs_bar.notifications",defaultMessage:"Notifications"},public_timeline:{id:"navigation_bar.public_timeline",defaultMessage:"Federated timeline"},navigation_subheading:{id:"column_subheading.navigation",defaultMessage:"Navigation"},settings_subheading:{id:"column_subheading.settings",defaultMessage:"Settings"},community_timeline:{id:"navigation_bar.community_timeline",defaultMessage:"Local timeline"},direct:{id:"navigation_bar.direct",defaultMessage:"Direct messages"},bookmarks:{id:"navigation_bar.bookmarks",defaultMessage:"Bookmarks"},preferences:{id:"navigation_bar.preferences",defaultMessage:"Preferences"},settings:{id:"navigation_bar.app_settings",defaultMessage:"App settings"},follow_requests:{id:"navigation_bar.follow_requests",defaultMessage:"Follow requests"},lists:{id:"navigation_bar.lists",defaultMessage:"Lists"},keyboard_shortcuts:{id:"navigation_bar.keyboard_shortcuts",defaultMessage:"Keyboard shortcuts"}}).lists={id:"navigation_bar.lists",defaultMessage:"Lists"},i.lists_subheading={id:"column_subheading.lists",defaultMessage:"Lists"},i.misc={id:"navigation_bar.misc",defaultMessage:"Misc"},i.menu={id:"getting_started.heading",defaultMessage:"Getting started"},i.profile_directory={id:"getting_started.directory",defaultMessage:"Profile directory"},i)),N=function(e,t){return 0===e?void 0:t&&e>=t?t+"+":e},C=Object(m.connect)((function(){var e=Object(k.a)([function(e){return e.get("lists")}],(function(e){return e?e.toList().filter((function(e){return!!e})).sort((function(e,t){return e.get("title").localeCompare(t.get("title"))})):e}));return function(t){return{lists:e(t),myAccount:t.getIn(["accounts",v.m]),columns:t.getIn(["settings","columns"]),unreadFollowRequests:t.getIn(["user_lists","follow_requests","items"],Object(y.List)()).size,unreadNotifications:t.getIn(["notifications","unread"]),customPanelEnabled:t.getIn(["custom_panel","enabled"]),customPanel:t.getIn(["custom_panel","panel"])}}}),(function(e){return{fetchFollowRequests:function(){return e(Object(M.G)())},fetchLists:function(){return e(Object(w.I)())},openSettings:function(){return e(Object(b.d)("SETTINGS",{}))},fetchPanel:function(){return e(Object(P.c)())},fetchPleromaConfig:function(){return e(Object(P.d)())}}}))(a=Object(g.g)((o=s=function(e){function t(){return e.apply(this,arguments)||this}Object(c.a)(t,e);var n=t.prototype;return n.componentWillMount=function(){this.props.fetchLists()},n.componentDidMount=function(){var e=this.props,t=e.fetchFollowRequests,n=e.multiColumn,i=e.fetchPleromaConfig,a=e.fetchPanel;!n&&window.innerWidth>=1190?this.context.router.history.replace("/timelines/home"):(t(),i(),a())},n.render=function(){var e=this.props,t=e.intl,n=e.myAccount,i=e.columns,a=e.multiColumn,s=e.unreadFollowRequests,o=e.unreadNotifications,c=e.lists,u=e.openSettings,g=e.customPanelEnabled,m=e.customPanel,b=[],p=[];a&&(i.find((function(e){return"HOME"===e.get("id")}))||b.push(Object(r.a)(d.a,{icon:"home",text:t.formatMessage(T.home_timeline),to:"/timelines/home"},"0")),i.find((function(e){return"NOTIFICATIONS"===e.get("id")}))||b.push(Object(r.a)(d.a,{icon:"bell",text:t.formatMessage(T.notifications),badge:N(o),to:"/notifications"},"1")),i.find((function(e){return"COMMUNITY"===e.get("id")}))||b.push(Object(r.a)(d.a,{icon:"users",text:t.formatMessage(T.community_timeline),to:"/timelines/public/local"},"2")),i.find((function(e){return"PUBLIC"===e.get("id")}))||b.push(Object(r.a)(d.a,{icon:"globe",text:t.formatMessage(T.public_timeline),to:"/timelines/public"},"3"))),a&&i.find((function(e){return"DIRECT"===e.get("id")}))||b.push(Object(r.a)(d.a,{icon:"envelope",text:t.formatMessage(T.direct),to:"/timelines/direct"},"4")),a&&i.find((function(e){return"BOOKMARKS"===e.get("id")}))||b.push(Object(r.a)(d.a,{icon:"bookmark",text:t.formatMessage(T.bookmarks),to:"/bookmarks"},"5")),(n.get("locked")||s>0)&&b.push(Object(r.a)(d.a,{icon:"user-plus",text:t.formatMessage(T.follow_requests),badge:N(s,40),to:"/follow_requests"},"6")),v.o&&b.push(Object(r.a)(d.a,{icon:"address-book",text:t.formatMessage(T.profile_directory),to:"/directory"},"7")),b.push(Object(r.a)(d.a,{icon:"ellipsis-h",text:t.formatMessage(T.misc),to:"/getting-started-misc"},"8")),p=p.concat([Object(r.a)("div",{},"9",Object(r.a)(d.a,{icon:"bars",text:t.formatMessage(T.lists),to:"/lists"},"10"),c.map((function(e){return Object(r.a)(d.a,{to:"/timelines/list/"+e.get("id"),icon:"list-ul",text:e.get("title")},(11+Number(e.get("id"))).toString())})))]);var h=g?Object(r.a)("div",{className:"getting-started getting-started__panel",dangerouslySetInnerHTML:{__html:m}}):null;return Object(r.a)(l.a,{bindToDocument:!a,name:"getting-started",icon:"asterisk",heading:t.formatMessage(T.heading),label:t.formatMessage(T.menu),hideHeadingOnMobile:!0},void 0,Object(r.a)("div",{className:"scrollable optionally-scrollable"},void 0,Object(r.a)("div",{className:"getting-started__wrapper"},void 0,!a&&Object(r.a)(I.a,{account:n}),a&&Object(r.a)(f.a,{text:t.formatMessage(T.navigation_subheading)}),b,Object(r.a)(f.a,{text:t.formatMessage(T.lists_subheading)}),p,Object(r.a)(f.a,{text:t.formatMessage(T.settings_subheading)}),void 0!==q.c&&Object(r.a)(d.a,{icon:"cog",text:t.formatMessage(T.preferences),href:q.c}),Object(r.a)(d.a,{icon:"cogs",text:t.formatMessage(T.settings),onClick:u})),h,Object(r.a)(x.a,{})),a&&v.r&&Object(r.a)(R.a,{}))},t}(j.a),Object(u.a)(s,"contextTypes",{router:h.a.object.isRequired}),Object(u.a)(s,"propTypes",{intl:h.a.object.isRequired,myAccount:O.a.map.isRequired,columns:O.a.list,multiColumn:h.a.bool,fetchFollowRequests:h.a.func.isRequired,unreadFollowRequests:h.a.number,unreadNotifications:h.a.number,lists:O.a.list,fetchLists:h.a.func.isRequired,openSettings:h.a.func.isRequired,fetchPanel:h.a.func.isRequired,fetchPleromaConfig:h.a.func.isRequired,customPanelEnabled:h.a.bool,customPanel:h.a.string.isRequired}),a=o))||a)||a},838:function(e,t,n){"use strict";var i=n(13),a=n(263),s=n(0),o=n(7),r=n(1),c=(n(3),n(18)),u=n(5),l=n.n(u),d=n(14),f=n.n(d),g=n(743),m=n(6),b=function(e){function t(){return e.apply(this,arguments)||this}Object(o.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;this.props.fetchTrends(),this.refreshInterval=setInterval((function(){return e.props.fetchTrends()}),9e5)},n.componentWillUnmount=function(){this.refreshInterval&&clearInterval(this.refreshInterval)},n.render=function(){var e=this.props.trends;return!e||e.isEmpty()?null:Object(s.a)("div",{className:"getting-started__trends"},void 0,Object(s.a)("h4",{},void 0,Object(s.a)(m.b,{id:"trends.trending_now",defaultMessage:"Trending now"})),e.take(3).map((function(e){return Object(s.a)(g.a,{hashtag:e},e.get("name"))})))},t}(c.a);Object(r.a)(b,"defaultProps",{loading:!1}),Object(r.a)(b,"propTypes",{trends:f.a.list,fetchTrends:l.a.func.isRequired});t.a=Object(i.connect)((function(e){return{trends:e.getIn(["trends","items"])}}),(function(e){return{fetchTrends:function(){return e(Object(a.d)())}}}))(b)}}]);
//# sourceMappingURL=getting_started.js.map