mirror of
				https://github.com/lantean-code/qbtmud.git
				synced 2025-11-03 21:43:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			1014 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1014 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using Lantean.QBTMud.Models;
 | 
						|
using Microsoft.AspNetCore.Components;
 | 
						|
using MudBlazor;
 | 
						|
 | 
						|
namespace Lantean.QBTMud.Layout
 | 
						|
{
 | 
						|
    public partial class DetailsLayout
 | 
						|
    {
 | 
						|
        [CascadingParameter(Name = "DrawerOpen")]
 | 
						|
        public bool DrawerOpen { get; set; }
 | 
						|
 | 
						|
        [CascadingParameter]
 | 
						|
        public IEnumerable<Torrent>? Torrents { get; set; }
 | 
						|
 | 
						|
        [CascadingParameter(Name = "SortColumn")]
 | 
						|
        public string? SortColumn { get; set; }
 | 
						|
 | 
						|
        [CascadingParameter(Name = "SortDirection")]
 | 
						|
        public SortDirection SortDirection { get; set; }
 | 
						|
 | 
						|
        protected string? SelectedTorrent { get; set; }
 | 
						|
 | 
						|
        protected override void OnParametersSet()
 | 
						|
        {
 | 
						|
            if (Body?.Target is not RouteView routeView || routeView.RouteData.RouteValues is null)
 | 
						|
            {
 | 
						|
                return;
 | 
						|
            }
 | 
						|
 | 
						|
            if (routeView.RouteData.RouteValues.TryGetValue("hash", out var hash))
 | 
						|
            {
 | 
						|
                SelectedTorrent = hash?.ToString();
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
} |