fix(ui): Git 面板的两句空状态提示改成现状措辞
服务器镜像现在装 git 了,「服务器镜像未装 git」这句注解已经不成立, 只说「这个环境没有 git 命令」,免得把人往镜像配置上引。 not_repo 统一改成「未找到 git 仓库:当前会话目录及其上级都不是仓库」: 后端这个 reason 也涵盖会话目录不存在、rev-parse 失败,原来只说「当前会话 目录不是 git 仓库」,用户会以为目录选错了,其实是没有仓库可读。
This commit is contained in:
@@ -42,10 +42,10 @@
|
||||
}
|
||||
|
||||
function reasonText(reason) {
|
||||
if (reason === 'no_git') return '这个环境没有 git 命令(服务器镜像未装 git)。';
|
||||
if (reason === 'no_git') return '这个环境没有 git 命令。';
|
||||
if (reason === 'bad_rev') return '提交不存在,可能已被改写或清理。';
|
||||
if (reason === 'timeout') return 'git 执行超时,仓库可能过大。';
|
||||
if (reason === 'not_repo') return '当前会话目录不是 git 仓库。';
|
||||
if (reason === 'not_repo') return '未找到 git 仓库:当前会话目录及其上级都不是仓库。';
|
||||
return '读取失败:' + (reason || '未知错误');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user