修复lint问题和错误
This commit is contained in:
@@ -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,
|
||||
})
|
||||
)
|
||||
}
|
||||
>
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
@@ -186,10 +186,7 @@ export function AddGitHubAccountDialog({
|
||||
</div>
|
||||
|
||||
<DialogFooter>
|
||||
<Button
|
||||
onClick={handleSubmit}
|
||||
disabled={validating || !token.trim()}
|
||||
>
|
||||
<Button onClick={handleSubmit} disabled={validating || !token.trim()}>
|
||||
{validating ? (
|
||||
<>
|
||||
<Loader2 className="h-3.5 w-3.5 animate-spin" />
|
||||
|
||||
@@ -205,7 +205,9 @@ export function VersionControlSettings() {
|
||||
if (trimmed) {
|
||||
const result = await testGitPath(trimmed)
|
||||
if (!result.installed) {
|
||||
toast.error(t("testFailed", { message: "not a valid git executable" }))
|
||||
toast.error(
|
||||
t("testFailed", { message: "not a valid git executable" })
|
||||
)
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -415,11 +417,7 @@ export function VersionControlSettings() {
|
||||
>
|
||||
{t("removeCancel")}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={handleSaveGit}
|
||||
disabled={savingGit}
|
||||
>
|
||||
<Button size="sm" onClick={handleSaveGit} disabled={savingGit}>
|
||||
{savingGit ? (
|
||||
<Loader2 className="h-3.5 w-3.5 animate-spin" />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user