/** * Copyright (c) OpenSpug Organization. https://github.com/openspug/spug * Copyright (c) * Released under the AGPL-3.0 License. */ import React from 'react'; import styles from './index.module.css'; import { Descriptions, Spin, Icon, notification } from "antd"; import { observer } from 'mobx-react' import { http, VERSION } from 'libs'; @observer class About extends React.Component { constructor(props) { super(props); this.state = { fetching: true, info: {} } } componentDidMount() { http.get('/api/setting/about/') .then(res => this.setState({info: res})) .finally(() => this.setState({fetching: false})) http.get(`https://api.spug.cc/apis/release/latest/?version=${VERSION}`) .then(res => { if (res.has_new) { notification.open({ key: 'new_version', duration: 0, top: 88, message: `发现新版本 ${res.version}`, icon: , btn: 如何升级?, description:
{res.content}
}) } }) } render() { const {info, fetching} = this.state; return (
关于
{info['system_version']} {info['python_version']} {info['django_version']} {info['spug_version']} {VERSION} https://spug.cc https://spug.cc/docs/change-log/
) } } export default About