Compare commits

..

No commits in common. "master" and "1.1.0" have entirely different histories.

6 changed files with 44 additions and 22 deletions

View file

@ -17,7 +17,7 @@ alt="GIF of a demo show this plugin" width="900" />
## Motivation
I created this plugin because I use [SyncThing](https://syncthing.net/) and it bothered me to clean up merge conflicts by hand.
I created this plugin because I use SyncThing and it bothered me to clean up merge conflicts by hand.
## Installation

View file

@ -1,7 +1,7 @@
{
"id": "file-diff",
"name": "File Diff",
"version": "1.1.2",
"version": "1.1.0",
"minAppVersion": "0.15.0",
"description": "Shows the differences between two files..",
"author": "Till Friebe",

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-file-diff",
"version": "1.1.2",
"version": "1.1.0",
"description": "Shows the differences between two files.",
"main": "main.js",
"scripts": {

View file

@ -174,7 +174,7 @@ export default class FileDiffPlugin extends Plugin {
''
);
const originalFile = files.find(
(f) => f.name === originalFileName && (file.parent?.path ?? "") === (f.parent?.path ?? "")
(f) => f.name === originalFileName
);
if (originalFile) {

View file

@ -13,24 +13,48 @@
text-align: right;
}
.file-diff__top-line__bg {
background-color: color-mix(in srgb, var(--background-primary), #0fc 15%);
border-radius: 0.25rem; /* 4px */
@media (prefers-color-scheme: light) {
.file-diff__top-line__bg {
background-color: #d9f4ef;
border-radius: 0.25rem; /* 4px */
}
.file-diff_top-line__character {
background-color: #99e1d3;
border-radius: 0.25rem; /* 4px */
}
.file-diff__bottom-line__bg {
background-color: #d9edff;
border-radius: 0.25rem; /* 4px */
}
.file-diff_bottom-line__character {
background-color: #b1d4f2;
border-radius: 0.25rem; /* 4px */
}
}
.file-diff_top-line__character {
background-color: color-mix(in srgb, var(--background-primary), #0fc 50%);
border-radius: 0.25rem; /* 4px */
}
@media (prefers-color-scheme: dark) {
.file-diff__top-line__bg {
background-color: #25403b;
border-radius: 0.25rem; /* 4px */
}
.file-diff__bottom-line__bg {
background-color: color-mix(in srgb, var(--background-primary), #08f 15%);
border-radius: 0.25rem; /* 4px */
}
.file-diff_top-line__character {
background-color: #236559;
border-radius: 0.25rem; /* 4px */
}
.file-diff_bottom-line__character {
background-color: color-mix(in srgb, var(--background-primary), #08f 50%);
border-radius: 0.25rem; /* 4px */
.file-diff__bottom-line__bg {
background-color: #25394b;
border-radius: 0.25rem; /* 4px */
}
.file-diff_bottom-line__character {
background-color: #2e618d;
border-radius: 0.25rem; /* 4px */
}
}
.file-diff__no-bottom-border {
@ -44,7 +68,7 @@
}
.file-diff__action-line {
color: var(--text-muted);
color: #919191;
}
/* Tailwind CSS */

View file

@ -13,7 +13,5 @@
"1.0.11": "0.15.0",
"1.0.12": "0.15.0",
"1.0.13": "0.15.0",
"1.1.0": "0.15.0",
"1.1.1": "0.15.0",
"1.1.2": "0.15.0"
"1.1.0": "0.15.0"
}