{#if sidebarSectionMenu && activeView === "repository"} {/if} { const path = repoTabs.find(tab => sameRepoPath(tab.path, activeRepoPath))?.path ?? repoTabs[0]?.path; if (path) return selectRepoTab(path); return chooseRepositoryFolder(); }} onOpenReviewCenter={() => openReviewCenter()} onOpenIssues={() => { activeView = "issues"; }} isActive={(path) => activeView === "repository" && sameRepoPath(activeRepoPath, path)} onSelect={selectRepoTab} onReorder={reorderRepoTab} onClose={closeRepoTab} onContextMenu={openRepoTabContextMenu} onAdd={chooseRepositoryFolder} /> {#if workspaceActive} {/if} {#if repoTabContextMenu} {@const menu = repoTabContextMenu} {@const contextTab = repoTabs.find((tab) => sameRepoPath(tab.path, menu.path))} {@const contextIndex = repoTabIndex(menu.path)} {#if contextTab} { event.preventDefault(); event.stopPropagation(); }} > closeRepoTabFromContext(contextTab.path)} disabled={isBusy}> Close tab closeOtherRepoTabs(contextTab.path)} disabled={isBusy || repoTabs.length <= 1}> Close other tabs closeRepoTabsToRight(contextTab.path)} disabled={isBusy || contextIndex < 0 || contextIndex >= repoTabs.length - 1}> Close tabs to the right {/if} {/if} {#if errorMessage} {#key errorMessage} pauseAutoHideError("errorMessage")} onmouseleave={() => resumeAutoHideError("errorMessage")} > {appLanguage === "de" ? "Etwas ist schiefgelaufen" : "Something went wrong"} {errorMessage} { errorMessage = ""; }} title={appLanguage === "de" ? "Schließen" : "Close"} aria-label={appLanguage === "de" ? "Fehlermeldung schließen" : "Dismiss error"} > {/key} {/if} {#if operation && operation !== "Opening repository" && !hasRepository} {operation} {/if} {#if workspaceActive && mergeInProgress} {:else if workspaceActive && hasConflicts && !rebaseInProgress && !cherryPickInProgress} {conflictedFiles.length} {conflictedFiles.length === 1 ? "file has" : "files have"} conflicts. Resolve conflicts {/if} {#if workspaceActive && rebaseInProgress} Rebase in progress. {#if hasConflicts} Resolve conflicts, then continue. {:else} Continue when the index is ready, or abort to return to the previous state. {/if} {#if hasConflicts} Resolve conflicts {/if} Continue Abort {/if} {#if workspaceActive && cherryPickInProgress} Cherry-pick in progress. {#if hasConflicts} Resolve conflicts, then continue. {:else} Continue when the index is ready, or abort to return to the previous state. {/if} {#if hasConflicts} Resolve conflicts {/if} Continue Abort {/if} {#if activeView === "management"} openReviewCenter(repository, sourceId)} /> {:else if activeView === "issues"} {:else if activeView === "review-center"} { appSettingsOpen = true; }} onCleanupStateChange={async (busy, path) => { if (busy) { operation = appLanguage === "de" ? "PR zusammenführen und Branch aufräumen" : "Merging PR and cleaning up branch"; } else { try { if (sameRepoPath(activeRepoPath, path)) await refreshRepositorySnapshot(path); } finally { operation = ""; } } }} onStartLocalResolution={startReviewConflictResolution} onOpenLocalResolver={reopenReviewConflictResolver} onContinueLocalResolution={continueReviewConflictMerge} onAbortLocalResolution={abortReviewConflictResolution} onPushLocalResolution={pushReviewConflictResolution} /> {:else} {status?.current_branch ?? "No repository"} {#if activeRepoPath} {activeRepoPath} {/if} {#if currentBranchIsLocalOnly} {appLanguage === "de" ? "Nur lokal" : "Local only"} {appLanguage === "de" ? "noch nicht veröffentlicht" : "not published yet"} {:else} {#if status?.upstream}{status.upstream}{/if} {status?.ahead ?? 0} ahead {status?.behind ?? 0} behind {/if} {#if terminalOpen} {t("terminal.title")} {activeRepoPath} {#await import("./lib/components/TerminalPanel.svelte") then module} {#each repoTabs as tab (tab.path)} {/each} {/await} {/if} {/if} {#if commandPaletteOpen} { commandPaletteOpen = false; }} onCheckoutBranch={checkout} onOpenFile={openFileFromCommandPalette} onSelectCommit={selectCommitFromCommandPalette} onFetch={fetchRepo} onPull={pullRepo} onPush={pushRepo} onRefresh={refreshRepo} onOpenSearch={openGlobalSearchDialog} onOpenCompare={openCompareSelect} onOpenReflog={openReflog} onOpenBisect={openBisect} onOpenInteractiveRebase={openInteractiveRebase} onOpenWorktrees={openWorktreeDialog} onOpenSyncSettings={openSyncOptions} onOpenSettings={openAppSettings} onOpenAiSettings={openAiSettings} onOpenHelp={openHelp} /> {/if} {#if updateToastOpen} {/if} {#if analyticsNoticeOpen} {/if} {#if appSettingsOpen} refreshDetectedExternalTools(false)} onSave={saveAppSettings} onClose={() => { appSettingsOpen = false; }} /> {/if} {#if helpOpen} {#await import("./lib/components/HelpOverlay.svelte") then module} { helpOpen = false; }} /> {/await} {/if} {#if aiReviewOpen && aiReviewResult} { aiReviewOpen = false; }} /> {/if} {#if aiCommitSplitOpen && aiCommitPlan} { if (!commitAiSplitting) aiCommitSplitOpen = false; }} /> {/if} {#if linePatchOpen && linePatchFile} {#await import("./lib/components/LinePatchDialog.svelte") then module} {/await} {/if} {#if blameOpen} {#await import("./lib/components/BlameDialog.svelte") then module} {/await} {/if} {#if confirmDialogRequest} answerConfirmation(true, result.value, result.checked)} onCancel={() => answerConfirmation(false)} /> {/if} {#if pendingDiscard} {/if} {#if fileHistoryDialogOpen} {#await import("./lib/components/FileHistoryDialog.svelte") then module} {/await} {/if} {#if globalSearchOpen} {#await import("./lib/components/GlobalSearchDialog.svelte") then module} {/await} {/if} {#if worktreeDialogOpen} {#await import("./lib/components/WorktreeDialog.svelte") then module} refreshWorktrees()} onOpen={openWorktreeTab} onAdd={createWorktree} onRemove={removeSelectedWorktree} onMove={moveSelectedWorktree} onLock={lockSelectedWorktree} onUnlock={unlockSelectedWorktree} onPrune={pruneStaleWorktrees} onRepair={repairSelectedWorktree} onClose={closeWorktreeDialog} /> {/await} {/if} {#if gitLfsDialogOpen} {#await import("./lib/components/GitLfsDialog.svelte") then module} {/await} {/if} {#if newBranchCommit} { newBranchCommit = null; }} /> {/if} {#if mergeBranchTarget} { if (!isBusy) mergeBranchTarget = null; }} /> {/if} {#if commitNoteTarget} syncActiveCommitNotes(remote, "fetch")} onPush={(remote) => syncActiveCommitNotes(remote, "push")} onClose={closeCommitNoteDialog} /> {/if} {#if renameBranchTarget} { renameBranchTarget = null; }} /> {/if} {#if deleteBranchTarget} {/if} {#if interactiveRebaseOpen} {#await import("./lib/components/InteractiveRebaseDialog.svelte") then module} { if (!isBusy) interactiveRebaseOpen = false; }} /> {/await} {/if} {#if reflogOpen} entry.selector === "HEAD@{0}")?.hash ?? ""} isLoading={reflogLoading} {isBusy} {operation} error={reflogError} onPreview={previewReflogEntry} onRestore={recoverReflogEntry} onClose={() => { if (!isBusy) reflogOpen = false; }} /> {/if} {#if bisectOpen} {#await import("./lib/components/BisectDialog.svelte") then module} { if (!isBusy) bisectOpen = false; }} /> {/await} {/if} {#if compareSelectOpen} { compareFrom = val; }} onCompareToChange={(val) => { compareTo = val; }} onCompare={compareSelectedTargets} onClose={() => { compareSelectOpen = false; }} /> {/if} {#if compareDialogOpen && comparison} {#await import("./lib/components/CompareDialog.svelte") then module} {/await} {/if} {#if credDialogOpen && credDialogAction} { credDialogOpen = false; credDialogAction = null; pendingRemoteDelete = null; credDialogError = ""; credDialogKey = null; credDialogUsername = ""; credDialogMode = "credentials"; }} /> {/if} {#if syncSettingsOpen} branch.name)} currentBranch={status?.current_branch ?? ""} currentUpstream={status?.upstream ?? ""} strategy={pullStrategy} {selectedRemote} {isBusy} language={appLanguage} onSaveSync={saveSyncSettings} onAddRemote={addSyncRemote} onUpdateRemote={updateSyncRemote} onRemoveRemote={removeSyncRemote} onClose={() => { if (!isBusy) syncSettingsOpen = false; }} /> {/if} {#if cloneDialogOpen} { if (!isBusy) cloneDialogOpen = false; }} /> {/if} {#if initRepositoryDialogOpen} { if (!isBusy) initRepositoryDialogOpen = false; }} /> {/if} {#if openingRepo} {/if} {#if cloningRepo} {/if} {#if resolveDialogOpen} {#await import("./lib/components/ResolveDialog.svelte") then module} { resolveDialogOpen = false; }} onSelectFile={selectConflictFile} onMarkResolved={handleMarkResolved} onApply={applyPreparedResolutions} onExternalMerge={openConflictInExternalMerge} /> {/await} {/if} {#if submoduleDialogOpen} {#await import("./lib/components/SubmoduleDialog.svelte") then module} { submoduleRecursive = value; void refreshSubmodules(); }} onRefresh={refreshSubmodules} onClose={closeSubmoduleDialog} onOpen={openSubmoduleTab} onLoadTags={(selected) => listTags(selected.full_path)} onCheckout={(selected, revision, kind) => runSubmoduleOperation(path => checkoutSubmoduleRevision(path, selected.path, revision, kind))} onAdd={(url, destination, branch) => runSubmoduleOperation(path => withSubmoduleCredentials(url, (username, password) => addSubmodule(path, url, destination, branch, username, password)))} onAction={(selected, action) => runSubmoduleOperation(path => (action === "update" || action === "fetch") ? withSubmoduleCredentials(selected.url, (username, password) => submoduleAction(path, selected.path, action, submoduleRecursive, username, password)) : submoduleAction(path, selected.path, action, submoduleRecursive))} /> {/await} {/if} {#if pendingSubmoduleInitialization} {#await import("./lib/components/SubmoduleInitDialog.svelte") then module} {/await} {/if} {#if submoduleAuthRequest} {/if}