diff --git a/src/lib/components/common/DiffEditorModal.svelte b/src/lib/components/common/DiffEditorModal.svelte new file mode 100644 index 0000000000..c31b6ba094 --- /dev/null +++ b/src/lib/components/common/DiffEditorModal.svelte @@ -0,0 +1,536 @@ + + +{#if show && session} + + +
+
+
+

{session.title || $i18n.t('Compare revision')}

+ {#if session.path}

{session.path}

{/if} +
+ {#if !comparing} + + {/if} + {#if comparing} +
+ {loading + ? $i18n.t('Loading...') + : chunkCount + ? $i18n.t('Change {{current}} of {{total}}', { + current: activeChunk + 1, + total: chunkCount + }) + : $i18n.t('No differences')} + {#if approximate}≈{/if} + + + + +
+ {/if} + +
+ {#if error}{/if} +
+
+
+
+
+ {$i18n.t('Working copy')} +
+
+ {$i18n.t('Proposed revision')} +
+
+ {#if comparing} +
+ {:else} +
+ +
+ +
+
+ {/if} +
+
+ {#if comparing} +
+ +
+ {/if} +
+ +
+
+ +{/if} + + diff --git a/src/lib/components/common/Modal.svelte b/src/lib/components/common/Modal.svelte index 8e031a5bce..1a578cbe60 100644 --- a/src/lib/components/common/Modal.svelte +++ b/src/lib/components/common/Modal.svelte @@ -1,5 +1,5 @@ + (comparison = null)} +/> + {/if} {selected} + {#if !readOnly && loadedPath && !objectUrl && !loading && !loadError} + + {/if} {#if /\.md$/i.test(selected) && !loading}