beancount-gs/public/static/js/main.f50e7271.chunk.js

1 line
8.8 KiB
JavaScript
Raw Normal View History

2024-03-10 14:44:29 +00:00
(this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[]).push([[5],{123:function(e,t,n){},126:function(e,t,n){},129:function(e,t,n){},134:function(e,t,n){},139:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),o=n(28),c=n.n(o),i=(n(123),n(14)),s=n(15),l=n(19),h=n(20),u=n(21),d=n(114),b=n.n(d),j=n(87),g=n.n(j),m=(n(125),n(34)),f=(n(126),n(68)),p="\u6211\u7684\u8d26\u672c",O="https://github.com/BaoXuebin/beancount-gs",x="https://www.yuque.com/chuyi-ble7p/beancount-gs",v="https://www.yuque.com/chuyi-ble7p/beancount-gs/og9g7c4lnchon6eu",w="https://github.com/BaoXuebin/beancount-gs/issues",y="https://github.com/BaoXuebin/beancount-gs/blob/main/License",k=n(83),M=(n(129),n(142)),N=n(141),S=n(5),I=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(e=t.call.apply(t,[this].concat(a))).state={version:"",isModalVisible:!1,error:[]},e.handleOut=function(){localStorage.clear(),e.setState({error:[]}),window.location.href="/web/#/ledger"},e.openErrorModal=function(){e.setState({isModalVisible:!0})},e.closeErrorModal=function(){e.setState({isModalVisible:!1})},e}return Object(s.a)(n,[{key:"componentDidMount",value:function(){var e=this;Object(k.c)("/api/version").then((function(t){localStorage.setItem("version",t),e.setState({version:t})})),Object(k.c)("/api/auth/ledger/check").then((function(t){e.setState({error:t||[]})}))}},{key:"render",value:function(){var e=this.context.theme,t=window.localStorage.getItem("ledgerTitle")||p;return Object(S.jsx)("div",{className:"".concat(e,"-theme page-wrapper"),children:Object(S.jsxs)("div",{className:"wrapper",children:[Object(S.jsx)("header",{children:Object(S.jsx)("nav",{className:"navbar",children:Object(S.jsxs)("div",{className:"container",children:[Object(S.jsx)("div",{className:"navbar-header header-logo",to:"/",children:Object(S.jsx)(m.b,{to:"/",children:t})}),Object(S.jsxs)("div",{className:"menu navbar-right",children:[this.state.error.length>0&&Object(S.jsx)("a",{children:Object(S.jsx)(M.a,{style:{color:"red"},onClick:this.openErrorModal})}),Object(S.jsx)(m.b,{to:"/account",children:"\u8d26\u6237"}),Object(S.jsx)(m.b,{to:"/stats",children:"\u7edf\u8ba1"}),Object(S.jsx)(m.b,{to:"/events",children:"\u4e8b\u4ef6"}),Object(S.jsx)(m.b,{to:"/setting",children:"\u8bbe\u7f6e"}),Object(S.jsx)("a",{href:O,children:Object(S.jsx)("img",{src:"https://img.shields.io/github/stars/BaoXuebin/beancount-gs?style=social"})})]})]})})}),Object(S.jsx)("div",{className:"main",children:Object(S.jsx)("div",{className:"main-wrap",children:this.props.children})}),Object(S.jsx)("footer",{className:"footer",children:Object(S.jsxs)("div",{className:"copyright",children:["\xa9 ",(new Date).getFullYear(),"\xa0\xa0",Object(S.jsx)("a",{href:"https://github.com/BaoXuebin/beancount-gs/releases/tag/".concat(this.state.version),target:"_blank",children:this.state.version}),"\xa0\xa0",Object(S.jsx)("a",{href:y,target:"_blank",children:"MIT"}),"\xa0\xa0",Object(S.jsx)("a",{href:x,target:"_blank",children:"\u4f7f\u7528\u6587\u6863"}),"\xa0\xa0",Object(S.jsx)("a",{href:v,target:"_blank",children:"\u66f4\u65b0\u65e5\u5fd7"}),"\xa0\xa0",Object(S.jsx)("a",{href:w,target:"_blank",children:"\u53cd\u9988BUG"}),"\xa0\xa0",Object(S.jsx)("a",{onClick:this.handleOut,children:"\u9000\u51fa"})]})}),Object(S.jsx)(N.a,{width:860,open:this.state.isModalVisible,onOk:this.closeErrorModal,onCancel:this.closeErrorModal,children:Object(S.jsx)("pre",{children:this.state.error.map((function(e){return Object(S.jsx)("p",{children:e},e)}))})})]})})}}]),n}(r.Component);I.contextType=f.a;var P=I,E=n(26),Y=n.n(E),B=n(13),T=n(25),C=Y()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(4),n.e(17)]).then(n.bind(null,441))},loading:T.a}),_=Y()({loader:function(){return Promise.all([n.e(0),n.e(2),n.e(1),n.e(3),n.e(9)]).then(n.bind(null,437))},loading:T.a}),X=Y()({loader:function(){return Promise.all([n.e(0),n.e(2),n.e(1),n.e(3),n.e(11)]).then(n.bind(null,438))},loading:T.a}),A=Y()({loader:function(){return n.e