beancount-gs/public/static/js/main.65a52445.chunk.js

1 line
8.2 KiB
JavaScript
Raw Normal View History

2023-07-02 15:32:52 +00:00
(this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[]).push([[5],{122:function(e,t,n){},125:function(e,t,n){},128:function(e,t,n){},133:function(e,t,n){},138:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(26),c=n.n(a),i=(n(122),n(14)),s=n(15),l=n(19),h=n(20),u=n(21),d=n(113),b=n.n(d),j=n(86),g=n.n(j),m=(n(124),n(39)),f=(n(125),n(67)),p="\u6211\u7684\u8d26\u672c",O="https://github.com/BaoXuebin/beancount-gs",x="https://www.yuque.com/chuyi-ble7p/beancount-gs",v="https://github.com/BaoXuebin/beancount-gs/issues",w="https://github.com/BaoXuebin/beancount-gs/blob/main/License",y=n(82),k=(n(128),n(141)),M=n(140),N=n(6),S=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,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).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(y.b)("/api/version").then((function(t){localStorage.setItem("version",t),e.setState({version:t})})),Object(y.b)("/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(N.jsx)("div",{className:"".concat(e,"-theme page-wrapper"),children:Object(N.jsxs)("div",{className:"wrapper",children:[Object(N.jsx)("header",{children:Object(N.jsx)("nav",{className:"navbar",children:Object(N.jsxs)("div",{className:"container",children:[Object(N.jsx)("div",{className:"navbar-header header-logo",to:"/",children:Object(N.jsx)(m.b,{to:"/",children:t})}),Object(N.jsxs)("div",{className:"menu navbar-right",children:[this.state.error.length>0&&Object(N.jsx)("a",{children:Object(N.jsx)(k.a,{style:{color:"red"},onClick:this.openErrorModal})}),Object(N.jsx)(m.b,{to:"/account",children:"\u8d26\u6237"}),Object(N.jsx)(m.b,{to:"/stats",children:"\u7edf\u8ba1"}),Object(N.jsx)("a",{onClick:this.handleOut,children:"\u9000\u51fa"}),Object(N.jsx)("a",{href:O,children:Object(N.jsx)("img",{src:"https://img.shields.io/github/stars/BaoXuebin/beancount-gs?style=social"})})]})]})})}),Object(N.jsx)("div",{className:"main",children:Object(N.jsx)("div",{className:"main-wrap",children:this.props.children})}),Object(N.jsx)("footer",{className:"footer",children:Object(N.jsxs)("div",{className:"copyright",children:["\xa9 ",(new Date).getFullYear(),"\xa0\xa0",Object(N.jsx)("a",{href:"https://github.com/BaoXuebin/beancount-gs/releases/tag/".concat(this.state.version),target:"_blank",children:this.state.version}),"\xa0\xa0",Object(N.jsx)("a",{href:w,target:"_blank",children:"MIT"}),"\xa0\xa0",Object(N.jsx)("a",{href:x,target:"_blank",children:"\u4f7f\u7528\u6587\u6863"}),"\xa0\xa0",Object(N.jsx)("a",{href:v,target:"_blank",children:"\u53cd\u9988BUG"}),"\xa0\xa0"]})}),Object(N.jsx)(M.a,{width:860,open:this.state.isModalVisible,onOk:this.closeErrorModal,onCancel:this.closeErrorModal,children:Object(N.jsx)("pre",{children:this.state.error.map((function(e){return Object(N.jsx)("p",{children:e})}))})})]})})}}]),n}(r.Component);S.contextType=f.a;var I=S,P=n(28),Y=n.n(P),B=n(12),E=(n(133),function(){return Object(N.jsx)("div",{style:{width:"100%"},className:"lds-rolling",children:Object(N.jsx)("div",{})})}),T=Y()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(4),n.e(15)]).then(n.bind(null,429))},loading:E}),C=Y()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(9)]).then(n.bind(null,426))},loading:E}),X=Y()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(11)]).then(n.bind(null,427))},loading:E}),_=Y()({loader:function(){return n.e(16).then(n.bind(null,422))},loading:E}),A=Y()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(10)]).then(n.bind(null,430))},loading:E}),D