Skip to content

Commit

Permalink
F 修复兼容性问题及自动更新程序
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed Sep 29, 2020
1 parent 325a9a2 commit d957cab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions spug_api/apps/account/management/commands/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ def handle(self, *args, **options):
if not version:
return self.stderr.write(self.style.ERROR('获取新版本失败,排除网络问题后请附带输出内容至官方论坛反馈'))
if version == settings.SPUG_VERSION:
return self.stdout.write(self.style.SUCCESS('当前已是最新版本'))
self.stdout.write(f'{version} 更新日志:\r\n' + res.get('body', ''))
answer = input(f'发现新版本 {version} 是否更新[y|n]?')
self.stdout.write(self.style.SUCCESS(''))
answer = input(f'当前已是最新版本,是否要进行修复性更新[y|n]?')
else:
self.stdout.write(f'{version} 更新日志:\r\n' + res.get('body', ''))
answer = input(f'发现新版本 {version} 是否更新[y|n]?')
if answer.lower() != 'y':
return

Expand Down
8 changes: 4 additions & 4 deletions spug_web/src/components/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Released under the AGPL-3.0 License.
*/
import React from 'react';
import { Link } from 'react-router-dom';
import { Divider, Button } from 'antd';
import { Link as ALink } from 'react-router-dom';
import { Divider, Button as AButton } from 'antd';
import { hasPermission } from 'libs';

function canVisible(auth) {
Expand All @@ -14,11 +14,11 @@ function canVisible(auth) {

class Action extends React.Component {
static Link(props) {
return <Link {...props}/>
return <ALink {...props}/>
}

static Button(props) {
return <Button type="link" {...props} style={{padding: 0}}/>
return <AButton type="link" {...props} style={{padding: 0}}/>
}

_handle = (data, el) => {
Expand Down

0 comments on commit d957cab

Please sign in to comment.