Commit graph

98 commits

Author SHA1 Message Date
leo
6882ae069f
enhance: do not show tooltip if the ower window is deactived (#1218)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-22 10:22:02 +08:00
leo
06d033464d
code_style: move commit link parser to Models.CommitLink.Get
Signed-off-by: leo <longshuang@msn.cn>
2025-04-21 17:27:07 +08:00
leo
750ca8ec61
refactor: use custom view locator to create new window/dialog (#1216)
Signed-off-by: leo <longshuang@msn.cn>
(cherry picked from commit 3e6f2b25f15b263e2b84922abc5cf6d621d62a83)
2025-04-21 15:32:21 +08:00
leo
413669741d
enhance: ensure sourcegit_rebase_jobs.json only being used when orig-head and onto are both matched
Signed-off-by: leo <longshuang@msn.cn>
2025-04-18 12:49:19 +08:00
leo
03216fc31e
code_style: run dotnet format and re-order codes
Signed-off-by: leo <longshuang@msn.cn>
2025-04-15 16:30:50 +08:00
leo
3cc463d24b
enhance: use Environment.Exit(0) instead of IClassicDesktopStyleApplicationLifetime.Shutdown to stop for non-first instance of SourceGit
Signed-off-by: leo <longshuang@msn.cn>
2025-04-15 16:24:48 +08:00
leo
c4c04b8b01
enhance: bring window into view after receive IPC message
Signed-off-by: leo <longshuang@msn.cn>
2025-04-15 10:19:57 +08:00
leo
7d20f97f4e
code_review: PR #1185
- make `SourceGit` running in singleton mode
- `TrySendArgsToExistingInstance` should not be called before `BuildAvaloniaApp().StartWithClassicDesktopLifetime(args)` since we may want to launch `SourceGit` as a core editor.
- avoid `preference.json` to be saved by multiple instances.
- move IPC code to models.

Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 22:03:51 +08:00
Massimo
09c0edef8e
feat: implement IPC for opening repositories in new tabs (#1185)
* refactor: improve diff handling for EOL changes and enhance text diff display

- Updated `Diff.cs` to streamline whitespace handling in diff arguments.
- Enhanced `DiffContext.cs` to check for EOL changes when old and new hashes differ, creating a text diff if necessary.
- Added support for showing end-of-line symbols in `TextDiffView.axaml.cs` options.

* localization: update translations to include EOF handling in ignore whitespace messages

- Modified the ignore whitespace text in multiple language files to specify that EOF changes are also ignored.
- Ensured consistency across all localization files for the patch application feature.

* revert: Typo in DiffResult comment

* revert: update diff arguments to ignore CR at EOL in whitespace handling (like before changes)

* revert: update translations to remove EOF references in Text.Apply.IgnoreWS and fixed typo in Text.Diff.IgnoreWhitespace (EOF => EOL)

* feat: add workspace-specific default clone directory functionality

- Implemented logic in Clone.cs to set ParentFolder based on the active workspace's DefaultCloneDir if available, falling back to the global GitDefaultCloneDir.
- Added DefaultCloneDir property to Workspace.cs to store the default clone directory for each workspace.
- Updated ConfigureWorkspace.axaml to include a TextBox and Button for setting the DefaultCloneDir in the UI.
- Implemented folder selection functionality in ConfigureWorkspace.axaml.cs to allow users to choose a directory for cloning.
- This closes issue #1145

* feat: implement IPC for opening repositories in new tabs

- Added functionality to send repository paths to an existing instance of the application using named pipes.
- Introduced a new preference option to open repositories in a new tab instead of a new window.
- Updated UI to include a checkbox for the new preference.
- Enhanced the handling of IPC server lifecycle based on the new preference setting.
- This closes issue #1184

---------

Co-authored-by: mpagani <massimo.pagani@unitec-group.com>
2025-04-14 19:16:15 +08:00
Gadfly
1575ae977e
fix: improve font family name handling by collapsing multiple spaces (#1131) 2025-03-27 20:22:46 +08:00
leo
f37ac904b9
enhance: do not create crash log for unobserved task exceptions (#1121)
Signed-off-by: leo <longshuang@msn.cn>
2025-03-25 10:33:39 +08:00
leo
822452a20c
enhance: show inner exception message if possible when check update failed
Signed-off-by: leo <longshuang@msn.cn>
2025-03-18 15:55:32 +08:00
leo
67f4330dd4
code_style: arrange methods in App.axaml.cs
Signed-off-by: leo <longshuang@msn.cn>
2025-03-13 15:23:43 +08:00
leo
9560496c7b
code_review: PR #1092
- Remove `SourceGit.ViewModels.Preference.FixFontFamilyName` (it is not necessary any more)
- Use `string.Join` instead of `StringBuilder` to make the logic more clear

Signed-off-by: leo <longshuang@msn.cn>
2025-03-13 15:17:20 +08:00
Gadfly
b9b684a83d
fix: improve font string processing in SetFonts method (#1092) 2025-03-13 15:05:30 +08:00
leo
0860245674
code_style: simple window do not using DataContext
Signed-off-by: leo <longshuang@msn.cn>
2025-03-07 15:44:50 +08:00
GadflyFang
942f349275
enhance: enhance crash logging with detailed system info (#943)
- Enhance crash logging by adding detailed system and process information, including thread name, user, app start time, exception time, and memory usage.
2025-02-06 10:22:34 +08:00
wl2776
6e5626f267
fix: several typos in source code (#895) 2025-01-13 10:11:28 +08:00
leo
810568e179
fix: typo 2025-01-09 18:14:11 +08:00
leo
b06d14fec7
refactor: SourceGit.App 2025-01-09 18:12:11 +08:00
leo
a3d744f426
code_style: run dotnet format 2025-01-08 21:44:35 +08:00
leo
c768b1750e
feature: use -p:DisableUpdateDetection=true to disable built-in update detection feature (#819) 2024-12-17 10:26:35 +08:00
leo
0160600c75
revert: changes about SystemAccentColor (#776)
This reverts commit db8ee3410b.
2024-12-03 09:27:16 +08:00
leo
db8ee3410b
refactor: users should change the SystemAccentColor from system-wide settings 2024-11-29 09:59:07 +08:00
leo
a53787c754
fix: git rebase --continue fail (#693)
* fix the exit code when start `SourceGit` as core editor (rebasing).
* redesign the layout of working copy page for in-progress states.

Signed-off-by: leo <longshuang@msn.cn>
2024-11-14 19:19:58 +08:00
leo
ba3c72585d
enhance: use Inter as default font for all platforms (#639)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-01 17:54:21 +08:00
leo
1ba294a07b
refactor: move auto-fetch from global preference to repository settings 2024-09-26 10:50:21 +08:00
leo
6b44fd4416
code_style: remove unused codes 2024-09-24 18:22:18 +08:00
leo
6151f4dc5f
refactor: a new way to test if this app should be launched as a SSH askpass client 2024-09-24 15:53:36 +08:00
leo
6932ce44a9
fix: new window opened on failing fetch due to missing StrictHostKeyChecking=accept-new for repo remote without private ssh key (#485) 2024-09-18 17:19:55 +08:00
leo
17dd32456b
refactor: add Avalonia.Fonts.Inter as built-in default font (#447) 2024-09-09 10:01:41 +08:00
leo
6688319714
fix: failed get default font on some Linux distro (#447) 2024-09-08 18:29:05 +08:00
leo
998230edff
code_style: simplify static commands used by styles and main menu; run dotnet format 2024-09-02 20:27:12 +08:00
leo
9fe8ffcea9
code_review: PR #436
It's ok to call `Save()` multiple times after property of `ViewModels.Preference` changed immediately. If we delay the saving operation 3 seconds after the property changed event, we reduce the times calling `Save`, but the issue metioned in #436 may still exists.
2024-09-02 12:20:11 +08:00
Gadfly
c85293c86a
enhance: support save RepositoryNode changes instantly 2024-09-02 12:05:24 +08:00
Gadfly
28b6ce4993
enhance: save preference.json instantly 2024-09-02 10:51:48 +08:00
leo
3ea80d99f1
code_style: remove unused namespace using and run dotnet format 2024-08-28 13:42:25 +08:00
leo
7a2722e928
feature: add a context menu to copy entire content of SelectableTextBlock (#394) 2024-08-25 15:11:31 +08:00
leo
d66053a42d
code_style: run dotnet format 2024-08-20 11:53:37 +08:00
leo
ecc1414006
fix: empty monospace font with non-empty default font fallback issue 2024-08-19 19:18:31 +08:00
leo
9057b71f2d
refactor: rewrite the font configuration (#366)
* input font name directly instead of a font picker because localized font family name is not supported by Avalonia
* fallback monospace font to default font
* remove unused code
2024-08-19 17:14:41 +08:00
leo
24dde77548
refactor: rewrite SourceGit.App 2024-08-19 12:49:29 +08:00
leo
7fe1df20cc
refactor: delay starting background tasks
* start background task only it is needed
* solve the problem that we can not use `ViewModels.Preference.Instance` until resource ready
* remove avatar sever settings
2024-08-18 23:10:54 +08:00
leo
ff3d841d12
feature: add a menu item to open app data dir 2024-08-15 11:47:04 +08:00
leo
38665a61cb
fix: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) returns an empty string on some linux distro
* fallback the storage folder to `~/.sourcegit`
2024-08-12 21:38:11 +08:00
jacky
12451a21c4 fix: fix some typos 2024-08-02 15:40:00 +08:00
leo
f8caeceade
refactor: remove unnecessary memebers 2024-07-24 14:32:27 +08:00
leo
40d5a7c7f3
code_style: run dotnet format to apply rules 2024-07-23 13:58:57 +08:00
leo
e0319e3f9b
fix: ssh-askpass not working (#272) 2024-07-23 13:48:52 +08:00
leo
720b2b65f3
code_style: change static methods of ViewModels.Preference to member function 2024-07-22 15:34:31 +08:00