{conflictTarget || t("Datei auswählen", "Select a file")}
+ {#if conflictRegionCount > 0 && !manualMode} +{t("Wähle eine Datei aus, um ihren Konflikt zu lösen.", "Select a file to resolve its conflict.")}
+ {:else if conflict.binary}
+ {#each ["ours", "theirs"] as side}
+ {@const size = side === "ours" ? conflict.ours_size : conflict.theirs_size}
+ { binarySide = side as "ours" | "theirs"; }}>{side === "ours" ? t("Aktuell (ours)", "Current (ours)") : t("Eingehend (theirs)", "Incoming (theirs)")}{size == null ? t("Auf dieser Seite gelöscht", "Deleted on this side") : formatBytes(size)}{#if binarySide === side} {/if}
+ {/each}
- {#if manualMode}
- { manualMode = false; }} disabled={isBusy}>Back to guided
- {:else}
- Apply to all:
- setAllConflicts("ours")} disabled={isBusy}>Current
- setAllConflicts("theirs")} disabled={isBusy}>Incoming
- setAllConflicts("both-ot")} disabled={isBusy}>Both
- Edit manually
- {/if}
-
- {#if unresolvedCount > 0}
-
- {unresolvedCount} of {conflictRegionCount} unresolved
- {:else if resolveHasMarkers}
-
- Conflict markers still present
- {:else}
-
- {conflictRegionCount} {conflictRegionCount === 1 ? "conflict" : "conflicts"} resolved
- {/if}
-
+
+ {#if manualMode} { manualMode = false; }} disabled={isBusy}>{t("Zurück zur Auswahl", "Back to guided")}
+ {:else}{t("Für alle Konflikte", "For all conflicts")} setAllConflicts("ours")} disabled={isBusy}>{t("Aktuell", "Current")} setAllConflicts("theirs")} disabled={isBusy}>{t("Eingehend", "Incoming")} {@render bothChoices(-1)} {t("Manuell bearbeiten", "Edit manually")} {/if}
-
{#if manualMode}
-
+
{:else}
-
- {#if conflictRegions.length > 0}
-
-
-
+
{/if}
- {#each conflictRegions as part (part.index)}
-
+ {t("Ergebnisvorschau", "Result preview")}{manualMode && resolveHasMarkers ? t("Konfliktmarker vorhanden", "Conflict markers remain") : unresolvedCount > 0 ? `${unresolvedCount} ${t(unresolvedCount === 1 ? "Konflikt offen" : "Konflikte offen", unresolvedCount === 1 ? "conflict open" : "conflicts open")}` : t("Alle Konflikte gelöst", "All conflicts resolved")}
+
{/if}
-
+ {#if conflict}
- Conflict {part.index + 1}
-
{/if}
-
-
- setConflictChoice(part.index, "ours")} disabled={isBusy}>Current
- setConflictChoice(part.index, "theirs")} disabled={isBusy}>Incoming
- setConflictChoice(part.index, "both-ot")} disabled={isBusy} title="Both - current first">Both C+I
- setConflictChoice(part.index, "both-to")} disabled={isBusy} title="Both - incoming first">Both I+C
-
+
+
+
- {/if}
-
- {t("Aktuell (ours)", "Current (ours)")}
{t("Eingehend (theirs)", "Incoming (theirs)")}
+ {#each resolveSplitRows as row, i (i)}
+ {#if row.type === "marker"}
+ {@const choice = conflictChoices[row.conflictIndex]}
+
+ {t("Konflikt", "Conflict")} {row.conflictIndex + 1}{#if choice == null} · {t("Offen", "Open")}{/if}
+ setConflictChoice(row.conflictIndex, "ours")}>{t("Aktuell übernehmen", "Accept current")}
+ setConflictChoice(row.conflictIndex, "theirs")}>{t("Eingehend übernehmen", "Accept incoming")}
+ {@render bothChoices(row.conflictIndex)}
+ {#if choice}{choice === "ours" ? t("Aktuell gewählt", "Current selected") : choice === "theirs" ? t("Eingehend gewählt", "Incoming selected") : choice === "both-ot" ? t("Aktuell → Eingehend", "Current → Incoming") : t("Eingehend → Aktuell", "Incoming → Current")}{/if}
- {/each}
-
-
-
- {#if false}
- {#each legacyConflictParts() as part, partIndex (partIndex)}
- {#if part.kind === "text"}
- {#if part.lines.length > 0}
- syncResolveScroll("before")}
- >
-
-
- {#each resolveSplitRows as row, i (`left-${i}`)}
- {#if row.type === "marker"}
-
- Conflict {row.conflictIndex + 1}
- {:else}
- {row.leftNum ?? ""}
- {displayLine(row.leftText ?? "") || " "}
- {/if}
- {/each}
- syncResolveScroll("after")}
- >
-
-
- {#each resolveSplitRows as row, i (`right-${i}`)}
- {#if row.type === "marker"}
-
- Conflict {row.conflictIndex + 1}
- {:else}
- {row.rightNum ?? ""}
- {displayLine(row.rightText ?? "") || " "}
- {/if}
- {/each}
- {#each part.lines as line}{displayLine(line) || " "}{/each}
+ {:else}
+ {row.leftNum ?? ""}
+ {displayLine(row.leftText ?? "") || " "}{row.rightNum ?? ""}
{/if}
- {:else}
- {displayLine(row.rightText ?? "") || " "}
-
- {/if}
- {/each}
- {/if}
+ {/each}
+
- Conflict {part.index + 1}
-
-
- setConflictChoice(part.index, "ours")} disabled={isBusy}>Current
- setConflictChoice(part.index, "theirs")} disabled={isBusy}>Incoming
- setConflictChoice(part.index, "both-ot")} disabled={isBusy} title="Both — current first">Both C+I
- setConflictChoice(part.index, "both-to")} disabled={isBusy} title="Both — incoming first">Both I+C
-
-
- Current (ours)
-
- {#each part.oursLines as line}{displayLine(line) || " "}{/each}
-
- Incoming (theirs)
-
- {#each part.theirsLines as line}{displayLine(line) || " "}{/each}
-
- {conflictTarget}
- {#if currentPrepared}
- Prepared
- {/if}
-
-
- {currentPrepared ? "Update decision" : "Mark as resolved"}
-
-
+ {#each previewLines as line, i}
+ {i + 1}
{/each}{displayLine(line) || " "}{!canMarkResolved ? t("Alle Konflikte dieser Datei lösen, dann vorbereiten.", "Resolve all conflicts in this file, then prepare it.") : currentPrepared ? t("Diese Datei ist vorbereitet.", "This file is prepared.") : t("Ergebnis prüfen und Datei vorbereiten.", "Review the result and prepare the file.")}{currentPrepared ? t("Vorbereitung aktualisieren", "Update preparation") : t("Datei vorbereiten", "Prepare file")}
{/if}
+