Release page - Added release installation

This commit is contained in:
Robert committed 2024-03-29 10:27:42 +01:00
1 parent 9e994840f6
commit d6f1ba9aad
17 files changed
+219 -150

No files matched your search

@@ -45,6 +45,12 @@ public interface IRouter
/// </summary>
/// <returns>A task containing a boolean value which indicates whether there was a forward path to go back to.</returns>
Task<bool> GoForward();
/// <summary>
/// Asynchronously navigates upwards to the parent route.
/// </summary>
/// <returns></returns>
Task<bool> GoUp();
/// <summary>
/// Clears the navigation history.
@@ -161,6 +161,28 @@ internal class Router : CorePropertyChanged, IRouter, IDisposable
return true;
}
/// <inheritdoc />
public async Task<bool> GoUp()
{
string? currentPath = _currentRouteSubject.Value;
// Keep removing segments until we find a parent route that resolves
while (currentPath != null && currentPath.Contains('/'))
{
string parentPath = currentPath[..currentPath.LastIndexOf('/')];
RouteResolution resolution = Resolve(parentPath);
if (resolution.Success)
{
await Navigate(parentPath, new RouterNavigationOptions {AddToHistory = false});
return true;
}
currentPath = parentPath;
}
return false;
}
/// <inheritdoc />
public void ClearHistory()
{