Skip to content

Commit 8409c46

Browse files
committed
ux: move Show relative time in graph to Preferences dialog
Signed-off-by: leo <longshuang@msn.cn>
1 parent a132ae8 commit 8409c46

6 files changed

Lines changed: 14 additions & 16 deletions

File tree

src/Resources/Icons.axaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@
129129
<StreamGeometry x:Key="Icons.Stashes">M961 320 512 577 63 320 512 62l449 258zM512 628 185 442 63 512 512 770 961 512l-123-70L512 628zM512 821 185 634 63 704 512 962l449-258L839 634 512 821z</StreamGeometry>
130130
<StreamGeometry x:Key="Icons.Stashes.Add">M363 491h64v107h107v64h-107v107h-64v-107h-107v-64h107v-107zm149-235 256 128-256 128-64-32v-11H427l-171-85 256-128zm256 384-256 128-64-32v-53h64l0 0 0-0h43v-21l128-64 85 43zm0-128-213 107v-43h-107v-53l64 32 171-85 85 43zm-512 0 85-43v85l-85-43z</StreamGeometry>
131131
<StreamGeometry x:Key="Icons.Statistics">M447 561a26 26 0 0126 26v171H421v-171a26 26 0 0126-26zm-98 65a26 26 0 0126 26v104H323v-104a26 26 0 0126-26zm0 0M561 268a32 32 0 0132 30v457h-65V299a32 32 0 0132-32zm0 0M675 384a26 26 0 0126 26v348H649v-350a26 26 0 0126-24zm0 0M801 223v579H223V223h579M805 171H219A49 49 0 00171 219v585A49 49 0 00219 853h585A49 49 0 00853 805V219A49 49 0 00805 171z</StreamGeometry>
132-
<StreamGeometry x:Key="Icons.Stopwatch">M576 160H448c-18 0-32-14-32-32s14-32 32-32h128c18 0 32 14 32 32s-14 32-32 32zm243 186 36-36c13-13 13-33 0-45s-33-13-45 0l-33 33C708 233 614 192 512 192c-212 0-384 172-384 384s172 384 384 384 384-172 384-384c0-86-29-166-77-230zM544 894V864c0-18-14-32-32-32s-32 14-32 32v30C329 879 209 759 194 608H224c18 0 32-14 32-32s-14-32-32-32h-30C209 393 329 273 480 258V288c0 18 14 32 32 32s32-14 32-32v-30C695 273 815 393 830 544H800c-18 0-32 14-32 32s14 32 32 32h30C815 759 695 879 544 894zm108-471-160 128c-14 11-16 31-5 45 6 8 16 12 25 12 7 0 14-2 20-7l160-128c14-11 16-31 5-45-11-14-31-16-45-5z</StreamGeometry>
133132
<StreamGeometry x:Key="Icons.Submodule">M558 545 790 403c24-15 31-47 16-71-15-24-46-31-70-17L507 457 277 315c-24-15-56-7-71 17-15 24-7 56 17 71l232 143V819c0 28 23 51 51 51 28 0 51-23 51-51V545h0zM507 0l443 256v512L507 1024 63 768v-512L507 0z</StreamGeometry>
134133
<StreamGeometry x:Key="Icons.Submodule.Add">M770 320a41 41 0 00-56-14l-252 153L207 306a41 41 0 10-43 70l255 153 2 296a41 41 0 0082 0l-2-295 255-155a41 41 0 0014-56zM481 935a42 42 0 01-42 0L105 741a42 42 0 01-21-36v-386a42 42 0 0121-36L439 89a42 42 0 0142 0l335 193a42 42 0 0121 36v87h84v-87a126 126 0 00-63-109L523 17a126 126 0 00-126 0L63 210a126 126 0 00-63 109v386a126 126 0 0063 109l335 193a126 126 0 00126 0l94-54-42-72zM1029 700h-126v-125a42 42 0 00-84 0v126h-126a42 42 0 000 84h126v126a42 42 0 1084 0v-126h126a42 42 0 000-84z</StreamGeometry>
135134
<StreamGeometry x:Key="Icons.Submodules">M416 587c21 0 37 17 37 37v299A37 37 0 01416 960h-299a37 37 0 01-37-37v-299c0-21 17-37 37-37h299zm448 0c21 0 37 17 37 37v299A37 37 0 01864 960h-299a37 37 0 01-37-37v-299c0-21 17-37 37-37h299zM758 91l183 189a37 37 0 010 52l-182 188a37 37 0 01-53 1l-183-189a37 37 0 010-52l182-188a37 37 0 0153-1zM416 139c21 0 37 17 37 37v299A37 37 0 01416 512h-299a37 37 0 01-37-37v-299c0-21 17-37 37-37h299z</StreamGeometry>

src/Resources/Locales/en_US.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@
666666
<x:String x:Key="Text.Preferences.General.ShowChangesPageByDefault" xml:space="preserve">Show `LOCAL CHANGES` page by default</x:String>
667667
<x:String x:Key="Text.Preferences.General.ShowChangesTabInCommitDetailByDefault" xml:space="preserve">Show `CHANGES` tab in commit detail by default</x:String>
668668
<x:String x:Key="Text.Preferences.General.ShowChildren" xml:space="preserve">Show children in the commit details</x:String>
669+
<x:String x:Key="Text.Preferences.General.ShowRelativeTimeInGraph" xml:space="preserve">Show relative time in commit graph</x:String>
669670
<x:String x:Key="Text.Preferences.General.ShowTagsInGraph" xml:space="preserve">Show tags in commit graph</x:String>
670671
<x:String x:Key="Text.Preferences.General.SubjectGuideLength" xml:space="preserve">Subject Guide Length</x:String>
671672
<x:String x:Key="Text.Preferences.General.Use24Hours" xml:space="preserve">24-Hours</x:String>
@@ -817,7 +818,6 @@
817818
<x:String x:Key="Text.Repository.Tags.OrderByName" xml:space="preserve">By Name</x:String>
818819
<x:String x:Key="Text.Repository.Tags.Sort" xml:space="preserve">Sort</x:String>
819820
<x:String x:Key="Text.Repository.Terminal" xml:space="preserve">Open in Terminal</x:String>
820-
<x:String x:Key="Text.Repository.UseRelativeTimeInGraph" xml:space="preserve">Use relative time</x:String>
821821
<x:String x:Key="Text.Repository.ViewLogs" xml:space="preserve">View Logs</x:String>
822822
<x:String x:Key="Text.Repository.Visit" xml:space="preserve">Visit '{0}' in Browser</x:String>
823823
<x:String x:Key="Text.Repository.Worktrees" xml:space="preserve">WORKTREES</x:String>

src/Resources/Locales/zh_CN.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@
670670
<x:String x:Key="Text.Preferences.General.ShowChangesPageByDefault" xml:space="preserve">默认显示【本地更改】页</x:String>
671671
<x:String x:Key="Text.Preferences.General.ShowChangesTabInCommitDetailByDefault" xml:space="preserve">在提交详情页默认打开【变更对比】标签页</x:String>
672672
<x:String x:Key="Text.Preferences.General.ShowChildren" xml:space="preserve">在提交详情页中显示子提交列表</x:String>
673+
<x:String x:Key="Text.Preferences.General.ShowRelativeTimeInGraph" xml:space="preserve">在提交路线图中显示相对时间</x:String>
673674
<x:String x:Key="Text.Preferences.General.ShowTagsInGraph" xml:space="preserve">在提交路线图中显示标签</x:String>
674675
<x:String x:Key="Text.Preferences.General.SubjectGuideLength" xml:space="preserve">SUBJECT字数检测</x:String>
675676
<x:String x:Key="Text.Preferences.General.Use24Hours" xml:space="preserve">24小时制</x:String>

src/Resources/Locales/zh_TW.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@
670670
<x:String x:Key="Text.Preferences.General.ShowChangesPageByDefault" xml:space="preserve">預設顯示 [本機變更] 頁面</x:String>
671671
<x:String x:Key="Text.Preferences.General.ShowChangesTabInCommitDetailByDefault" xml:space="preserve">在提交詳細資訊頁面預設顯示 [變更對比]</x:String>
672672
<x:String x:Key="Text.Preferences.General.ShowChildren" xml:space="preserve">在提交詳細資訊中顯示後續提交</x:String>
673+
<x:String x:Key="Text.Preferences.General.ShowRelativeTimeInGraph" xml:space="preserve">在提交路線圖中顯示相對時間</x:String>
673674
<x:String x:Key="Text.Preferences.General.ShowTagsInGraph" xml:space="preserve">在路線圖中顯示標籤</x:String>
674675
<x:String x:Key="Text.Preferences.General.SubjectGuideLength" xml:space="preserve">提交標題字數偵測</x:String>
675676
<x:String x:Key="Text.Preferences.General.Use24Hours" xml:space="preserve">24 小時制</x:String>

src/Views/Preferences.axaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<TabItem.Header>
4848
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preferences.General}"/>
4949
</TabItem.Header>
50-
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
50+
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
5151
<TextBlock Grid.Row="0" Grid.Column="0"
5252
Text="{DynamicResource Text.Preferences.General.Locale}"
5353
HorizontalAlignment="Right"
@@ -162,21 +162,26 @@
162162
IsChecked="{Binding ShowTagsInGraph, Mode=TwoWay}"/>
163163

164164
<CheckBox Grid.Row="9" Grid.Column="1"
165+
Height="32"
166+
Content="{DynamicResource Text.Preferences.General.ShowRelativeTimeInGraph}"
167+
IsChecked="{Binding DisplayTimeAsPeriodInHistories, Mode=TwoWay}"/>
168+
169+
<CheckBox Grid.Row="10" Grid.Column="1"
165170
Height="32"
166171
Content="{DynamicResource Text.Preferences.General.ShowChildren}"
167172
IsChecked="{Binding ShowChildren, Mode=TwoWay}"/>
168173

169-
<CheckBox Grid.Row="10" Grid.Column="1"
174+
<CheckBox Grid.Row="11" Grid.Column="1"
170175
Height="32"
171176
Content="{DynamicResource Text.Preferences.General.EnableCompactFolders}"
172177
IsChecked="{Binding EnableCompactFoldersInChangesTree, Mode=TwoWay}"/>
173178

174-
<CheckBox Grid.Row="11" Grid.Column="1"
179+
<CheckBox Grid.Row="12" Grid.Column="1"
175180
Height="32"
176181
Content="{DynamicResource Text.Preferences.General.UseGitHubStyleAvatar}"
177182
IsChecked="{Binding UseGitHubStyleAvatar, Mode=TwoWay}"/>
178183

179-
<CheckBox Grid.Row="12" Grid.Column="1"
184+
<CheckBox Grid.Row="13" Grid.Column="1"
180185
Height="32"
181186
Content="{DynamicResource Text.Preferences.General.Check4UpdatesOnStartup}"
182187
IsVisible="{x:Static s:App.IsCheckForUpdateCommandVisible}"

src/Views/Repository.axaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,10 @@
9393
</ListBox.ItemsPanel>
9494

9595
<ListBoxItem BorderThickness="0">
96-
<Grid Classes="view_mode" ColumnDefinitions="Auto,*,Auto,Auto">
96+
<Grid Classes="view_mode" ColumnDefinitions="Auto,*,Auto">
9797
<Path Grid.Column="0" Classes="icon" Data="{StaticResource Icons.Histories}"/>
9898
<TextBlock Grid.Column="1" Classes="header" Text="{DynamicResource Text.Histories}"/>
99-
<ToggleButton Grid.Column="2"
100-
Classes="line_path"
101-
Width="26" Height="26"
102-
Background="Transparent"
103-
IsChecked="{Binding Source={x:Static vm:Preferences.Instance}, Path=DisplayTimeAsPeriodInHistories, Mode=TwoWay}"
104-
ToolTip.Tip="{DynamicResource Text.Repository.UseRelativeTimeInGraph}">
105-
<Path Width="12" Height="12" Data="{StaticResource Icons.Stopwatch}"/>
106-
</ToggleButton>
107-
<Button Grid.Column="3"
99+
<Button Grid.Column="2"
108100
Classes="icon_button"
109101
Width="26" Height="26"
110102
Click="OnOpenAdvancedHistoriesOption"

0 commit comments

Comments
 (0)