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

2 lines
9.1 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{231:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return r}));var i=n(12),a="TRENDS_FETCH_REQUEST",s="TRENDS_FETCH_SUCCESS",o="TRENDS_FETCH_FAIL",r=function(){return function(e,t){e(c()),Object(i.a)(t).get("/api/v1/trends").then((function(t){var n=t.data;return e(u(n))})).catch((function(t){return e(l(t))}))}},c=function(){return{type:a,skipLoading:!0}},u=function(e){return{type:s,trends:e,skipLoading:!0}},l=function(e){return{type:o,error:e,skipLoading:!0,skipAlert:!0}}},785:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i,a=n(0),s=(n(9),n(6),n(8)),o=n(3),r=n.n(o),c=n(7);var u=Object(c.g)(i=function(e){Object(s.a)(n,e);var t;t=n;function n(){return e.apply(this,arguments)||this}return n.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")}})))},n}(r.a.PureComponent))||i},792:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return P}));var i,a,s,o,r=n(0),c=(n(9),n(6),n(8)),u=n(1),l=(n(3),n(756)),d=n(1103),f=n(1104),g=n(7),b=n(15),m=n(45),p=n(5),h=n.n(p),_=n(16),O=n.n(_),v=n(21),j=n(18),M=n(24),y=n(4),k=n(57),w=n(30),T=n(150),q=n(768),I=n(785),R=n(203),x=n(864);var C=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},P=Object(b.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",j.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(m.d)("SETTINGS",{}))},fetchPanel:function(){return e(Object(R.c)())},fetchPleromaConfig:function(){return e(Object(R.d)())}}}))(a=Object(g.g)((o=s=function(e){Object(c.a)(n,e);var t;t=n;function n(){return e.apply(this,arguments)||this}var i=n.prototype;return i.componentWillMount=function(){this.props.fetchLists()},i.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())},i.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,b=e.customPanel,m=[],p=[];a&&(i.find((function(e){return"HOME"===e.get("id")}))||m.push(Object(r.a)(d.a,{icon:"home",text:t.formatMessage(C.home_timeline),to:"/timelines/home"},"0")),i.find((function(e){return"NOTIFICATIONS"===e.get("id")}))||m.push(Object(r.a)(d.a,{icon:"bell",text:t.formatMessage(C.notifications),badge:N(o),to:"/notifications"},"1")),i.find((function(e){return"COMMUNITY"===e.get("id")}))||m.push(Object(r.a)(d.a,{icon:"users",text:t.formatMessage(C.community_timeline),to:"/timelines/public/local"},"2")),i.find((function(e){return"PUBLIC"===e.get("id")}))||m.push(Object(r.a)(d.a,{icon:"globe",text:t.formatMessage(C.public_timeline),to:"/timelines/public"},"3"))),a&&i.find((function(e){return"DIRECT"===e.get("id")}))||m.push(Object(r.a)(d.a,{icon:"envelope",text:t.formatMessage(C.direct),to:"/timelines/direct"},"4")),a&&i.find((function(e){return"BOOKMARKS"===e.get("id")}))||m.push(Object(r.a)(d.a,{icon:"bookmark",text:t.formatMessage(C.bookmarks),to:"/bookmarks"},"5")),(n.get("locked")||s>0)&&m.push(Object(r.a)(d.a,{icon:"user-plus",text:t.formatMessage(C.follow_requests),badge:N(s,40),to:"/follow_requests"},"6")),j.o&&m.push(Object(r.a)(d.a,{icon:"address-book",text:t.formatMessage(C.profile_directory),to:"/directory"},"7")),m.push(Object(r.a)(d.a,{icon:"ellipsis-h",text:t.formatMessage(C.misc),to:"/getting-started-misc"},"8")),p=p.concat([Object(r.a)("div",{},"9",Object(r.a)(d.a,{icon:"bars",text:t.formatMessage(C.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:b}}):null;return(Object(r.a)(l.a,{bindToDocument:!a,name:"getting-started",icon:"asterisk",heading:t.formatMessage(C.heading),label:t.formatMessage(C.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)(q.a,{account:n}),a&&Object(r.a)(f.a,{text:t.formatMessage(C.navigation_subheading)}),m,Object(r.a)(f.a,{text:t.formatMessage(C.lists_subheading)}),p,Object(r.a)(f.a,{text:t.formatMessage(C.settings_subheading)}),void 0!==T.c&&Object(r.a)(d.a,{icon:"cog",text:t.formatMessage(C.preferences),href:T.c}),Object(r.a)(d.a,{icon:"cogs",text:t.formatMessage(C.settings),onClick:u})),h,Object(r.a)(I.a,{})),a&&j.r&&Object(r.a)(x.a,{})))},n}(v.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},864:function(e,t,n){"use strict";var i=n(15),a=n(231),s=n(0),o=(n(9),n(6),n(8)),r=n(1),c=(n(3),n(21)),u=n(5),l=n.n(u),d=n(16),f=n.n(d),g=n(769),b=n(7);var m=function(e){Object(o.a)(n,e);var t;t=n;function n(){return e.apply(this,arguments)||this}var i=n.prototype;return i.componentDidMount=function(){var e=this;this.props.fetchTrends(),this.refreshInterval=setInterval((function(){return e.props.fetchTrends()}),9e5)},i.componentWillUnmount=function(){this.refreshInterval&&clearInterval(this.refreshInterval)},i.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)(b.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"))})))},n}(c.a);Object(r.a)(m,"defaultProps",{loading:!1}),Object(r.a)(m,"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)())}}}))(m)}}]);
//# sourceMappingURL=getting_started.js.map