refactor(branch-picker): fix popover corner radius, remove local branch delete, move new-branch to top
This commit is contained in:
@@ -11,17 +11,11 @@ import {
|
||||
GitBranch,
|
||||
Loader2,
|
||||
Plus,
|
||||
Trash2,
|
||||
} from "lucide-react"
|
||||
import { useAppWorkspace } from "@/contexts/app-workspace-context"
|
||||
import { useTabContext } from "@/contexts/tab-context"
|
||||
import { useTaskContext } from "@/contexts/task-context"
|
||||
import {
|
||||
gitListAllBranches,
|
||||
gitCheckout,
|
||||
gitNewBranch,
|
||||
gitDeleteBranch,
|
||||
} from "@/lib/api"
|
||||
import { gitListAllBranches, gitCheckout, gitNewBranch } from "@/lib/api"
|
||||
import { isDesktop, openFileDialog } from "@/lib/platform"
|
||||
import type { GitBranchList } from "@/lib/types"
|
||||
import { Button } from "@/components/ui/button"
|
||||
@@ -178,19 +172,6 @@ export const ConversationContextBar = memo(function ConversationContextBar({
|
||||
toast.error(msg)
|
||||
}
|
||||
}}
|
||||
onDeleteBranch={async (branchName) => {
|
||||
const taskId = `delete-branch-${ownFolder.id}-${Date.now()}`
|
||||
addTask(taskId, tBd("tasks.deleteBranch", { branchName }))
|
||||
updateTask(taskId, { status: "running" })
|
||||
try {
|
||||
await gitDeleteBranch(ownFolder.path, branchName, false)
|
||||
updateTask(taskId, { status: "completed" })
|
||||
} catch (err) {
|
||||
const msg = err instanceof Error ? err.message : String(err)
|
||||
updateTask(taskId, { status: "failed", error: msg })
|
||||
toast.error(msg)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</TooltipProvider>
|
||||
@@ -312,7 +293,6 @@ interface BranchPickerProps {
|
||||
currentBranch: string | null
|
||||
onCheckout: (branchName: string) => Promise<void>
|
||||
onNewBranch: (branchName: string, startPoint?: string) => Promise<void>
|
||||
onDeleteBranch: (branchName: string) => Promise<void>
|
||||
}
|
||||
|
||||
const BranchPicker = memo(function BranchPicker({
|
||||
@@ -321,7 +301,6 @@ const BranchPicker = memo(function BranchPicker({
|
||||
currentBranch,
|
||||
onCheckout,
|
||||
onNewBranch,
|
||||
onDeleteBranch,
|
||||
}: BranchPickerProps) {
|
||||
const t = useTranslations("Folder.conversationContextBar")
|
||||
const tBd = useTranslations("Folder.branchDropdown")
|
||||
@@ -369,8 +348,8 @@ const BranchPicker = memo(function BranchPicker({
|
||||
<ChevronsUpDown className="size-3 shrink-0 text-muted-foreground" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent align="start" className="p-0 w-80">
|
||||
<Command>
|
||||
<PopoverContent align="start" className="p-0 w-80 overflow-hidden">
|
||||
<Command className="rounded-2xl">
|
||||
<CommandInput placeholder={t("searchBranch")} />
|
||||
<CommandList>
|
||||
{loading ? (
|
||||
@@ -380,39 +359,44 @@ const BranchPicker = memo(function BranchPicker({
|
||||
) : (
|
||||
<>
|
||||
<CommandEmpty>{t("noBranches")}</CommandEmpty>
|
||||
{branchList && branchList.local.length > 0 && (
|
||||
<CommandGroup
|
||||
heading={tBd("localBranches", {
|
||||
count: branchList.local.length,
|
||||
})}
|
||||
<CommandGroup>
|
||||
<CommandItem
|
||||
onSelect={() => {
|
||||
setOpen(false)
|
||||
setNewBranchName("")
|
||||
setNewBranchOpen(true)
|
||||
}}
|
||||
>
|
||||
{branchList.local.map((b) => (
|
||||
<CommandItem
|
||||
key={`local-${b}`}
|
||||
value={`local ${b}`}
|
||||
onSelect={() => {
|
||||
setOpen(false)
|
||||
if (b !== currentBranch) void onCheckout(b)
|
||||
}}
|
||||
>
|
||||
<GitBranch className="h-4 w-4" />
|
||||
<span className="flex-1 truncate">{b}</span>
|
||||
{b === currentBranch && (
|
||||
<Check className="h-4 w-4 shrink-0" />
|
||||
)}
|
||||
{b !== currentBranch && (
|
||||
<Trash2
|
||||
className="h-3.5 w-3.5 opacity-50 hover:opacity-100"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
setOpen(false)
|
||||
void onDeleteBranch(b)
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</CommandItem>
|
||||
))}
|
||||
</CommandGroup>
|
||||
<Plus className="h-4 w-4" />
|
||||
{tBd("newBranch")}
|
||||
</CommandItem>
|
||||
</CommandGroup>
|
||||
{branchList && branchList.local.length > 0 && (
|
||||
<>
|
||||
<CommandSeparator />
|
||||
<CommandGroup
|
||||
heading={tBd("localBranches", {
|
||||
count: branchList.local.length,
|
||||
})}
|
||||
>
|
||||
{branchList.local.map((b) => (
|
||||
<CommandItem
|
||||
key={`local-${b}`}
|
||||
value={`local ${b}`}
|
||||
onSelect={() => {
|
||||
setOpen(false)
|
||||
if (b !== currentBranch) void onCheckout(b)
|
||||
}}
|
||||
>
|
||||
<GitBranch className="h-4 w-4" />
|
||||
<span className="flex-1 truncate">{b}</span>
|
||||
{b === currentBranch && (
|
||||
<Check className="h-4 w-4 shrink-0" />
|
||||
)}
|
||||
</CommandItem>
|
||||
))}
|
||||
</CommandGroup>
|
||||
</>
|
||||
)}
|
||||
{branchList && branchList.remote.length > 0 && (
|
||||
<CommandGroup
|
||||
@@ -437,19 +421,6 @@ const BranchPicker = memo(function BranchPicker({
|
||||
))}
|
||||
</CommandGroup>
|
||||
)}
|
||||
<CommandSeparator />
|
||||
<CommandGroup>
|
||||
<CommandItem
|
||||
onSelect={() => {
|
||||
setOpen(false)
|
||||
setNewBranchName("")
|
||||
setNewBranchOpen(true)
|
||||
}}
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
{tBd("newBranch")}
|
||||
</CommandItem>
|
||||
</CommandGroup>
|
||||
</>
|
||||
)}
|
||||
</CommandList>
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "Checkout إلى {branchName}",
|
||||
"mergeBranch": "دمج {branchName}",
|
||||
"rebaseTo": "Rebase إلى {branchName}",
|
||||
"deleteBranch": "حذف الفرع {branchName}",
|
||||
"deleteRemoteBranch": "حذف الفرع البعيد {branchName}",
|
||||
"initGitRepo": "تهيئة مستودع Git",
|
||||
"pullCode": "سحب الكود",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "دمج الفرع",
|
||||
"rebaseTitle": "Rebase للفرع",
|
||||
"deleteTitle": "حذف الفرع",
|
||||
"mergeDescription": "دمج {branchName} في الفرع الحالي {currentBranch}؟",
|
||||
"rebaseDescription": "إجراء rebase للفرع الحالي {currentBranch} على {branchName}؟",
|
||||
"deleteDescription": "حذف الفرع {branchName}؟ لا يمكن التراجع عن هذا الإجراء.",
|
||||
"forceDeleteTitle": "حذف الفرع بالقوة",
|
||||
"forceDeleteDescription": "الفرع {branchName} لم يتم دمجه بالكامل. هل أنت متأكد من أنك تريد حذفه بالقوة؟ لا يمكن التراجع عن هذا الإجراء.",
|
||||
"deleteRemoteTitle": "حذف الفرع البعيد",
|
||||
"deleteRemoteDescription": "هل تريد حذف الفرع البعيد {branchName}؟ سيؤدي ذلك إلى إزالته من المستودع البعيد ولا يمكن التراجع عن هذا الإجراء."
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "التبديل إلى هذا الفرع",
|
||||
"mergeBranchIntoCurrent": "دمج {branchName} في {currentBranch}",
|
||||
"rebaseCurrentToBranch": "Rebase لـ {currentBranch} على {branchName}",
|
||||
"deleteBranch": "حذف الفرع",
|
||||
"versionControl": "التحكم في الإصدارات",
|
||||
"initGitRepo": "تهيئة مستودع Git",
|
||||
"pullCode": "سحب الكود",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "Zu {branchName} wechseln",
|
||||
"mergeBranch": "{branchName} mergen",
|
||||
"rebaseTo": "Auf {branchName} rebasen",
|
||||
"deleteBranch": "Branch {branchName} löschen",
|
||||
"deleteRemoteBranch": "Remote-Branch {branchName} löschen",
|
||||
"initGitRepo": "Git-Repository initialisieren",
|
||||
"pullCode": "Code pullen",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "Branch mergen",
|
||||
"rebaseTitle": "Branch rebasen",
|
||||
"deleteTitle": "Branch löschen",
|
||||
"mergeDescription": "{branchName} in den aktuellen Branch {currentBranch} mergen?",
|
||||
"rebaseDescription": "Aktuellen Branch {currentBranch} auf {branchName} rebasen?",
|
||||
"deleteDescription": "Branch {branchName} löschen? Diese Aktion kann nicht rückgängig gemacht werden.",
|
||||
"forceDeleteTitle": "Branch erzwungen löschen",
|
||||
"forceDeleteDescription": "Der Branch {branchName} ist nicht vollständig gemergt. Möchten Sie ihn wirklich erzwungen löschen? Diese Aktion kann nicht rückgängig gemacht werden.",
|
||||
"deleteRemoteTitle": "Remote-Branch löschen",
|
||||
"deleteRemoteDescription": "Remote-Branch {branchName} löschen? Dies entfernt ihn aus dem Remote-Repository und kann nicht rückgängig gemacht werden."
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "Zu diesem Branch wechseln",
|
||||
"mergeBranchIntoCurrent": "{branchName} in {currentBranch} mergen",
|
||||
"rebaseCurrentToBranch": "{currentBranch} auf {branchName} rebasen",
|
||||
"deleteBranch": "Branch löschen",
|
||||
"versionControl": "Versionskontrolle",
|
||||
"initGitRepo": "Git-Repository initialisieren",
|
||||
"pullCode": "Code pullen",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "Checkout to {branchName}",
|
||||
"mergeBranch": "Merge {branchName}",
|
||||
"rebaseTo": "Rebase to {branchName}",
|
||||
"deleteBranch": "Delete branch {branchName}",
|
||||
"deleteRemoteBranch": "Delete remote branch {branchName}",
|
||||
"initGitRepo": "Initialize Git repository",
|
||||
"pullCode": "Pull code",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "Merge branch",
|
||||
"rebaseTitle": "Rebase branch",
|
||||
"deleteTitle": "Delete branch",
|
||||
"mergeDescription": "Merge {branchName} into current branch {currentBranch}?",
|
||||
"rebaseDescription": "Rebase current branch {currentBranch} onto {branchName}?",
|
||||
"deleteDescription": "Delete branch {branchName}? This action cannot be undone.",
|
||||
"forceDeleteTitle": "Force Delete Branch",
|
||||
"forceDeleteDescription": "Branch {branchName} is not fully merged. Are you sure you want to force delete it? This action cannot be undone.",
|
||||
"deleteRemoteTitle": "Delete Remote Branch",
|
||||
"deleteRemoteDescription": "Delete remote branch {branchName}? This will remove it from the remote repository and cannot be undone."
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "Switch to this branch",
|
||||
"mergeBranchIntoCurrent": "Merge {branchName} into {currentBranch}",
|
||||
"rebaseCurrentToBranch": "Rebase {currentBranch} onto {branchName}",
|
||||
"deleteBranch": "Delete branch",
|
||||
"versionControl": "Version Control",
|
||||
"initGitRepo": "Initialize Git repository",
|
||||
"pullCode": "Pull code",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "Cambiar a {branchName}",
|
||||
"mergeBranch": "Fusionar {branchName}",
|
||||
"rebaseTo": "Rebase a {branchName}",
|
||||
"deleteBranch": "Eliminar rama {branchName}",
|
||||
"deleteRemoteBranch": "Eliminar rama remota {branchName}",
|
||||
"initGitRepo": "Inicializar repositorio Git",
|
||||
"pullCode": "Hacer pull del código",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "Fusionar rama",
|
||||
"rebaseTitle": "Rebase de rama",
|
||||
"deleteTitle": "Eliminar rama",
|
||||
"mergeDescription": "¿Fusionar {branchName} en la rama actual {currentBranch}?",
|
||||
"rebaseDescription": "¿Hacer rebase de la rama actual {currentBranch} sobre {branchName}?",
|
||||
"deleteDescription": "¿Eliminar la rama {branchName}? Esta acción no se puede deshacer.",
|
||||
"forceDeleteTitle": "Forzar eliminación de rama",
|
||||
"forceDeleteDescription": "La rama {branchName} no está completamente fusionada. ¿Estás seguro de que quieres forzar su eliminación? Esta acción no se puede deshacer.",
|
||||
"deleteRemoteTitle": "Eliminar rama remota",
|
||||
"deleteRemoteDescription": "¿Eliminar la rama remota {branchName}? Esto la eliminará del repositorio remoto y no se puede deshacer."
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "Cambiar a esta rama",
|
||||
"mergeBranchIntoCurrent": "Fusionar {branchName} en {currentBranch}",
|
||||
"rebaseCurrentToBranch": "Rebase de {currentBranch} sobre {branchName}",
|
||||
"deleteBranch": "Eliminar rama",
|
||||
"versionControl": "Control de versiones",
|
||||
"initGitRepo": "Inicializar repositorio Git",
|
||||
"pullCode": "Hacer pull del código",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "Basculer vers {branchName}",
|
||||
"mergeBranch": "Fusionner {branchName}",
|
||||
"rebaseTo": "Rebase vers {branchName}",
|
||||
"deleteBranch": "Supprimer la branche {branchName}",
|
||||
"deleteRemoteBranch": "Supprimer la branche distante {branchName}",
|
||||
"initGitRepo": "Initialiser le dépôt Git",
|
||||
"pullCode": "Pull du code",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "Fusionner la branche",
|
||||
"rebaseTitle": "Rebase de la branche",
|
||||
"deleteTitle": "Supprimer la branche",
|
||||
"mergeDescription": "Fusionner {branchName} dans la branche actuelle {currentBranch} ?",
|
||||
"rebaseDescription": "Rebaser la branche actuelle {currentBranch} sur {branchName} ?",
|
||||
"deleteDescription": "Supprimer la branche {branchName} ? Cette action est irréversible.",
|
||||
"forceDeleteTitle": "Forcer la suppression de la branche",
|
||||
"forceDeleteDescription": "La branche {branchName} n'est pas entièrement fusionnée. Êtes-vous sûr de vouloir la supprimer de force ? Cette action est irréversible.",
|
||||
"deleteRemoteTitle": "Supprimer la branche distante",
|
||||
"deleteRemoteDescription": "Supprimer la branche distante {branchName} ? Cette action la supprimera du dépôt distant et ne pourra pas être annulée."
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "Basculer vers cette branche",
|
||||
"mergeBranchIntoCurrent": "Fusionner {branchName} dans {currentBranch}",
|
||||
"rebaseCurrentToBranch": "Rebaser {currentBranch} sur {branchName}",
|
||||
"deleteBranch": "Supprimer la branche",
|
||||
"versionControl": "Contrôle de version",
|
||||
"initGitRepo": "Initialiser le dépôt Git",
|
||||
"pullCode": "Pull du code",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "{branchName} にチェックアウト",
|
||||
"mergeBranch": "{branchName} をマージ",
|
||||
"rebaseTo": "{branchName} にリベース",
|
||||
"deleteBranch": "ブランチ {branchName} を削除",
|
||||
"deleteRemoteBranch": "リモートブランチ {branchName} を削除",
|
||||
"initGitRepo": "Git リポジトリを初期化",
|
||||
"pullCode": "コードをプル",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "ブランチをマージ",
|
||||
"rebaseTitle": "ブランチをリベース",
|
||||
"deleteTitle": "ブランチを削除",
|
||||
"mergeDescription": "{branchName} を現在のブランチ {currentBranch} にマージしますか?",
|
||||
"rebaseDescription": "現在のブランチ {currentBranch} を {branchName} にリベースしますか?",
|
||||
"deleteDescription": "ブランチ {branchName} を削除しますか?この操作は元に戻せません。",
|
||||
"forceDeleteTitle": "ブランチを強制削除",
|
||||
"forceDeleteDescription": "ブランチ {branchName} はまだ完全にマージされていません。強制削除してもよろしいですか?この操作は元に戻せません。",
|
||||
"deleteRemoteTitle": "リモートブランチの削除",
|
||||
"deleteRemoteDescription": "リモートブランチ {branchName} を削除しますか?この操作はリモートリポジトリからブランチを削除し、元に戻せません。"
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "このブランチに切り替え",
|
||||
"mergeBranchIntoCurrent": "{branchName} を {currentBranch} にマージ",
|
||||
"rebaseCurrentToBranch": "{currentBranch} を {branchName} にリベース",
|
||||
"deleteBranch": "ブランチを削除",
|
||||
"versionControl": "バージョン管理",
|
||||
"initGitRepo": "Git リポジトリを初期化",
|
||||
"pullCode": "コードをプル",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "{branchName}(으)로 체크아웃",
|
||||
"mergeBranch": "{branchName} 병합",
|
||||
"rebaseTo": "{branchName}로 리베이스",
|
||||
"deleteBranch": "브랜치 {branchName} 삭제",
|
||||
"deleteRemoteBranch": "원격 브랜치 {branchName} 삭제",
|
||||
"initGitRepo": "Git 저장소 초기화",
|
||||
"pullCode": "코드 pull",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "브랜치 병합",
|
||||
"rebaseTitle": "브랜치 리베이스",
|
||||
"deleteTitle": "브랜치 삭제",
|
||||
"mergeDescription": "{branchName}을(를) 현재 브랜치 {currentBranch}에 병합할까요?",
|
||||
"rebaseDescription": "현재 브랜치 {currentBranch}를 {branchName} 위로 리베이스할까요?",
|
||||
"deleteDescription": "브랜치 {branchName}을(를) 삭제할까요? 이 작업은 되돌릴 수 없습니다.",
|
||||
"forceDeleteTitle": "브랜치 강제 삭제",
|
||||
"forceDeleteDescription": "브랜치 {branchName}가 완전히 병합되지 않았습니다. 강제 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.",
|
||||
"deleteRemoteTitle": "원격 브랜치 삭제",
|
||||
"deleteRemoteDescription": "원격 브랜치 {branchName}을(를) 삭제하시겠습니까? 이 작업은 원격 저장소에서 브랜치를 제거하며 되돌릴 수 없습니다."
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "이 브랜치로 전환",
|
||||
"mergeBranchIntoCurrent": "{branchName}을(를) {currentBranch}에 병합",
|
||||
"rebaseCurrentToBranch": "{currentBranch}를 {branchName}로 리베이스",
|
||||
"deleteBranch": "브랜치 삭제",
|
||||
"versionControl": "버전 관리",
|
||||
"initGitRepo": "Git 저장소 초기화",
|
||||
"pullCode": "코드 pull",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "Fazer checkout para {branchName}",
|
||||
"mergeBranch": "Mesclar {branchName}",
|
||||
"rebaseTo": "Rebase para {branchName}",
|
||||
"deleteBranch": "Excluir branch {branchName}",
|
||||
"deleteRemoteBranch": "Excluir branch remoto {branchName}",
|
||||
"initGitRepo": "Inicializar repositório Git",
|
||||
"pullCode": "Fazer pull do código",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "Mesclar branch",
|
||||
"rebaseTitle": "Rebase da branch",
|
||||
"deleteTitle": "Excluir branch",
|
||||
"mergeDescription": "Mesclar {branchName} na branch atual {currentBranch}?",
|
||||
"rebaseDescription": "Fazer rebase da branch atual {currentBranch} sobre {branchName}?",
|
||||
"deleteDescription": "Excluir a branch {branchName}? Esta ação não pode ser desfeita.",
|
||||
"forceDeleteTitle": "Forçar exclusão do branch",
|
||||
"forceDeleteDescription": "O branch {branchName} não está totalmente mesclado. Tem certeza de que deseja forçar a exclusão? Esta ação não pode ser desfeita.",
|
||||
"deleteRemoteTitle": "Excluir branch remoto",
|
||||
"deleteRemoteDescription": "Excluir o branch remoto {branchName}? Isso o removerá do repositório remoto e não poderá ser desfeito."
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "Mudar para esta branch",
|
||||
"mergeBranchIntoCurrent": "Mesclar {branchName} em {currentBranch}",
|
||||
"rebaseCurrentToBranch": "Rebase de {currentBranch} sobre {branchName}",
|
||||
"deleteBranch": "Excluir branch",
|
||||
"versionControl": "Controle de versão",
|
||||
"initGitRepo": "Inicializar repositório Git",
|
||||
"pullCode": "Fazer pull do código",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "切换到 {branchName}",
|
||||
"mergeBranch": "合并 {branchName}",
|
||||
"rebaseTo": "变基到 {branchName}",
|
||||
"deleteBranch": "删除分支 {branchName}",
|
||||
"deleteRemoteBranch": "删除远程分支 {branchName}",
|
||||
"initGitRepo": "初始化 Git 仓库",
|
||||
"pullCode": "更新代码",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "合并分支",
|
||||
"rebaseTitle": "变基分支",
|
||||
"deleteTitle": "删除分支",
|
||||
"mergeDescription": "确定将 {branchName} 合并到当前分支 {currentBranch} 吗?",
|
||||
"rebaseDescription": "确定将当前分支 {currentBranch} 变基到 {branchName} 吗?",
|
||||
"deleteDescription": "确定删除分支 {branchName} 吗?此操作不可恢复。",
|
||||
"forceDeleteTitle": "强制删除分支",
|
||||
"forceDeleteDescription": "分支 {branchName} 尚未完全合并,确定要强制删除吗?此操作不可恢复。",
|
||||
"deleteRemoteTitle": "删除远程分支",
|
||||
"deleteRemoteDescription": "确定删除远程分支 {branchName} 吗?此操作将从远程仓库中移除该分支,且不可恢复。"
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "切换到此分支",
|
||||
"mergeBranchIntoCurrent": "将 {branchName} 合并到 {currentBranch}",
|
||||
"rebaseCurrentToBranch": "将 {currentBranch} 变基到 {branchName}",
|
||||
"deleteBranch": "删除分支",
|
||||
"versionControl": "版本控制",
|
||||
"initGitRepo": "初始化 Git 仓库",
|
||||
"pullCode": "更新代码",
|
||||
|
||||
@@ -1015,7 +1015,6 @@
|
||||
"checkoutTo": "切換到 {branchName}",
|
||||
"mergeBranch": "合併 {branchName}",
|
||||
"rebaseTo": "變基到 {branchName}",
|
||||
"deleteBranch": "刪除分支 {branchName}",
|
||||
"deleteRemoteBranch": "刪除遠端分支 {branchName}",
|
||||
"initGitRepo": "初始化 Git 倉庫",
|
||||
"pullCode": "更新程式碼",
|
||||
@@ -1027,12 +1026,8 @@
|
||||
"confirm": {
|
||||
"mergeTitle": "合併分支",
|
||||
"rebaseTitle": "變基分支",
|
||||
"deleteTitle": "刪除分支",
|
||||
"mergeDescription": "確定將 {branchName} 合併到目前分支 {currentBranch} 嗎?",
|
||||
"rebaseDescription": "確定將目前分支 {currentBranch} 變基到 {branchName} 嗎?",
|
||||
"deleteDescription": "確定刪除分支 {branchName} 嗎?此操作無法復原。",
|
||||
"forceDeleteTitle": "強制刪除分支",
|
||||
"forceDeleteDescription": "分支 {branchName} 尚未完全合併,確定要強制刪除嗎?此操作不可恢復。",
|
||||
"deleteRemoteTitle": "刪除遠端分支",
|
||||
"deleteRemoteDescription": "確定刪除遠端分支 {branchName} 嗎?此操作將從遠端倉庫中移除該分支,且不可恢復。"
|
||||
},
|
||||
@@ -1040,7 +1035,6 @@
|
||||
"switchToBranch": "切換到此分支",
|
||||
"mergeBranchIntoCurrent": "將 {branchName} 合併到 {currentBranch}",
|
||||
"rebaseCurrentToBranch": "將 {currentBranch} 變基到 {branchName}",
|
||||
"deleteBranch": "刪除分支",
|
||||
"versionControl": "版本控制",
|
||||
"initGitRepo": "初始化 Git 倉庫",
|
||||
"pullCode": "更新程式碼",
|
||||
|
||||
@@ -792,14 +792,6 @@ export async function gitRebase(
|
||||
return getTransport().call("git_rebase", { path, branchName })
|
||||
}
|
||||
|
||||
export async function gitDeleteBranch(
|
||||
path: string,
|
||||
branchName: string,
|
||||
force = false
|
||||
): Promise<string> {
|
||||
return getTransport().call("git_delete_branch", { path, branchName, force })
|
||||
}
|
||||
|
||||
export async function gitDeleteRemoteBranch(
|
||||
path: string,
|
||||
remote: string,
|
||||
|
||||
@@ -648,14 +648,6 @@ export async function gitRebase(
|
||||
return invoke("git_rebase", { path, branchName })
|
||||
}
|
||||
|
||||
export async function gitDeleteBranch(
|
||||
path: string,
|
||||
branchName: string,
|
||||
force = false
|
||||
): Promise<string> {
|
||||
return invoke("git_delete_branch", { path, branchName, force })
|
||||
}
|
||||
|
||||
export async function gitListConflicts(path: string): Promise<string[]> {
|
||||
return invoke("git_list_conflicts", { path })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user