1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 13:28:33 +00:00

UI - Fixed UI showing during auto-run even with show on startup disabled

UI - Fixen an issue during startup where Artemis would navigate to home after a few seconds
Workshop - Added Submit new entry button to submissions tab
This commit is contained in:
RobertBeekman 2024-02-19 21:54:53 +01:00
parent 0b6bf5685e
commit 9126601ae7
3 changed files with 23 additions and 17 deletions

View File

@ -199,6 +199,8 @@ internal class Router : CorePropertyChanged, IRouter, IDisposable
{
if (_previousWindowRoute != null && _currentRouteSubject.Value == "blank")
Dispatcher.UIThread.InvokeAsync(async () => await Navigate(_previousWindowRoute, new RouterNavigationOptions {AddToHistory = false, EnableLogging = false}));
else if (_currentRouteSubject.Value == null || _currentRouteSubject.Value == "blank")
Dispatcher.UIThread.InvokeAsync(async () => await Navigate("home", new RouterNavigationOptions {AddToHistory = false, EnableLogging = true}));
}
private void MainWindowServiceOnMainWindowClosed(object? sender, EventArgs e)

View File

@ -94,8 +94,6 @@ public class RootViewModel : RoutableHostScreen<RoutableScreen>, IMainWindowProv
registrationService.RegisterBuiltInDataModelDisplays();
registrationService.RegisterBuiltInDataModelInputs();
registrationService.RegisterBuiltInPropertyEditors();
_router.Navigate("home");
});
}
@ -130,7 +128,9 @@ public class RootViewModel : RoutableHostScreen<RoutableScreen>, IMainWindowProv
bool minimized = Constants.StartupArguments.Contains("--minimized");
bool showOnAutoRun = _settingsService.GetSetting("UI.ShowOnStartup", true).Value;
return (autoRunning && showOnAutoRun) || !minimized;
if (autoRunning)
return showOnAutoRun;
return !minimized;
}
private void ShowSplashScreen()

View File

@ -36,20 +36,24 @@
<Button HorizontalAlignment="Center" Command="{CompiledBinding AddSubmission}">Submit new entry</Button>
</StackPanel>
<ScrollViewer IsVisible="{CompiledBinding Entries.Count}">
<ItemsControl ItemsSource="{CompiledBinding Entries}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<ContentControl Content="{CompiledBinding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
<StackPanel Spacing="15">
<Button HorizontalAlignment="Right" Command="{CompiledBinding AddSubmission}">Submit new entry</Button>
<ScrollViewer IsVisible="{CompiledBinding Entries.Count}">
<ItemsControl ItemsSource="{CompiledBinding Entries}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<ContentControl Content="{CompiledBinding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
</StackPanel>
</Panel>
</Panel>