Workshop - Feature flagged out layouts

Settings - Use Fluent tabs
This commit is contained in:
Robert committed 2023-09-09 00:32:58 +02:00
1 parent 0ac973d4bc
commit a798980eec
14 files changed
+70 -35

No files matched your search

@@ -24,7 +24,9 @@ public class EntriesViewModel : RoutableHostScreen<RoutableScreen>
Tabs = new ObservableCollection<RouteViewModel>
{
new("Profiles", "workshop/entries/profiles/1", "workshop/entries/profiles"),
#if DEBUG
new("Layouts", "workshop/entries/layouts/1", "workshop/entries/layouts")
#endif
};
this.WhenActivated(d =>
@@ -49,7 +49,7 @@
</StackPanel>
</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>
<avalonia:MaterialIcon Kind="KeyboardVariant" HorizontalAlignment="Left" Width="60" Height="60" Margin="0 5" />
<TextBlock TextWrapping="Wrap" FontSize="16" Margin="0 5">Layouts</TextBlock>
@@ -25,6 +25,12 @@ public class WorkshopHomeViewModel : RoutableScreen
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<string, Unit> Navigate { get; }
@@ -36,7 +36,8 @@
</RadioButton.Content>
</RadioButton>
<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>
<StackPanel>
<TextBlock>Layout</TextBlock>
@@ -14,6 +14,12 @@ public class EntryTypeStepViewModel : SubmissionViewModel
GoBack = ReactiveCommand.Create(() => State.ChangeScreen<WelcomeStepViewModel>());
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
public EntryType? SelectedEntryType
{