From d957cabe0bb0204d9de9c36d3442b8511b2dff2e Mon Sep 17 00:00:00 2001 From: vapao Date: Tue, 29 Sep 2020 10:37:33 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7=E9=97=AE=E9=A2=98=E5=8F=8A=E8=87=AA=E5=8A=A8=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/account/management/commands/update.py | 8 +++++--- spug_web/src/components/Action.js | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/spug_api/apps/account/management/commands/update.py b/spug_api/apps/account/management/commands/update.py index 17934d90..79af418b 100644 --- a/spug_api/apps/account/management/commands/update.py +++ b/spug_api/apps/account/management/commands/update.py @@ -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 diff --git a/spug_web/src/components/Action.js b/spug_web/src/components/Action.js index 43c4095e..0c7c432c 100644 --- a/spug_web/src/components/Action.js +++ b/spug_web/src/components/Action.js @@ -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) { @@ -14,11 +14,11 @@ function canVisible(auth) { class Action extends React.Component { static Link(props) { - return + return } static Button(props) { - return