akkoma/priv/static/packs/flavours/glitch/async/drawer.js

2 lines
6.5 KiB
JavaScript
Raw Normal View History

2018-09-16 21:17:34 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{704:function(e,t,a){"use strict";a.r(t);var j=a(1),i=a(6),n=a(3),c=a.n(n),r=a(7),s=a(12),h=a.n(s),o=a(44),l=a(87),p=a(653),_=a(948),u=a(386),d=a(204),b=a(95),g=a(138),m=Object(r.f)({community:{id:"navigation_bar.community_timeline",defaultMessage:"Local timeline"},home_timeline:{id:"tabs_bar.home",defaultMessage:"Home"},logout:{id:"navigation_bar.logout",defaultMessage:"Logout"},notifications:{id:"tabs_bar.notifications",defaultMessage:"Notifications"},public:{id:"navigation_bar.public_timeline",defaultMessage:"Federated timeline"},settings:{id:"navigation_bar.app_settings",defaultMessage:"App settings"},start:{id:"getting_started.heading",defaultMessage:"Getting started"}});function M(e){var a=e.columns,t=e.unreadNotifications,i=e.showNotificationsBadge,n=e.intl,s=e.onSettingsClick,o=b.b.bind(null,function(t){return!a||!a.some(function(e){return e.get("id")===t})});return Object(j.a)("nav",{className:"drawer--header"},void 0,Object(j.a)(u.a,{"aria-label":n.formatMessage(m.start),title:n.formatMessage(m.start),to:"/getting-started"},void 0,Object(j.a)(d.a,{icon:"asterisk"})),o("HOME",Object(j.a)(u.a,{"aria-label":n.formatMessage(m.home_timeline),title:n.formatMessage(m.home_timeline),to:"/timelines/home"},void 0,Object(j.a)(d.a,{icon:"home"}))),o("NOTIFICATIONS",Object(j.a)(u.a,{"aria-label":n.formatMessage(m.notifications),title:n.formatMessage(m.notifications),to:"/notifications"},void 0,Object(j.a)("span",{className:"icon-badge-wrapper"},void 0,Object(j.a)(d.a,{icon:"bell"}),i&&0<t&&Object(j.a)("div",{className:"icon-badge"})))),o("COMMUNITY",Object(j.a)(u.a,{"aria-label":n.formatMessage(m.community),title:n.formatMessage(m.community),to:"/timelines/public/local"},void 0,Object(j.a)(d.a,{icon:"users"}))),o("PUBLIC",Object(j.a)(u.a,{"aria-label":n.formatMessage(m.public),title:n.formatMessage(m.public),to:"/timelines/public"},void 0,Object(j.a)(d.a,{icon:"globe"}))),Object(j.a)("a",{"aria-label":n.formatMessage(m.settings),onClick:s,href:"#",title:n.formatMessage(m.settings)},void 0,Object(j.a)(d.a,{icon:"cogs"})),Object(j.a)("a",{"aria-label":n.formatMessage(m.logout),"data-method":"delete",href:g.d,title:n.formatMessage(m.logout)},void 0,Object(j.a)(d.a,{icon:"sign-out"})))}var f=a(32),O=a(45),v=a.n(O),N=a(624),w=a(632),C=a(949),y=a(319),I=function(e){return e<1e3?Object(j.a)(r.c,{value:e}):Object(j.a)(n.Fragment,{},void 0,Object(j.a)(r.c,{value:e/1e3,maximumFractionDigits:1}),"K")},S=function(e){var t=e.hashtag;return Object(j.a)("div",{className:"trends__item"},void 0,Object(j.a)("div",{className:"trends__item__name"},void 0,Object(j.a)(y.a,{href:t.get("url"),to:"/timelines/tag/"+t.get("name")},void 0,"#",Object(j.a)("span",{},void 0,t.get("name"))),Object(j.a)(r.b,{id:"trends.count_by_accounts",defaultMessage:"{count} {rawCount, plural, one {person} other {people}} talking",values:{rawCount:t.getIn(["history",0,"accounts"]),count:Object(j.a)("strong",{},void 0,I(t.getIn(["history",0,"accounts"])))}})),Object(j.a)("div",{className:"trends__item__current"},void 0,I(t.getIn(["history",0,"uses"]))),Object(j.a)("div",{className:"trends__item__sparkline"},void 0,Object(j.a)(C.Sparklines,{width:50,height:28,data:t.get("history")&&t.get("history").reverse().map(function(e){return e.get("uses")}).toArray()},void 0,Object(j.a)(C.SparklinesCurve,{style:{fill:"none"}}))))},k=a(107),T=Object(r.f)({total:{id:"search_results.total",defaultMessage:"{count, number} {count, plural, one {result} other {results}}"}});function z(e){var t=e.results,a=e.visible,i=t?t.get("accounts"):null,n=t?t.get("statuses"):null,s=t?t.get("hashtags"):null,o=[i,n,s].reduce(function(e,t){return t&&t.size?e+t.size:e},0);return Object(j.a)(k.a,{defaultStyle:{x:-100},style:{x:v()(a?0:-100,{stiffness:210,damping:20})}},void 0,function(e){var t=e.x;return Object(j.a)("div",{className:"drawer--results",style:{transform:"translateX("+t+"%)",visibility:-100===t?"hidden":"visible"}},void 0,Object(j.a)("header",{},void 0,c.a.createElement(r.b,Object(f.a)({},T.total,{values:{count:o}}))),i&&i.size?Object(j
//# sourceMappingURL=drawer.js.map