diff --git a/src/modules/features/InteractiveConflictResolving/ConflictResolveModal.ts b/src/modules/features/InteractiveConflictResolving/ConflictResolveModal.ts index c5af855..2b842ed 100644 --- a/src/modules/features/InteractiveConflictResolving/ConflictResolveModal.ts +++ b/src/modules/features/InteractiveConflictResolving/ConflictResolveModal.ts @@ -25,8 +25,8 @@ export class ConflictResolveModal extends Modal { title: string = "Conflicting changes"; pluginPickMode: boolean = false; - localName: string = "Use Base"; - remoteName: string = "Use Conflicted"; + localName: string = "Base"; + remoteName: string = "Conflicted"; offEvent?: ReturnType; constructor(app: App, filename: string, diff: diff_result, pluginPickMode?: boolean, remoteName?: string) { @@ -36,8 +36,8 @@ export class ConflictResolveModal extends Modal { this.pluginPickMode = pluginPickMode || false; if (this.pluginPickMode) { this.title = "Pick a version"; - this.remoteName = `Use ${remoteName || "Remote"}`; - this.localName = "Use Local"; + this.remoteName = `${remoteName || "Remote"}`; + this.localName = "Local"; } // Send cancel signal for the previous merge dialogue // if not there, simply be ignored. @@ -93,12 +93,13 @@ export class ConflictResolveModal extends Modal { const date2 = new Date(this.result.right.mtime).toLocaleString() + (this.result.right.deleted ? " (Deleted)" : ""); div2.innerHTML = ` -A:${date1}
B:${date2}
+${this.localName}: ${date1}
+${this.remoteName}: ${date2}
`; - contentEl.createEl("button", { text: this.localName }, (e) => + contentEl.createEl("button", { text: `Use ${this.localName}` }, (e) => e.addEventListener("click", () => this.sendResponse(this.result.right.rev)) ).style.marginRight = "4px"; - contentEl.createEl("button", { text: this.remoteName }, (e) => + contentEl.createEl("button", { text: `Use ${this.remoteName}` }, (e) => e.addEventListener("click", () => this.sendResponse(this.result.left.rev)) ).style.marginRight = "4px"; if (!this.pluginPickMode) { diff --git a/styles.css b/styles.css index 69354b4..f0df148 100644 --- a/styles.css +++ b/styles.css @@ -12,6 +12,11 @@ background-color: var(--text-muted); } +.conflict-dev-name { + display: inline-block; + min-width: 5em; +} + .op-scrollable { overflow-y: scroll; /* min-height: 280px; */