From 7fecc83d4097765026d1255dd7d7f4a66f642d34 Mon Sep 17 00:00:00 2001 From: xintaofei Date: Sat, 21 Mar 2026 15:14:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dlint=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=92=8C=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/folder/layout.tsx | 64 +++++++++---------- src/components/layout/branch-dropdown.tsx | 14 ++-- .../settings/add-git-account-dialog.tsx | 10 ++- .../settings/add-github-account-dialog.tsx | 5 +- .../settings/version-control-settings.tsx | 10 ++- src/contexts/git-credential-context.tsx | 56 +++++++++------- src/contexts/tab-context.tsx | 4 +- 7 files changed, 86 insertions(+), 77 deletions(-) diff --git a/src/app/folder/layout.tsx b/src/app/folder/layout.tsx index f59a77d..a1bbd7d 100644 --- a/src/app/folder/layout.tsx +++ b/src/app/folder/layout.tsx @@ -645,40 +645,40 @@ function FolderLayoutInner({ children }: { children: React.ReactNode }) { - - - - - - - + + + + + - -
- - - {children} - - - -
-
-
-
-
-
-
-
-
+ + +
+ + + {children} + + + +
+
+
+ + + + + +
diff --git a/src/components/layout/branch-dropdown.tsx b/src/components/layout/branch-dropdown.tsx index 628006a..2536162 100644 --- a/src/components/layout/branch-dropdown.tsx +++ b/src/components/layout/branch-dropdown.tsx @@ -698,10 +698,9 @@ export function BranchDropdown({ runGitTask( t("tasks.pullCode"), () => - withCredentialRetry( - (creds) => gitPull(folderPath, creds), - { folderPath } - ), + withCredentialRetry((creds) => gitPull(folderPath, creds), { + folderPath, + }), (result) => { if (result.conflict?.has_conflicts) { setConflictInfo(result.conflict) @@ -724,10 +723,9 @@ export function BranchDropdown({ disabled={loading} onSelect={() => runGitTask(t("tasks.fetchInfo"), () => - withCredentialRetry( - (creds) => gitFetch(folderPath, creds), - { folderPath } - ) + withCredentialRetry((creds) => gitFetch(folderPath, creds), { + folderPath, + }) ) } > diff --git a/src/components/settings/add-git-account-dialog.tsx b/src/components/settings/add-git-account-dialog.tsx index c132421..27d9769 100644 --- a/src/components/settings/add-git-account-dialog.tsx +++ b/src/components/settings/add-git-account-dialog.tsx @@ -83,7 +83,15 @@ export function AddGitAccountDialog({ onAccountAdded(account) handleOpenChange(false) - }, [serverUrl, username, password, isFirstAccount, onAccountAdded, handleOpenChange, t]) + }, [ + serverUrl, + username, + password, + isFirstAccount, + onAccountAdded, + handleOpenChange, + t, + ]) const canSubmit = serverUrl.trim().length > 0 && diff --git a/src/components/settings/add-github-account-dialog.tsx b/src/components/settings/add-github-account-dialog.tsx index 5d64eda..7716d4d 100644 --- a/src/components/settings/add-github-account-dialog.tsx +++ b/src/components/settings/add-github-account-dialog.tsx @@ -186,10 +186,7 @@ export function AddGitHubAccountDialog({ - -