From e5bd166568f60a7b36d34468da0a4c4cbfe039c6 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 24 Jun 2025 09:26:13 +0800 Subject: [PATCH] ux: add icon to `Add To Ignore` panel Signed-off-by: leo --- src/Models/GitIgnoreFile.cs | 2 +- src/Resources/Icons.axaml | 1 + src/Views/AddToIgnore.axaml | 25 ++++++++++++++++++------- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/Models/GitIgnoreFile.cs b/src/Models/GitIgnoreFile.cs index 61345021..31bd9f3a 100644 --- a/src/Models/GitIgnoreFile.cs +++ b/src/Models/GitIgnoreFile.cs @@ -8,7 +8,7 @@ namespace SourceGit.Models public static readonly List Supported = [new(true), new(false)]; public bool IsShared { get; set; } - public string File => IsShared ? ".gitignore" : "$GIT_DIR/info/exclude"; + public string File => IsShared ? ".gitignore" : "/info/exclude"; public string Desc => IsShared ? "Shared" : "Private"; public GitIgnoreFile(bool isShared) diff --git a/src/Resources/Icons.axaml b/src/Resources/Icons.axaml index 001c7ee7..1a0adb32 100644 --- a/src/Resources/Icons.axaml +++ b/src/Resources/Icons.axaml @@ -93,6 +93,7 @@ M512 0a512 512 0 01512 512 57 57 0 01-114 0 398 398 0 10-398 398 57 57 0 010 114A512 512 0 01512 0zm367 600 121 120a57 57 0 01-80 81l-40-40V967a57 57 0 01-50 57l-7 0a57 57 0 01-57-57v-205l-40 40a57 57 0 01-75 5l-5-5a57 57 0 01-0-80l120-121a80 80 0 01113-0zM512 272a57 57 0 0157 57V499h114a57 57 0 0156 50L740 556a57 57 0 01-57 57H512a57 57 0 01-57-57v-228a57 57 0 0150-57L512 272z M640 96c-158 0-288 130-288 288 0 17 3 31 5 46L105 681 96 691V928h224v-96h96v-96h96v-95c38 18 82 31 128 31 158 0 288-130 288-288s-130-288-288-288zm0 64c123 0 224 101 224 224s-101 224-224 224a235 235 0 01-109-28l-8-4H448v96h-96v96H256v96H160v-146l253-254 12-11-3-17C419 417 416 400 416 384c0-123 101-224 224-224zm64 96a64 64 0 100 128 64 64 0 100-128z M544 85c49 0 90 37 95 85h75a96 96 0 0196 89L811 267a32 32 0 01-28 32L779 299a32 32 0 01-32-28L747 267a32 32 0 00-28-32L715 235h-91a96 96 0 01-80 42H395c-33 0-62-17-80-42L224 235a32 32 0 00-32 28L192 267v576c0 16 12 30 28 32l4 0h128a32 32 0 0132 28l0 4a32 32 0 01-32 32h-128a96 96 0 01-96-89L128 843V267a96 96 0 0189-96L224 171h75a96 96 0 0195-85h150zm256 256a96 96 0 0196 89l0 7v405a96 96 0 01-89 96L800 939h-277a96 96 0 01-96-89L427 843v-405a96 96 0 0189-96L523 341h277zm-256-192H395a32 32 0 000 64h150a32 32 0 100-64z + M470 722q-23 3-43 3T384 722v-150l-106 106q-34-26-60-59L324 512H174q-3-23-3-43t3-42h150L218 320q16-20 28-32t32-27L384 367V217q23-4 43-4t43 4v150l106-106q34 26 60 59l-106 107h150q3 22 3 42T680 512h-150l106 107q-16 20-28 32t-32 27l-106-106v150zM0 811q0-36 25-61t61-25 61 25 25 61-25 61-61 25-61-25T0 811z m186 532 287 0 0 287c0 11 9 20 20 20s20-9 20-20l0-287 287 0c11 0 20-9 20-20s-9-20-20-20l-287 0 0-287c0-11-9-20-20-20s-20 9-20 20l0 287-287 0c-11 0-20 9-20 20s9 20 20 20z M432 0h160c27 0 48 21 48 48v336h175c36 0 53 43 28 68L539 757c-15 15-40 15-55 0L180 452c-25-25-7-68 28-68H384V48c0-27 21-48 48-48zm592 752v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h293l98 98c40 40 105 40 145 0l98-98H976c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z M592 768h-160c-27 0-48-21-48-48V384h-175c-36 0-53-43-28-68L485 11c15-15 40-15 55 0l304 304c25 25 7 68-28 68H640v336c0 27-21 48-48 48zm432-16v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h272v16c0 62 50 112 112 112h160c62 0 112-50 112-112v-16h272c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z diff --git a/src/Views/AddToIgnore.axaml b/src/Views/AddToIgnore.axaml index 9af53f58..1e8a7195 100644 --- a/src/Views/AddToIgnore.axaml +++ b/src/Views/AddToIgnore.axaml @@ -21,24 +21,35 @@ Height="28" CornerRadius="3" Text="{Binding Pattern, Mode=TwoWay}" - v:AutoFocusBehaviour.IsEnabled="True"/> + v:AutoFocusBehaviour.IsEnabled="True"> + + + + - - - - - + + + + + + + + +