1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2026-01-02 10:43:31 +00:00

Compare commits

..

No commits in common. "19082481c306c401c5fabb5faca6ba50c9a3ff16" and "7edaf709e6a87973f26364e189b42bd872c79051" have entirely different histories.

9 changed files with 26 additions and 7 deletions

View File

@ -34,8 +34,10 @@ 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")

View File

@ -42,7 +42,9 @@ 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"),
}), }),

View File

@ -25,7 +25,9 @@ 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 =>

View File

@ -49,7 +49,7 @@
</StackPanel> </StackPanel>
</Button> </Button>
<Button Width="150" Height="180" Command="{CompiledBinding Navigate}" CommandParameter="workshop/entries/layouts/1" VerticalContentAlignment="Top"> <Button Width="150" Height="180" Command="{CompiledBinding Navigate}" CommandParameter="workshop/entries/layouts/1" VerticalContentAlignment="Top" IsVisible="{CompiledBinding ShowLayouts}">
<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>

View File

@ -26,6 +26,12 @@ 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; }

View File

@ -36,7 +36,8 @@
</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>

View File

@ -16,6 +16,12 @@ 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)

View File

@ -27,7 +27,7 @@ public class ProfileEntryInstallationHandler : IEntryInstallationHandler
try try
{ {
HttpClient client = _httpClientFactory.CreateClient(WorkshopConstants.WORKSHOP_CLIENT_NAME); HttpClient client = _httpClientFactory.CreateClient(WorkshopConstants.WORKSHOP_CLIENT_NAME);
await client.DownloadDataAsync($"releases/download/{release.Id}", stream, progress, cancellationToken); await client.DownloadDataAsync($"releases/download/{release}", stream, progress, cancellationToken);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -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";
} }