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

2 lines
6.9 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{663:function(t,e,i){"use strict";i.r(e),i.d(e,"default",function(){return N});var a,s,n,o,l=i(1),r=i(6),c=i(2),g=(i(3),i(639)),b=i(916),f=i(917),m=i(7),u=i(20),d=i(44),p=i(5),h=i.n(p),_=i(26),O=i.n(_),j=i(24),v=i(30),M=i(14),k=i(4),w=i(57),q=i(29),x=i(138),y=Object(m.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(t,e){return 0===t?void 0:e&&e<=t?e+"+":t},N=Object(u.connect)(function(){var e=Object(w.a)([function(t){return t.get("lists")}],function(t){return t?t.toList().filter(function(t){return!!t}).sort(function(t,e){return t.get("title").localeCompare(e.get("title"))}):t});return function(t){return{lists:e(t),myAccount:t.getIn(["accounts",v.l]),columns:t.getIn(["settings","columns"]),unreadFollowRequests:t.getIn(["user_lists","follow_requests","items"],Object(k.List)()).size,unreadNotifications:t.getIn(["notifications","unread"])}}},function(t){return{fetchFollowRequests:function(){return t(Object(M.H)())},fetchLists:function(){return t(Object(q.I)())},openSettings:function(){return t(Object(d.d)("SETTINGS",{}))}}})(s=Object(m.g)((o=n=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var i=e.prototype;return i.componentWillMount=function(){this.props.fetchLists()},i.componentDidMount=function(){var t=this.props,e=t.myAccount,i=t.fetchFollowRequests;e.get("locked")&&i()},i.render=function(){var t=this.props,e=t.intl,i=t.myAccount,a=t.columns,s=t.multiColumn,n=t.unreadFollowRequests,o=t.unreadNotifications,r=t.lists,c=t.openSettings,u=[],d=[];return s&&(a.find(function(t){return"HOME"===t.get("id")})||u.push(Object(l.a)(b.a,{icon:"home",text:e.formatMessage(y.home_timeline),to:"/timelines/home"},"0")),a.find(function(t){return"NOTIFICATIONS"===t.get("id")})||u.push(Object(l.a)(b.a,{icon:"bell",text:e.formatMessage(y.notifications),badge:I(o),to:"/notifications"},"1")),a.find(function(t){return"COMMUNITY"===t.get("id")})||u.push(Object(l.a)(b.a,{icon:"users",text:e.formatMessage(y.community_timeline),to:"/timelines/public/local"},"2")),a.find(function(t){return"PUBLIC"===t.get("id")})||u.push(Object(l.a)(b.a,{icon:"globe",text:e.formatMessage(y.public_timeline),to:"/timelines/public"},"3"))),s&&a.find(function(t){return"DIRECT"===t.get("id")})||u.push(Object(l.a)(b.a,{icon:"envelope",text:e.formatMessage(y.direct),to:"/timelines/direct"},"4")),s&&a.find(function(t){return"BOOKMARKS"===t.get("id")})||u.push(Object(l.a)(b.a,{icon:"bookmark",text:e.formatMessage(y.bookmarks),to:"/bookmarks"},"5")),i.get("locked")&&u.push(Object(l.a)(b.a,{icon:"users",text:e.formatMessage(y.follow_requests),badge:I(n,40),to:"/follow_requests"},"6")),u.push(Object(l.a)(b.a,{icon:"ellipsis-h",text:e.formatMessage(y.misc),to:"/getting-started-misc"},"7")),d=d.concat([Object(l.a)("div",{},"8",Object(l.a)(b.a,{icon:"bars",text:e.formatMessage(y.lists),to:"/lists"},"9"),r.map(function(t){return Object(l.a)(b.a,{to:"/timelines/list/"+t.get("id"),icon:"list-ul",text:t.get("title")},(9+Number(t.get("id"))).toString())}))]),Object(l.a)(g.a,{name:"getting-started",icon:"asterisk",heading:e.formatMessage(y.heading),label:e.formatMessage(y.menu),hideHeadingOnMobile:!0},void 0,Object(l.a)("div",{className:"scrollable optionally-scrollable"},void 0,Object(l.a)("div",{className:"getting-started__wrapper"},void 0,Object(l.a)(f.a,{text:e.formatMessage(y.navigation_subheading)}),u,Object(l.a)(f.a,{text:e.formatMessage(y.lists_subheading)}),d,Object(l.a)(f.a,{text:e.formatMessage(y.settings_subheading)}),void 0!==x.b&&Object(l.a)(b.a,{icon:"cog",text:e.formatMessage(y.preferences),href:x.b}),Object(l.a)(b.a,{icon:"cogs",text:e.formatMessage(y.settings),onClick:c}),Object(l.a)(b.a,{icon:"sign-out",text:e.formatMessage(y.sign_out),href:x.d,method:"delete"})),Object(l.a)("div",{className:"getting-started__footer"},void 0,Object(l.a)("ul",{},void 0,v.h&&Object(l.a)("li",{},void 0,Object(l.a)("a",{href:"/invites",target:"_blank"},void 0,Object(l.a)(m.b,{id:"getting_started.invite",defaultMessage:"Invite people"}))," · "),Object(l.a)("li",{},void 0,Object(l.a)("a",{href:"/about/more",target:"_blank"},void 0,Object(l.a)(m.b,{id:"navigation_bar.info",defaultMessage:"About this instance"}))," · "),Object(l.a)("li",{},void 0,Object(l.a)("a",{href:"https://joinmastodon.org/apps",target:"_blank"},void 0,Object(l.a)(m.b,{id:"navigation_bar.apps",defaultMessage:"Mobile apps"}))," · "),Object(l.a)("li",{},void 0,Object(l.a)("a",{href:"/terms",target:"_blank"},void 0,Object(l.a)(m.b,{id:"getting_started.terms",defaultMessage:"Terms of service"}))," · "),Object(l.a)("li",{},void 0,Object(l.a)("a",{href:"https://docs.joinmastodon.org",target:"_blank"},void 0,Object(l.a)(m.b,{id:"getting_started.documentation",defaultMessage:"Documentation"})))),Object(l.a)("p",{},void 0,Object(l.a)(m.b,{id:"getting_started.open_source_notice",defaultMessage:"Glitchsoc is open source software, a friendly fork of {Mastodon}. You can contribute or report issues on GitHub at {github}.",values:{github:Object(l.a)("span",{},void 0,Object(l.a)("a",{href:"https://github.com/glitch-soc/mastodon",rel:"noopener",target:"_blank"},void 0,"glitch-soc/mastodon")," (v",v.p,")"),Mastodon:Object(l.a)("a",{href:"https://github.com/tootsuite/mastodon",rel:"noopener",target:"_blank"},void 0,"Mastodon")}})))))},e}(j.a),Object(c.a)(n,"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}),s=o))||s)||s}}]);
//# sourceMappingURL=getting_started.js.map