This commit is contained in:
Timothy Jaeryang Baek 2026-10-14 17:01:25 +04:00
parent fe0e725997
commit 3213dcc303
3 changed files with 5 additions and 8 deletions

View file

@ -210,7 +210,7 @@
<div class="grid shrink-0 grid-cols-2 border-b border-black/5 dark:border-white/5">
{#each [{ label: $i18n.t('Original'), path: original }, { label: $i18n.t('Revised'), path: revised }] as file}
<div class="min-w-0 px-3 py-2" title={file.path}>
<div class="text-[0.916667em] text-gray-400 dark:text-gray-500">{file.label}</div>
<div class="truncate font-normal text-gray-700 dark:text-gray-300">{name(file.path)}</div>
</div>
{/each}

View file

@ -157,7 +157,7 @@
title={file.path}
>
<p class="truncate font-medium">{file.name}</p>
<p class="truncate text-[10px]">{file.path}</p>
</div>
{/each}
</div>

View file

@ -81,7 +81,6 @@
(side === 'a') !== swapped ? session?.leftFile : session?.rightFile;
const paneLabel = (side: string) =>
paneFile(side)?.name ?? (side === 'a' ? $i18n.t('Original') : $i18n.t('Proposed revision'));
const parentPath = (path: string) => path.replace(/[\\/][^\\/]*$/, '') || '/';
const begin = () => {
session = {
@ -405,8 +404,8 @@
<div class="diff-editor flex h-full min-h-0 flex-col text-xs" on:keydown|capture={preventSave}>
<header class="flex shrink-0 flex-wrap items-center gap-3 px-5 pt-4 pb-2">
<div class="min-w-0 flex-1">
<h2 class="font-medium">{session.title || $i18n.t('Compare revision')}</h2>
{#if session.path}<p class="mt-1 truncate font-mono text-gray-500">{session.path}</p>{/if}
<h2 class="font-medium" title={session.path ?? undefined}>{session.title || $i18n.t('Compare revision')}</h2>
</div>
{#if !comparing && session.mode === 'edit'}
<button type="button" class="primary" on:click={() => (comparing = true)}
@ -512,9 +511,7 @@
>{file?.name ??
(side === 'a' ? $i18n.t('Original') : $i18n.t('Proposed revision'))}</span
>
{#if file}<span class="block truncate text-[10px]" aria-label={file.path}
>{parentPath(file.path)}</span
>{/if}
</div>
{#if comparing && !loading}
<span