Commit graph

52 commits

Author SHA1 Message Date
friebetill
b1883dc436 Add 'Find sync conflicts and merge' command 2023-03-27 00:05:36 +08:00
friebetill
6dbb36a16a Register view with registerView
If we don't register the view, as before, then the workspace won't
be able to properly serialize it.
2023-03-26 18:54:18 +08:00
friebetill
5f7503598a Update test 2023-02-22 12:16:26 +08:00
friebetill
7dfff85dd1 Add semicolons to prevent difficult to debug bugs 2023-02-22 12:14:02 +08:00
friebetill
dee8138564 Remove file-diff prefix of commands
Obsidian will automatically prefix the command id with the plugin id,
we don't need to do it ourself.
2023-02-22 11:58:13 +08:00
friebetill
705176ef6b Don't overwrite Obsidian CSS in a plugin 2023-02-22 11:56:48 +08:00
friebetill
cd0be499d5 Use existing sleep function 2023-02-22 11:49:20 +08:00
friebetill
e56eac7508 Improve UX by opening in active leaf 2023-02-15 21:45:30 +08:00
friebetill
81c8172a11 Improve UX by opening file 1 after deleting file 2 2023-02-15 21:44:43 +08:00
friebetill
8306c36722 Improve variable name 2023-02-15 21:16:48 +08:00
friebetill
9e677a94b2 Use unused variable 2023-02-15 21:16:19 +08:00
friebetill
a240ccfee7 Fix bug where lines where skipped 2023-02-15 20:24:22 +08:00
friebetill
8454d68b54 Fix old name of view type 2023-02-15 20:23:46 +08:00
friebetill
941c5f0c80 Remove edge cases by add trailing new line
This solves some problems for my test cases, but not sure if this
is bulletproof.
2023-02-15 19:58:17 +08:00
friebetill
cc1ffac60b Reactivate ignoring line breaks at the end of the file 2023-02-14 12:31:15 +08:00
friebetill
428d9b4682 Show all lines in diff
This fixes a bug where the line count was not caculated correctly.
2023-02-14 12:13:55 +08:00
friebetill
add2cb75b4 Ignore whitespaces at the end of each line 2023-02-14 12:13:38 +08:00
friebetill
fad48c595c Fix bug on deleting modal 2023-02-11 12:53:42 +08:00
friebetill
5065a53482 Streamline style of modals 2023-02-11 10:47:24 +08:00
friebetill
c3b005e909 Fix bug when file 2 has multiple lines 2023-02-10 12:25:32 +08:00
friebetill
56b8e2d7b0 Refresh state when one of the files changes 2023-02-10 11:49:02 +08:00
friebetill
66b7f06154 Fix bug when replacing multiple lines 2023-02-10 11:37:52 +08:00
friebetill
de98f88a83 Make colors easily adjustable
Add prefix to avoid mixing styles.
2023-02-10 11:21:53 +08:00
friebetill
a7e1afcb52 Add "Accept None" button 2023-02-07 16:09:41 +08:00
friebetill
f0b2c3a20b Fix accept from one file 2023-02-07 16:02:23 +08:00
friebetill
37319e5c5d Fix showing duplicate lines 2023-02-07 16:01:58 +08:00
friebetill
525b7bf9ae Scroll automatically to differences 2023-02-05 16:34:39 +08:00
friebetill
956aa853c1 Remove edge cases with trailing newlines 2023-02-04 15:05:24 +08:00
friebetill
2bd2e46aa2 Fix bug when accepting a merge 2023-02-04 15:05:03 +08:00
friebetill
8f1f33d52d Handle empty lines at the end 2023-02-04 12:37:33 +08:00
friebetill
572cfbc790 Wait for the dispatch event to be handled 2023-02-04 09:51:46 +08:00
friebetill
0de8d41f77 Add warning modal for irreversible merge options
In a later version this merge options could be make reversible
2023-02-04 09:43:11 +08:00
friebetill
c7426d1c3f Sort files by last modification time 2023-02-03 20:00:08 +08:00
friebetill
1b298ed562 Reactivate deletion of file in delete file modal 2023-02-03 16:19:26 +08:00
friebetill
21d2ea70df Counteract gravity pull 2023-02-03 16:12:35 +08:00
friebetill
3b8500a9bd Show a delete modal when all merge conflicts are solved 2023-02-03 12:49:55 +08:00
friebetill
81754da8b9 Fix action button functionality 2023-02-03 00:15:24 +08:00
friebetill
4d0da6425b Remove more linter warnings 2023-02-02 23:32:22 +08:00
friebetill
a01e69a66f Follow guide https://bit.ly/3JIZGTE to improve Prettier + ESLint 2023-02-02 22:36:11 +08:00
friebetill
8d864b7d8f Add command to make merge options explicit
The merge options are destructive and should only be shown with
a warning.
2023-02-02 20:48:52 +08:00
friebetill
02ab435744 Improve slighty code 2023-02-02 18:25:10 +08:00
friebetill
e4fbea864f Simplify structure 2023-02-02 18:09:24 +08:00
friebetill
e5c4c54e3e Display emptys lines correctly 2023-02-02 03:12:38 +08:00
friebetill
b6a7ae5428 Show correct diff for the files
File 1:
a
b
c

File 2:
b
2023-02-01 17:57:09 +08:00
friebetill
b5b9bbc385 Show only two action buttons with one file change 2023-02-01 15:47:24 +08:00
friebetill
5e0021f2ef Add functionality to the buttons 2023-01-31 16:38:17 +08:00
friebetill
81c2e0fb68 Show action line 2023-01-29 23:02:40 +08:00
friebetill
4f816cf6c6 Add simple viewer to show the difference 2023-01-28 19:08:58 +08:00
friebetill
1318e87032 Get difference between the two files 2023-01-28 18:20:40 +08:00
friebetill
6ff3d6cf50 Remove active file from selectable files 2023-01-28 17:59:29 +08:00