mirror of
https://github.com/friebetill/obsidian-file-diff.git
synced 2026-07-22 07:40:25 +00:00
Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d566ded402 | ||
|
|
7bd7dd41c0 | ||
|
|
185f95f30a | ||
|
|
08e488d425 | ||
|
|
ac4ea85fe0 | ||
|
|
00567dea68 | ||
|
|
ad651d827e |
6 changed files with 22 additions and 44 deletions
|
|
@ -17,7 +17,7 @@ alt="GIF of a demo show this plugin" width="900" />
|
|||
|
||||
## Motivation
|
||||
|
||||
I created this plugin because I use SyncThing and it bothered me to clean up merge conflicts by hand.
|
||||
I created this plugin because I use [SyncThing](https://syncthing.net/) and it bothered me to clean up merge conflicts by hand.
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "file-diff",
|
||||
"name": "File Diff",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.2",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Shows the differences between two files..",
|
||||
"author": "Till Friebe",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-file-diff",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.2",
|
||||
"description": "Shows the differences between two files.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ export default class FileDiffPlugin extends Plugin {
|
|||
''
|
||||
);
|
||||
const originalFile = files.find(
|
||||
(f) => f.name === originalFileName
|
||||
(f) => f.name === originalFileName && (file.parent?.path ?? "") === (f.parent?.path ?? "")
|
||||
);
|
||||
|
||||
if (originalFile) {
|
||||
|
|
|
|||
54
styles.css
54
styles.css
|
|
@ -13,48 +13,24 @@
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
@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__bg {
|
||||
background-color: color-mix(in srgb, var(--background-primary), #0fc 15%);
|
||||
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_top-line__character {
|
||||
background-color: color-mix(in srgb, var(--background-primary), #0fc 50%);
|
||||
border-radius: 0.25rem; /* 4px */
|
||||
}
|
||||
|
||||
.file-diff_top-line__character {
|
||||
background-color: #236559;
|
||||
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__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_bottom-line__character {
|
||||
background-color: color-mix(in srgb, var(--background-primary), #08f 50%);
|
||||
border-radius: 0.25rem; /* 4px */
|
||||
}
|
||||
|
||||
.file-diff__no-bottom-border {
|
||||
|
|
@ -68,7 +44,7 @@
|
|||
}
|
||||
|
||||
.file-diff__action-line {
|
||||
color: #919191;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Tailwind CSS */
|
||||
|
|
|
|||
|
|
@ -13,5 +13,7 @@
|
|||
"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.0": "0.15.0",
|
||||
"1.1.1": "0.15.0",
|
||||
"1.1.2": "0.15.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue