diff --git a/src/Artemis.UI/Screens/Plugins/PluginView.axaml b/src/Artemis.UI/Screens/Plugins/PluginView.axaml index b9dc83c55..64ef0e88c 100644 --- a/src/Artemis.UI/Screens/Plugins/PluginView.axaml +++ b/src/Artemis.UI/Screens/Plugins/PluginView.axaml @@ -19,7 +19,10 @@ Grid.RowSpan="3" VerticalAlignment="Top" /> - + + + + diff --git a/src/Artemis.UI/Screens/Settings/Account/CreatePersonalAccessTokenView.axaml.cs b/src/Artemis.UI/Screens/Settings/Account/CreatePersonalAccessTokenView.axaml.cs index 3b359d1bd..368c39351 100644 --- a/src/Artemis.UI/Screens/Settings/Account/CreatePersonalAccessTokenView.axaml.cs +++ b/src/Artemis.UI/Screens/Settings/Account/CreatePersonalAccessTokenView.axaml.cs @@ -1,7 +1,9 @@ +using Artemis.UI.Shared.Extensions; using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; using Avalonia.ReactiveUI; +using ReactiveUI; namespace Artemis.UI.Screens.Settings.Account; @@ -10,5 +12,6 @@ public partial class CreatePersonalAccessTokenView : ReactiveUserControl this.ClearAllDataValidationErrors()); } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/Settings/Account/CreatePersonalAccessTokenViewModel.cs b/src/Artemis.UI/Screens/Settings/Account/CreatePersonalAccessTokenViewModel.cs index a09ae4a21..dba94f3c6 100644 --- a/src/Artemis.UI/Screens/Settings/Account/CreatePersonalAccessTokenViewModel.cs +++ b/src/Artemis.UI/Screens/Settings/Account/CreatePersonalAccessTokenViewModel.cs @@ -16,7 +16,7 @@ public partial class CreatePersonalAccessTokenViewModel : ContentDialogViewModel private readonly IUserManagementService _userManagementService; private readonly IWindowService _windowService; [Notify] private string _description = string.Empty; - [Notify] private DateTime _expirationDate = DateTime.Today.AddDays(180); + [Notify] private DateTime _expirationDate = DateTime.UtcNow.Date.AddDays(181); public CreatePersonalAccessTokenViewModel(IUserManagementService userManagementService, IWindowService windowService) { @@ -25,13 +25,13 @@ public partial class CreatePersonalAccessTokenViewModel : ContentDialogViewModel Submit = ReactiveCommand.CreateFromTask(ExecuteSubmit, ValidationContext.Valid); this.ValidationRule(vm => vm.Description, e => e != null, "You must specify a description"); - this.ValidationRule(vm => vm.Description, e => e == null || e.Length >= 10, "You must specify a description of at least 10 characters"); + this.ValidationRule(vm => vm.Description, e => e == null || e.Length >= 5, "You must specify a description of at least 5 characters"); this.ValidationRule(vm => vm.Description, e => e == null || e.Length <= 150, "You must specify a description of less than 150 characters"); - this.ValidationRule(vm => vm.ExpirationDate, e => e >= DateTime.Today.AddDays(1), "Expiration date must be at least 24 hours from now"); + this.ValidationRule(vm => vm.ExpirationDate, e => e >= DateTime.UtcNow.Date.AddDays(1), "Expiration date must be at least 24 hours from now"); } - public DateTime StartDate => DateTime.Today.AddDays(1); - public DateTime EndDate => DateTime.Today.AddDays(365); + public DateTime StartDate => DateTime.UtcNow.Date.AddDays(1); + public DateTime EndDate => DateTime.UtcNow.Date.AddDays(365); public ReactiveCommand Submit { get; } private async Task ExecuteSubmit(CancellationToken cts) diff --git a/src/Artemis.UI/Screens/Settings/Tabs/AccountTabView.axaml b/src/Artemis.UI/Screens/Settings/Tabs/AccountTabView.axaml index 3e54e59dc..eeb650355 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/AccountTabView.axaml +++ b/src/Artemis.UI/Screens/Settings/Tabs/AccountTabView.axaml @@ -15,31 +15,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + You are not logged in + + In order to manage your account you must be logged in. + + Creating an account is free and we'll not bother you with a newsletter or crap like that. + + + + + + Click Log In below to (create an account) and log in. + + You'll also be able to log in with Google or Discord. + + + @@ -109,16 +109,26 @@ - + + + Tokens be used to communicate with Artemis APIs without using a username and password + + + + Description Created at Expires at + + + You have no active personal access tokens. + - + - @@ -130,8 +140,8 @@ diff --git a/src/Artemis.UI/Screens/Workshop/Library/Tabs/InstalledTabItemView.axaml b/src/Artemis.UI/Screens/Workshop/Library/Tabs/InstalledTabItemView.axaml index 00e7eae8f..4f5994982 100644 --- a/src/Artemis.UI/Screens/Workshop/Library/Tabs/InstalledTabItemView.axaml +++ b/src/Artemis.UI/Screens/Workshop/Library/Tabs/InstalledTabItemView.axaml @@ -20,7 +20,7 @@ HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Command="{CompiledBinding ViewWorkshopPage}"> - + - + + Installed - +