beancount-gs/public/static/js/main.6636e710.chunk.js

1 line
9.1 KiB
JavaScript
Raw Normal View History

2024-10-04 13:39:35 +00:00
(this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[]).push([[5],{142:function(e,t,n){},145:function(e,t,n){},170:function(e,t,n){},176:function(e,t,n){},181:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(28),s=n.n(a),i=(n(142),n(20)),c=n(129),l=n.n(c),h=n(95),d=n.n(h),b=(n(144),n(38)),u=(n(145),n(73)),j="\u6211\u7684\u8d26\u672c",m="https://github.com/BaoXuebin/beancount-gs",g="https://www.yuque.com/chuyi-ble7p/beancount-gs",p="https://www.yuque.com/chuyi-ble7p/beancount-gs/og9g7c4lnchon6eu",x="https://github.com/BaoXuebin/beancount-gs/issues",O="https://github.com/BaoXuebin/beancount-gs/blob/main/License",f=n(91),v=n(184),w=n(183),y=(n(170),n(5));class S extends r.Component{constructor(){super(...arguments),this.state={version:"",isModalVisible:!1,error:[]},this.handleOut=()=>{localStorage.clear(),this.setState({error:[]}),window.location.href="/web/#/ledger"},this.openErrorModal=()=>{this.setState({isModalVisible:!0})},this.closeErrorModal=()=>{this.setState({isModalVisible:!1})}}componentDidMount(){Object(f.d)("/api/version").then((e=>{localStorage.setItem("version",e),this.setState({version:e})})),Object(f.d)("/api/auth/ledger/check").then((e=>{this.setState({error:e||[]})}))}render(){let{theme:e}=this.context;const t=window.localStorage.getItem("ledgerTitle")||j;return Object(y.jsx)("div",{className:`${e}-theme page-wrapper`,children:Object(y.jsxs)("div",{className:"wrapper",children:[Object(y.jsx)("header",{children:Object(y.jsx)("nav",{className:"navbar",children:Object(y.jsxs)("div",{className:"container",children:[Object(y.jsx)(b.b,{to:"/",children:Object(y.jsx)("div",{className:"navbar-header header-logo",children:t})}),Object(y.jsxs)("div",{className:"menu navbar-right",children:[this.state.error.length>0&&Object(y.jsx)("a",{children:Object(y.jsx)(v.a,{style:{color:"red"},onClick:this.openErrorModal})}),Object(y.jsx)(b.b,{to:"/account",children:"\u8d26\u6237"}),Object(y.jsx)(b.b,{to:"/stats",children:"\u7edf\u8ba1"}),Object(y.jsx)(b.b,{to:"/events",children:"\u4e8b\u4ef6"}),Object(y.jsx)(b.b,{to:"/setting",children:"\u8bbe\u7f6e"}),Object(y.jsx)("a",{href:m,children:Object(y.jsx)("img",{src:"https://img.shields.io/github/stars/BaoXuebin/beancount-gs?style=social"})})]})]})})}),Object(y.jsx)("div",{className:"main",children:Object(y.jsx)("div",{className:"main-wrap",children:this.props.children})}),Object(y.jsx)("footer",{className:"footer",children:Object(y.jsxs)("div",{className:"copyright",children:["\xa9 ",(new Date).getFullYear(),"\xa0\xa0",Object(y.jsx)("a",{href:`https://github.com/BaoXuebin/beancount-gs/releases/tag/${this.state.version}`,target:"_blank",children:this.state.version}),"\xa0\xa0",Object(y.jsx)("a",{href:O,target:"_blank",children:"MIT"}),"\xa0\xa0",Object(y.jsx)("a",{href:g,target:"_blank",children:"\u4f7f\u7528\u6587\u6863"}),"\xa0\xa0",Object(y.jsx)("a",{href:p,target:"_blank",children:"\u66f4\u65b0\u65e5\u5fd7"}),"\xa0\xa0",Object(y.jsx)("a",{href:x,target:"_blank",children:"\u53cd\u9988BUG"}),"\xa0\xa0",Object(y.jsx)("a",{onClick:this.handleOut,children:"\u9000\u51fa"})]})}),Object(y.jsx)(w.a,{width:860,open:this.state.isModalVisible,onOk:this.closeErrorModal,onCancel:this.closeErrorModal,children:Object(y.jsx)("pre",{children:this.state.error.map((e=>Object(y.jsx)("p",{children:e},e)))})})]})})}}S.contextType=u.a;var I=S,M=n(31),N=n.n(M),k=n(15),Y=n(30);const D=N()({loader:()=>Promise.all([n.e(0),n.e(1),n.e(3),n.e(4),n.e(17)]).then(n.bind(null,463)),loading:Y.a}),E=N()({loader:()=>Promise.all([n.e(0),n.e(2),n.e(1),n.e(3),n.e(9)]).then(n.bind(null,459)),loading:Y.a}),P=N()({loader:()=>Promise.all([n.e(0),n.e(2),n.e(1),n.e(3),n.e(10)]).then(n.bind(null,460)),loading:Y.a}),B=N()({loader:()=>n.e(18).then(n.bind(null,455)),loading:Y.a}),F=N()({loader:()=>Promise.all([n.e(0),n.e(2),n.e(3),n.e(11),n.e(14)]).then(n.bind(null,464)),loading:Y.a}),T=N()({loader:()=>Promise.all([n.e(0),n.e(2),n.e(7),n.e(20)]).then(n.bind(null,456)),loading:Y.a}),$=N()({loader:()=>Promise.all([n.e(0),n.e(1),n.e(4),n.e(13)]).then(n.bind(null,457)),loading:Y.a}),C=N()({loader:()=>P