Merge branch 'development'

This commit is contained in:
RobertBeekman committed 2024-01-16 09:33:40 +01:00
commit f0ab5fa250
8 files changed
+6 -25

No files matched your search

-2
View File
@@ -34,10 +34,8 @@ public static class Routes
{ {
new RouteRegistration<ProfileListViewModel>("profiles/{page:int}"), new RouteRegistration<ProfileListViewModel>("profiles/{page:int}"),
new RouteRegistration<ProfileDetailsViewModel>("profiles/details/{entryId:long}"), new RouteRegistration<ProfileDetailsViewModel>("profiles/details/{entryId:long}"),
#if DEBUG
new RouteRegistration<LayoutListViewModel>("layouts/{page:int}"), new RouteRegistration<LayoutListViewModel>("layouts/{page:int}"),
new RouteRegistration<LayoutDetailsViewModel>("layouts/details/{entryId:long}"), new RouteRegistration<LayoutDetailsViewModel>("layouts/details/{entryId:long}"),
#endif
} }
}, },
new RouteRegistration<WorkshopLibraryViewModel>("library") new RouteRegistration<WorkshopLibraryViewModel>("library")
@@ -42,9 +42,7 @@ public partial class SidebarViewModel : ActivatableViewModelBase
new(MaterialIconKind.TestTube, "Workshop", "workshop", null, new ObservableCollection<SidebarScreenViewModel> new(MaterialIconKind.TestTube, "Workshop", "workshop", null, new ObservableCollection<SidebarScreenViewModel>
{ {
new(MaterialIconKind.FolderVideo, "Profiles", "workshop/entries/profiles/1", "workshop/entries/profiles"), new(MaterialIconKind.FolderVideo, "Profiles", "workshop/entries/profiles/1", "workshop/entries/profiles"),
#if DEBUG
new(MaterialIconKind.KeyboardVariant, "Layouts", "workshop/entries/layouts/1", "workshop/entries/layouts"), new(MaterialIconKind.KeyboardVariant, "Layouts", "workshop/entries/layouts/1", "workshop/entries/layouts"),
#endif
new(MaterialIconKind.Bookshelf, "Library", "workshop/library"), new(MaterialIconKind.Bookshelf, "Library", "workshop/library"),
}), }),
@@ -25,9 +25,7 @@ public partial class EntriesViewModel : RoutableHostScreen<RoutableScreen>
Tabs = new ObservableCollection<RouteViewModel> Tabs = new ObservableCollection<RouteViewModel>
{ {
new("Profiles", "workshop/entries/profiles/1", "workshop/entries/profiles"), new("Profiles", "workshop/entries/profiles/1", "workshop/entries/profiles"),
#if DEBUG
new("Layouts", "workshop/entries/layouts/1", "workshop/entries/layouts") new("Layouts", "workshop/entries/layouts/1", "workshop/entries/layouts")
#endif
}; };
this.WhenActivated(d => this.WhenActivated(d =>
@@ -49,7 +49,7 @@
</StackPanel> </StackPanel>
</Button> </Button>
<Button Width="150" Height="180" Command="{CompiledBinding Navigate}" CommandParameter="workshop/entries/layouts/1" VerticalContentAlignment="Top" IsVisible="{CompiledBinding ShowLayouts}"> <Button Width="150" Height="180" Command="{CompiledBinding Navigate}" CommandParameter="workshop/entries/layouts/1" VerticalContentAlignment="Top">
<StackPanel> <StackPanel>
<avalonia:MaterialIcon Kind="KeyboardVariant" HorizontalAlignment="Left" Width="60" Height="60" Margin="0 5" /> <avalonia:MaterialIcon Kind="KeyboardVariant" HorizontalAlignment="Left" Width="60" Height="60" Margin="0 5" />
<TextBlock TextWrapping="Wrap" FontSize="16" Margin="0 5">Layouts</TextBlock> <TextBlock TextWrapping="Wrap" FontSize="16" Margin="0 5">Layouts</TextBlock>
@@ -26,12 +26,6 @@ public partial class WorkshopHomeViewModel : RoutableScreen
this.WhenActivatedAsync(async d => WorkshopReachable = await workshopService.ValidateWorkshopStatus(d.AsCancellationToken())); this.WhenActivatedAsync(async d => WorkshopReachable = await workshopService.ValidateWorkshopStatus(d.AsCancellationToken()));
} }
#if DEBUG
public bool ShowLayouts => true;
# else
public bool ShowLayouts => false;
#endif
public ReactiveCommand<Unit, Unit> AddSubmission { get; } public ReactiveCommand<Unit, Unit> AddSubmission { get; }
public ReactiveCommand<string, Unit> Navigate { get; } public ReactiveCommand<string, Unit> Navigate { get; }
@@ -36,8 +36,7 @@
</RadioButton.Content> </RadioButton.Content>
</RadioButton> </RadioButton>
<RadioButton GroupName="EntryType" <RadioButton GroupName="EntryType"
IsChecked="{CompiledBinding SelectedEntryType, Converter={StaticResource EnumBoolConverter}, ConverterParameter={x:Static workshop:EntryType.Layout}}" IsChecked="{CompiledBinding SelectedEntryType, Converter={StaticResource EnumBoolConverter}, ConverterParameter={x:Static workshop:EntryType.Layout}}">
IsVisible="{CompiledBinding ShowLayouts}">
<RadioButton.Content> <RadioButton.Content>
<StackPanel> <StackPanel>
<TextBlock>Layout</TextBlock> <TextBlock>Layout</TextBlock>
@@ -16,12 +16,6 @@ public partial class EntryTypeStepViewModel : SubmissionViewModel
Continue = ReactiveCommand.Create(ExecuteContinue, this.WhenAnyValue(vm => vm.SelectedEntryType).Select(e => e != null)); Continue = ReactiveCommand.Create(ExecuteContinue, this.WhenAnyValue(vm => vm.SelectedEntryType).Select(e => e != null));
} }
#if DEBUG
public bool ShowLayouts => true;
# else
public bool ShowLayouts => false;
#endif
private void ExecuteContinue() private void ExecuteContinue()
{ {
if (SelectedEntryType == null) if (SelectedEntryType == null)
@@ -2,9 +2,9 @@ namespace Artemis.WebClient.Workshop;
public static class WorkshopConstants public static class WorkshopConstants
{ {
public const string AUTHORITY_URL = "https://localhost:5001"; // public const string AUTHORITY_URL = "https://localhost:5001";
public const string WORKSHOP_URL = "https://localhost:7281"; // public const string WORKSHOP_URL = "https://localhost:7281";
// public const string AUTHORITY_URL = "https://identity.artemis-rgb.com"; public const string AUTHORITY_URL = "https://identity.artemis-rgb.com";
// public const string WORKSHOP_URL = "https://workshop.artemis-rgb.com"; public const string WORKSHOP_URL = "https://workshop.artemis-rgb.com";
public const string WORKSHOP_CLIENT_NAME = "WorkshopApiClient"; public const string WORKSHOP_CLIENT_NAME = "WorkshopApiClient";
} }