honkoma/priv/static/packs/flavours/glitch/async/getting_started.js

2 lines
6.7 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{665:function(e,t,i){"use strict";i.r(t),i.d(t,"default",function(){return P});var a,s,n,o,m=i(1),r=i(7),c=i(2),b=(i(3),i(641)),h=i(925),p=i(926),_=i(6),u=i(20),l=i(45),g=i(5),d=i.n(g),f=i(26),M=i.n(f),O=i(24),j=i(29),v=i(14),k=i(4),q=i(60),w=i(30),x=i(140),R=i(160),y=Object(_.f)(((a={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"},sign_out:{id:"navigation_bar.logout",defaultMessage:"Logout"},lists:{id:"navigation_bar.lists",defaultMessage:"Lists"},keyboard_shortcuts:{id:"navigation_bar.keyboard_shortcuts",defaultMessage:"Keyboard shortcuts"}}).lists={id:"navigation_bar.lists",defaultMessage:"Lists"},a.lists_subheading={id:"column_subheading.lists",defaultMessage:"Lists"},a.misc={id:"navigation_bar.misc",defaultMessage:"Misc"},a.menu={id:"getting_started.heading",defaultMessage:"Getting started"},a)),I=function(e,t){return 0===e?void 0:t&&t<=e?t+"+":e},P=Object(u.connect)(function(){var t=Object(q.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(e){return{lists:t(e),myAccount:e.getIn(["accounts",j.k]),columns:e.getIn(["settings","columns"]),unreadFollowRequests:e.getIn(["user_lists","follow_requests","items"],Object(k.List)()).size,unreadNotifications:e.getIn(["notifications","unread"]),customPanelEnabled:e.getIn(["custom_panel","enabled"]),customPanel:e.getIn(["custom_panel","panel"])}}},function(e){return{fetchFollowRequests:function(){return e(Object(v.H)())},fetchLists:function(){return e(Object(w.I)())},openSettings:function(){return e(Object(l.d)("SETTINGS",{}))},fetchPanel:function(){return e(Object(R.c)())},fetchPleromaConfig:function(){return e(Object(R.d)())}}})(s=Object(_.g)((o=n=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var i=t.prototype;return i.componentWillMount=function(){this.props.fetchLists()},i.componentDidMount=function(){var e=this.props,t=e.myAccount,i=e.fetchFollowRequests,a=e.fetchPleromaConfig,s=e.fetchPanel;t.get("locked")&&i(),a(),s()},i.render=function(){var e=this.props,t=e.intl,i=e.myAccount,a=e.columns,s=e.multiColumn,n=e.unreadFollowRequests,o=e.unreadNotifications,r=e.lists,c=e.openSettings,u=e.customPanelEnabled,l=e.customPanel,g=[],d=[];s&&(a.find(function(e){return"HOME"===e.get("id")})||g.push(Object(m.a)(h.a,{icon:"home",text:t.formatMessage(y.home_timeline),to:"/timelines/home"},"0")),a.find(function(e){return"NOTIFICATIONS"===e.get("id")})||g.push(Object(m.a)(h.a,{icon:"bell",text:t.formatMessage(y.notifications),badge:I(o),to:"/notifications"},"1")),a.find(function(e){return"COMMUNITY"===e.get("id")})||g.push(Object(m.a)(h.a,{icon:"users",text:t.formatMessage(y.community_timeline),to:"/timelines/public/local"},"2")),a.find(function(e){return"PUBLIC"===e.get("id")})||g.push(Object(m.a)(h.a,{icon:"globe",text:t.formatMessage(y.public_timeline),to:"/timelines/public"},"3"))),s&&a.find(function(e){return"DIRECT"===e.get("id")})||g.push(Object(m.a)(h.a,{icon:"envelope",text:t.formatMessage(y.direct),to:"/timelines/direct"},"4")),s&&a.find(function(e){return"BOOKMARKS"===e.get("id")})||g.push(Object(m.a)(h.a,{icon:"bookmark",text:t.formatMessage(y.bookmarks),to:"/bookmarks"},"5")),i.get("locked")&&g.push(Object(m.a)(h.a,{icon:"users",text:t.formatMessage(y.follow_requests),badge:I(n,40),to:"/follow_requests"},"6")),g.push(Object(m.a)(h.a,{icon:"ellipsis-h",text:t.formatMessage(y.misc),to:"/getting-started-misc"},"7")),d=d.concat([Object(m.a)("div",{},"8",Object(m.a)(h.a,{icon:"bars",text:t.formatMessage(y.lists),to:"/lists"},"9"),r.map(function(e){return Object(m.a)(h.a,{to:"/timelines/list/"+e.get("id"),icon:"list-ul",text:e.get("title")},(9+Number(e.get("id"))).toString())}))]);var f=u?Object(m.a)("div",{className:"getting-started getting-started__panel scrollable",dangerouslySetInnerHTML:{__html:l}}):null;return Object(m.a)(b.a,{name:"getting-started",icon:"asterisk",heading:t.formatMessage(y.heading),label:t.formatMessage(y.menu),hideHeadingOnMobile:!0},void 0,Object(m.a)("div",{className:"getting-started__wrapper scrollable"},void 0,Object(m.a)(p.a,{text:t.formatMessage(y.navigation_subheading)}),g,Object(m.a)(p.a,{text:t.formatMessage(y.lists_subheading)}),d,Object(m.a)(p.a,{text:t.formatMessage(y.settings_subheading)}),void 0!==x.b&&Object(m.a)(h.a,{icon:"cog",text:t.formatMessage(y.preferences),href:x.b}),Object(m.a)(h.a,{icon:"cogs",text:t.formatMessage(y.settings),onClick:c}),Object(m.a)(h.a,{icon:"sign-out",text:t.formatMessage(y.sign_out),href:x.d,method:"delete"})),f,Object(m.a)("div",{className:"getting-started__footer scrollable"},void 0,Object(m.a)("p",{},void 0,Object(m.a)(_.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(m.a)("a",{href:"https://git.pleroma.social/pleroma/mastofe",rel:"noopener",target:"_blank"},void 0,"Mastofe"),glitchsoc:Object(m.a)("a",{href:"https://github.com/glitch-soc/mastodon",rel:"noopener",target:"_blank"},void 0,"glitch-soc"),mastodon:Object(m.a)("a",{href:"https://github.com/tootsuite/mastodon",rel:"noopener",target:"_blank"},void 0,"Mastodon"),pleroma:Object(m.a)("a",{href:"https://pleroma.social",rel:"noopener",target:"_blank"},void 0,"Pleroma")}}))))},t}(O.a),Object(c.a)(n,"propTypes",{intl:d.a.object.isRequired,myAccount:M.a.map.isRequired,columns:M.a.list,multiColumn:d.a.bool,fetchFollowRequests:d.a.func.isRequired,unreadFollowRequests:d.a.number,unreadNotifications:d.a.number,lists:M.a.list,fetchLists:d.a.func.isRequired,openSettings:d.a.func.isRequired,fetchPanel:d.a.func.isRequired,fetchPleromaConfig:d.a.func.isRequired,customPanelEnabled:d.a.bool,customPanel:d.a.string.isRequired}),s=o))||s)||s}}]);
//# sourceMappingURL=getting_started.js.map