fix(branch-dropdown): show "No branch" label when folder is not a git repository

This commit is contained in:
xintaofei
2026-04-23 15:12:46 +08:00
parent ec115e5a12
commit ba7f3c598b
11 changed files with 11 additions and 11 deletions

View File

@@ -571,7 +571,7 @@ export function BranchDropdown() {
<span className="max-w-[320px] truncate"> <span className="max-w-[320px] truncate">
{folderName} {folderName}
<span className="mx-1.5 inline-block h-3 w-px bg-foreground/20 align-middle" /> <span className="mx-1.5 inline-block h-3 w-px bg-foreground/20 align-middle" />
<span className="text-primary">{t("versionControl")}</span> <span className="text-primary">{t("noBranch")}</span>
</span> </span>
<ChevronDown className="h-3 w-3 shrink-0 opacity-50" /> <ChevronDown className="h-3 w-3 shrink-0 opacity-50" />
</button> </button>

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "التبديل إلى هذا الفرع", "switchToBranch": "التبديل إلى هذا الفرع",
"mergeBranchIntoCurrent": "دمج {branchName} في {currentBranch}", "mergeBranchIntoCurrent": "دمج {branchName} في {currentBranch}",
"rebaseCurrentToBranch": "Rebase لـ {currentBranch} على {branchName}", "rebaseCurrentToBranch": "Rebase لـ {currentBranch} على {branchName}",
"versionControl": "التحكم في الإصدارات", "noBranch": "بدون فرع",
"initGitRepo": "تهيئة مستودع Git", "initGitRepo": "تهيئة مستودع Git",
"pullCode": "سحب الكود", "pullCode": "سحب الكود",
"fetchRemoteBranches": "جلب الفروع البعيدة", "fetchRemoteBranches": "جلب الفروع البعيدة",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "Zu diesem Branch wechseln", "switchToBranch": "Zu diesem Branch wechseln",
"mergeBranchIntoCurrent": "{branchName} in {currentBranch} mergen", "mergeBranchIntoCurrent": "{branchName} in {currentBranch} mergen",
"rebaseCurrentToBranch": "{currentBranch} auf {branchName} rebasen", "rebaseCurrentToBranch": "{currentBranch} auf {branchName} rebasen",
"versionControl": "Versionskontrolle", "noBranch": "Kein Branch",
"initGitRepo": "Git-Repository initialisieren", "initGitRepo": "Git-Repository initialisieren",
"pullCode": "Code pullen", "pullCode": "Code pullen",
"fetchRemoteBranches": "Remote-Branches fetchen", "fetchRemoteBranches": "Remote-Branches fetchen",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "Switch to this branch", "switchToBranch": "Switch to this branch",
"mergeBranchIntoCurrent": "Merge {branchName} into {currentBranch}", "mergeBranchIntoCurrent": "Merge {branchName} into {currentBranch}",
"rebaseCurrentToBranch": "Rebase {currentBranch} onto {branchName}", "rebaseCurrentToBranch": "Rebase {currentBranch} onto {branchName}",
"versionControl": "Version Control", "noBranch": "No branch",
"initGitRepo": "Initialize Git repository", "initGitRepo": "Initialize Git repository",
"pullCode": "Pull code", "pullCode": "Pull code",
"fetchRemoteBranches": "Fetch remote branches", "fetchRemoteBranches": "Fetch remote branches",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "Cambiar a esta rama", "switchToBranch": "Cambiar a esta rama",
"mergeBranchIntoCurrent": "Fusionar {branchName} en {currentBranch}", "mergeBranchIntoCurrent": "Fusionar {branchName} en {currentBranch}",
"rebaseCurrentToBranch": "Rebase de {currentBranch} sobre {branchName}", "rebaseCurrentToBranch": "Rebase de {currentBranch} sobre {branchName}",
"versionControl": "Control de versiones", "noBranch": "Sin rama",
"initGitRepo": "Inicializar repositorio Git", "initGitRepo": "Inicializar repositorio Git",
"pullCode": "Hacer pull del código", "pullCode": "Hacer pull del código",
"fetchRemoteBranches": "Obtener ramas remotas", "fetchRemoteBranches": "Obtener ramas remotas",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "Basculer vers cette branche", "switchToBranch": "Basculer vers cette branche",
"mergeBranchIntoCurrent": "Fusionner {branchName} dans {currentBranch}", "mergeBranchIntoCurrent": "Fusionner {branchName} dans {currentBranch}",
"rebaseCurrentToBranch": "Rebaser {currentBranch} sur {branchName}", "rebaseCurrentToBranch": "Rebaser {currentBranch} sur {branchName}",
"versionControl": "Contrôle de version", "noBranch": "Aucune branche",
"initGitRepo": "Initialiser le dépôt Git", "initGitRepo": "Initialiser le dépôt Git",
"pullCode": "Pull du code", "pullCode": "Pull du code",
"fetchRemoteBranches": "Récupérer les branches distantes", "fetchRemoteBranches": "Récupérer les branches distantes",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "このブランチに切り替え", "switchToBranch": "このブランチに切り替え",
"mergeBranchIntoCurrent": "{branchName} を {currentBranch} にマージ", "mergeBranchIntoCurrent": "{branchName} を {currentBranch} にマージ",
"rebaseCurrentToBranch": "{currentBranch} を {branchName} にリベース", "rebaseCurrentToBranch": "{currentBranch} を {branchName} にリベース",
"versionControl": "バージョン管理", "noBranch": "ブランチなし",
"initGitRepo": "Git リポジトリを初期化", "initGitRepo": "Git リポジトリを初期化",
"pullCode": "コードをプル", "pullCode": "コードをプル",
"fetchRemoteBranches": "リモートブランチをフェッチ", "fetchRemoteBranches": "リモートブランチをフェッチ",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "이 브랜치로 전환", "switchToBranch": "이 브랜치로 전환",
"mergeBranchIntoCurrent": "{branchName}을(를) {currentBranch}에 병합", "mergeBranchIntoCurrent": "{branchName}을(를) {currentBranch}에 병합",
"rebaseCurrentToBranch": "{currentBranch}를 {branchName}로 리베이스", "rebaseCurrentToBranch": "{currentBranch}를 {branchName}로 리베이스",
"versionControl": "버전 관리", "noBranch": "브랜치 없음",
"initGitRepo": "Git 저장소 초기화", "initGitRepo": "Git 저장소 초기화",
"pullCode": "코드 pull", "pullCode": "코드 pull",
"fetchRemoteBranches": "원격 브랜치 가져오기", "fetchRemoteBranches": "원격 브랜치 가져오기",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "Mudar para esta branch", "switchToBranch": "Mudar para esta branch",
"mergeBranchIntoCurrent": "Mesclar {branchName} em {currentBranch}", "mergeBranchIntoCurrent": "Mesclar {branchName} em {currentBranch}",
"rebaseCurrentToBranch": "Rebase de {currentBranch} sobre {branchName}", "rebaseCurrentToBranch": "Rebase de {currentBranch} sobre {branchName}",
"versionControl": "Controle de versão", "noBranch": "Sem ramo",
"initGitRepo": "Inicializar repositório Git", "initGitRepo": "Inicializar repositório Git",
"pullCode": "Fazer pull do código", "pullCode": "Fazer pull do código",
"fetchRemoteBranches": "Buscar branches remotas", "fetchRemoteBranches": "Buscar branches remotas",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "切换到此分支", "switchToBranch": "切换到此分支",
"mergeBranchIntoCurrent": "将 {branchName} 合并到 {currentBranch}", "mergeBranchIntoCurrent": "将 {branchName} 合并到 {currentBranch}",
"rebaseCurrentToBranch": "将 {currentBranch} 变基到 {branchName}", "rebaseCurrentToBranch": "将 {currentBranch} 变基到 {branchName}",
"versionControl": "版本控制", "noBranch": "无分支",
"initGitRepo": "初始化 Git 仓库", "initGitRepo": "初始化 Git 仓库",
"pullCode": "更新代码", "pullCode": "更新代码",
"fetchRemoteBranches": "提取远程分支", "fetchRemoteBranches": "提取远程分支",

View File

@@ -1068,7 +1068,7 @@
"switchToBranch": "切換到此分支", "switchToBranch": "切換到此分支",
"mergeBranchIntoCurrent": "將 {branchName} 合併到 {currentBranch}", "mergeBranchIntoCurrent": "將 {branchName} 合併到 {currentBranch}",
"rebaseCurrentToBranch": "將 {currentBranch} 變基到 {branchName}", "rebaseCurrentToBranch": "將 {currentBranch} 變基到 {branchName}",
"versionControl": "版本控制", "noBranch": "無分支",
"initGitRepo": "初始化 Git 倉庫", "initGitRepo": "初始化 Git 倉庫",
"pullCode": "更新程式碼", "pullCode": "更新程式碼",
"fetchRemoteBranches": "提取遠端分支", "fetchRemoteBranches": "提取遠端分支",