Skip to content

Commit 1964696

Browse files
committed
Added time to the activity history
1 parent 374e635 commit 1964696

File tree

2 files changed

+30
-17
lines changed

2 files changed

+30
-17
lines changed

src/Keyden.App/ViewModels/ActivityViewModel.cs

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
using DynamicData;
33

4+
using System;
45
using System.Collections.ObjectModel;
56

67
namespace Keyden.ViewModels;
@@ -14,10 +15,13 @@ public enum ActivityImportance
1415

1516
public struct ActivityItem
1617
{
18+
public ActivityItem() { }
19+
1720
public required string Icon { get; set; }
1821
public required string Title { get; set; }
1922
public required string Description { get; set; }
2023
public required ActivityImportance Importance { get; set; }
24+
public DateTime When { get; set; } = DateTime.Now;
2125
}
2226

2327
public class ActivityViewModel : ViewModelBase
@@ -48,22 +52,22 @@ public DesignActivityViewModel()
4852
{
4953
Activities.AddRange(
5054
[
51-
new (){ Icon = "fa-sync", Title = "Test", Description = "This is a test", Importance = ActivityImportance.Normal },
52-
new (){ Icon = "fa-sync", Title = "Test1", Description = "This is a really long test message to just try and see something about this bluh", Importance = ActivityImportance.Normal },
53-
new (){ Icon = "fa-sync", Title = "Test2", Description = "This is a test", Importance = ActivityImportance.Normal },
54-
new (){ Icon = "fa-sync", Title = "Test3", Description = "This is a test", Importance = ActivityImportance.Normal },
55-
new (){ Icon = "fa-sync", Title = "Test4", Description = "This is a test", Importance = ActivityImportance.Normal },
56-
new (){ Icon = "fa-sync", Title = "Test5", Description = "This is a test", Importance = ActivityImportance.Normal },
57-
new (){ Icon = "fa-sync", Title = "Test6", Description = "This is a test", Importance = ActivityImportance.Normal },
58-
new (){ Icon = "fa-sync", Title = "Test7", Description = "This is a test", Importance = ActivityImportance.Normal },
59-
new (){ Icon = "fa-sync", Title = "Test8", Description = "This is a test", Importance = ActivityImportance.Normal },
60-
new (){ Icon = "fa-sync", Title = "Test9", Description = "This is a test", Importance = ActivityImportance.Normal },
61-
new (){ Icon = "fa-sync", Title = "Testa", Description = "This is a test", Importance = ActivityImportance.Normal },
62-
new (){ Icon = "fa-sync", Title = "Testb", Description = "This is a test", Importance = ActivityImportance.Normal },
63-
new (){ Icon = "fa-sync", Title = "Testc", Description = "This is a test", Importance = ActivityImportance.Normal },
64-
new (){ Icon = "fa-sync", Title = "Testd", Description = "This is a test", Importance = ActivityImportance.Normal },
65-
new (){ Icon = "fa-sync", Title = "Teste", Description = "This is a test", Importance = ActivityImportance.Normal },
66-
new (){ Icon = "fa-sync", Title = "Testf", Description = "This is a test", Importance = ActivityImportance.Normal },
55+
new (){ When = new(1998, 11, 19, 08, 47, 01), Icon = "fa-sync", Title = "Test", Description = "This is a test", Importance = ActivityImportance.Normal },
56+
new (){ When = new(2004, 11, 16, 02, 17, 02), Icon = "fa-sync", Title = "Test1", Description = "This is a really long test message to just try and see something about this bluh", Importance = ActivityImportance.Normal },
57+
new (){ When = new(2006, 06, 01, 06, 27, 03), Icon = "fa-sync", Title = "Test2", Description = "This is a test", Importance = ActivityImportance.Normal },
58+
new (){ When = new(2007, 10, 10, 08, 02, 04), Icon = "fa-sync", Title = "Test3", Description = "This is a test", Importance = ActivityImportance.Normal },
59+
new (){ When = new(2012, 09, 14, 08, 47, 21), Icon = "fa-sync", Title = "Test4", Description = "This is a test", Importance = ActivityImportance.Normal },
60+
new (){ When = new(2020, 03, 23, 16, 20, 05), Icon = "fa-sync", Title = "Test5", Description = "This is a test", Importance = ActivityImportance.Normal },
61+
new (){ When = new(2021, 11, 28, 12, 08, 53), Icon = "fa-sync", Title = "Test6", Description = "This is a test", Importance = ActivityImportance.Normal },
62+
new (){ When = new(2021, 12, 28, 11, 33, 53), Icon = "fa-sync", Title = "Test7", Description = "This is a test", Importance = ActivityImportance.Normal },
63+
new (){ When = new(2022, 11, 10, 09, 52, 53), Icon = "fa-sync", Title = "Test8", Description = "This is a test", Importance = ActivityImportance.Normal },
64+
new (){ When = new(2022, 10, 18, 07, 28, 53), Icon = "fa-sync", Title = "Test9", Description = "This is a test", Importance = ActivityImportance.Normal },
65+
new (){ When = new(2023, 09, 27, 15, 45, 37), Icon = "fa-sync", Title = "Testa", Description = "This is a test", Importance = ActivityImportance.Normal },
66+
new (){ When = new(2023, 11, 28, 07, 02, 53), Icon = "fa-sync", Title = "Testb", Description = "This is a test", Importance = ActivityImportance.Normal },
67+
new (){ When = new(2024, 10, 30, 07, 58, 00), Icon = "fa-sync", Title = "Testc", Description = "This is a test", Importance = ActivityImportance.Normal },
68+
new (){ When = new(2024, 11, 27, 22, 32, 34), Icon = "fa-sync", Title = "Testd", Description = "This is a test", Importance = ActivityImportance.Normal },
69+
new (){ When = new(2024, 11, 28, 07, 00, 01), Icon = "fa-sync", Title = "Teste", Description = "This is a test", Importance = ActivityImportance.Normal },
70+
new (){ When = new(2024, 11, 28, 07, 02, 53), Icon = "fa-sync", Title = "Testf", Description = "This is a test", Importance = ActivityImportance.Normal },
6771
]);
6872
}
6973
}

src/Keyden.App/Views/ActivityView.axaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
<Grid.ColumnDefinitions>
2424
<ColumnDefinition Width="32"/>
2525
<ColumnDefinition />
26+
<ColumnDefinition Width="auto"/>
2627
</Grid.ColumnDefinitions>
2728
<Grid.RowDefinitions>
28-
<RowDefinition MinHeight="16" />
29+
<RowDefinition MinHeight="16"/>
2930
<RowDefinition MinHeight="16"/>
3031
</Grid.RowDefinitions>
3132

@@ -36,11 +37,19 @@
3637
VerticalAlignment="Top"
3738
HorizontalAlignment="Left"/>
3839
</Border>
40+
<TextBlock Grid.Column="2" Grid.Row="0"
41+
FontSize="10" FontWeight="Normal"
42+
Padding="0,4,0,0"
43+
Opacity="0.5"
44+
Text="{Binding When}"
45+
VerticalAlignment="Top"
46+
HorizontalAlignment="Right"/>
3947
<TextBlock Grid.Column="1" Grid.Row="0"
4048
FontSize="16" FontWeight="SemiBold"
4149
Text="{Binding Title}"
4250
VerticalAlignment="Center"/>
4351
<TextBlock Grid.Column="1" Grid.Row="1"
52+
Grid.ColumnSpan="2"
4453
Text="{Binding Description}"
4554
VerticalAlignment="Top"
4655
TextWrapping="Wrap"/>

0 commit comments

Comments
 (0)