mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Workshop - Manage entries after installing them
Workshop - Auto-enable plugins after installing them Workshop - Show the latest release above the details page
This commit is contained in:
1 parent
966ca47335
commit
86f78940b1
23 files changed
+401
-190
No files matched your search
@@ -50,7 +50,7 @@ public interface IRouter
|
||||
/// Asynchronously navigates upwards to the parent route.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<bool> GoUp();
|
||||
Task<bool> GoUp(RouterNavigationOptions? options = null);
|
||||
|
||||
/// <summary>
|
||||
/// Clears the navigation history.
|
||||
|
||||
@@ -8,9 +8,10 @@ namespace Artemis.UI.Shared.Routing;
|
||||
/// </summary>
|
||||
public class NavigationArguments
|
||||
{
|
||||
internal NavigationArguments(IRouter router, string path, object[] routeParameters)
|
||||
internal NavigationArguments(IRouter router, RouterNavigationOptions options, string path, object[] routeParameters)
|
||||
{
|
||||
Router = router;
|
||||
Options = options;
|
||||
Path = path;
|
||||
RouteParameters = routeParameters;
|
||||
SegmentParameters = Array.Empty<object>();
|
||||
@@ -21,6 +22,11 @@ public class NavigationArguments
|
||||
/// </summary>
|
||||
public IRouter Router { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the options that are being used for this navigation.
|
||||
/// </summary>
|
||||
public RouterNavigationOptions Options { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path of the route that is being navigated to.
|
||||
/// </summary>
|
||||
|
||||
@@ -114,7 +114,7 @@ internal class Router : CorePropertyChanged, IRouter, IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
NavigationArguments args = new(this, resolution.Path, resolution.GetAllParameters());
|
||||
NavigationArguments args = new(this, options, resolution.Path, resolution.GetAllParameters());
|
||||
|
||||
if (!await RequestClose(_root, args))
|
||||
return;
|
||||
@@ -169,7 +169,7 @@ internal class Router : CorePropertyChanged, IRouter, IDisposable
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> GoUp()
|
||||
public async Task<bool> GoUp(RouterNavigationOptions? options = null)
|
||||
{
|
||||
string? currentPath = _currentRouteSubject.Value;
|
||||
|
||||
@@ -180,7 +180,7 @@ internal class Router : CorePropertyChanged, IRouter, IDisposable
|
||||
RouteResolution resolution = Resolve(parentPath);
|
||||
if (resolution.Success)
|
||||
{
|
||||
await Navigate(parentPath, new RouterNavigationOptions {AddToHistory = false});
|
||||
await Navigate(parentPath, options);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,11 @@ public class RouterNavigationOptions
|
||||
/// </summary>
|
||||
public bool EnableLogging { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets any additional arguments to pass to the screen.
|
||||
/// </summary>
|
||||
public object? AdditionalArguments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the given two paths are considered equal using these navigation options.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user