beancount-gs/public/static/js/main.4cc09861.chunk.js

1 line
7.8 KiB
JavaScript
Raw Normal View History

2022-10-11 15:29:16 +00:00
(this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[]).push([[5],{123:function(e,t,n){},126:function(e,t,n){},130:function(e,t,n){},135:function(e,t,n){},140:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(18),c=n.n(a),i=(n(123),n(58)),s=n(59),l=n(61),h=n(60),d=n(16),u=n(114),b=n.n(u),j=n(84),g=n.n(j),m=(n(125),n(35)),p=(n(126),n(64)),O="\u6211\u7684\u8d26\u672c",f="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(80),k=(n(130),n(143)),N=n(142),S=n(4),M=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")||O;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)(k.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)("a",{onClick:this.handleOut,children:"\u9000\u51fa"}),Object(S.jsx)("a",{href:f,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:w,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:"\u53cd\u9988BUG"}),"\xa0\xa0"]})}),Object(S.jsx)(N.a,{width:860,visible: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})}))})})]})})}}]),n}(r.Component);M.contextType=p.a;var I=M,P=n(26),B=n.n(P),E=n(10),T=(n(135),function(){return Object(S.jsx)("div",{style:{width:"100%"},className:"lds-rolling",children:Object(S.jsx)("div",{})})}),C=B()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(4),n.e(14)]).then(n.bind(null,433))},loading:T}),X=B()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(9)]).then(n.bind(null,429))},loading:T}),_=B()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(10)]).then(n.bind(null,431))},loading:T}),A=B()({loader:function(){return n.e(15).then(n.bind(null,425))},loading:T}),V=B()({loader:function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(11)]).then(n.bind(null,434))},loading:T}),J=