加个小提示
This commit is contained in:
@@ -60,6 +60,10 @@ class GitManagerUI:
|
||||
OutputFormatter.error("当前目录不是Git仓库,请先初始化")
|
||||
return
|
||||
|
||||
# 提示:先拉取再提交
|
||||
OutputFormatter.tip("建议先拉取最新代码再提交,减少代码冲突")
|
||||
print(f"{Colors.CYAN}{'-' * 60}{Colors.ENDC}")
|
||||
|
||||
# 检查是否有更改
|
||||
OutputFormatter.status('running', "检查文件更改中...")
|
||||
|
||||
|
||||
@@ -130,6 +130,11 @@ class OutputFormatter:
|
||||
"""打印警告信息"""
|
||||
print(f"{Colors.BRIGHT_YELLOW}[!]{Colors.ENDC} {Colors.YELLOW}{text}{Colors.ENDC}")
|
||||
|
||||
@staticmethod
|
||||
def tip(text: str):
|
||||
"""打印提示信息"""
|
||||
print(f"{Colors.BRIGHT_CYAN}[*]{Colors.ENDC} {Colors.CYAN}{text}{Colors.ENDC}")
|
||||
|
||||
@staticmethod
|
||||
def step(num: int, text: str):
|
||||
"""打印步骤信息"""
|
||||
|
||||
Reference in New Issue
Block a user