Update layout to remove hacks and rely only on flexbox

This commit is contained in:
ahjephson
2025-10-20 16:39:20 +01:00
parent 7db4f2f78d
commit 3d0d211d10
21 changed files with 777 additions and 566 deletions

View File

@@ -2,7 +2,8 @@
<MudMenuItem Icon="@Icons.Material.Filled.DriveFileRenameOutline" OnClick="RenameFileContextMenu">Rename</MudMenuItem> <MudMenuItem Icon="@Icons.Material.Filled.DriveFileRenameOutline" OnClick="RenameFileContextMenu">Rename</MudMenuItem>
</MudMenu> </MudMenu>
<div style="overflow-x: auto; white-space: nowrap; width: 100%;"> <div class="content-panel">
<div class="content-panel__toolbar content-panel__toolbar--scroll">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
<MudIconButton Icon="@Icons.Material.Filled.DriveFileRenameOutline" OnClick="RenameFileToolbar" title="Rename" /> <MudIconButton Icon="@Icons.Material.Filled.DriveFileRenameOutline" OnClick="RenameFileToolbar" title="Rename" />
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
@@ -24,7 +25,7 @@
<MudTextField T="string" Value="SearchText" ValueChanged="SearchTextChanged" Immediate="true" DebounceInterval="500" Placeholder="Filter file list" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField> <MudTextField T="string" Value="SearchText" ValueChanged="SearchTextChanged" Immediate="true" DebounceInterval="500" Placeholder="Filter file list" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
</MudToolBar> </MudToolBar>
</div> </div>
<div class="content-panel__body">
<DynamicTable <DynamicTable
@ref="Table" @ref="Table"
T="ContentItem" T="ContentItem"
@@ -38,8 +39,10 @@
SortDirectionChanged="SortDirectionChanged" SortDirectionChanged="SortDirectionChanged"
OnTableDataContextMenu="TableDataContextMenu" OnTableDataContextMenu="TableDataContextMenu"
OnTableDataLongPress="TableDataLongPress" OnTableDataLongPress="TableDataLongPress"
Class="file-list" Class="file-list content-panel__table"
/> />
</div>
</div>
@code { @code {
private RenderFragment<RowContext<ContentItem>> NameColumn private RenderFragment<RowContext<ContentItem>> NameColumn

View File

@@ -6,13 +6,17 @@
} }
</MudMenu> </MudMenu>
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
<MudIconButton Icon="@Icons.Material.Filled.AddCircle" Color="Color.Info" OnClick="AddPeer">Add peer</MudIconButton> <MudIconButton Icon="@Icons.Material.Filled.AddCircle" Color="Color.Info" OnClick="AddPeer">Add peer</MudIconButton>
<MudIconButton Icon="@Icons.Material.Filled.DisabledByDefault" Color="Color.Error" OnClick="BanPeerToolbar" Disabled="@(SelectedItem is null)">Ban peer</MudIconButton> <MudIconButton Icon="@Icons.Material.Filled.DisabledByDefault" Color="Color.Error" OnClick="BanPeerToolbar" Disabled="@(SelectedItem is null)">Ban peer</MudIconButton>
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudIconButton Icon="@Icons.Material.Outlined.ViewColumn" Color="Color.Inherit" OnClick="ColumnOptions" title="Choose Columns" /> <MudIconButton Icon="@Icons.Material.Outlined.ViewColumn" Color="Color.Inherit" OnClick="ColumnOptions" title="Choose Columns" />
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<DynamicTable T="Peer" <DynamicTable T="Peer"
ColumnDefinitions="Columns" ColumnDefinitions="Columns"
Items="Peers" Items="Peers"
@@ -21,4 +25,6 @@
OnTableDataLongPress="TableDataLongPress" OnTableDataLongPress="TableDataLongPress"
OnTableDataContextMenu="TableDataContextMenu" OnTableDataContextMenu="TableDataContextMenu"
SelectedItemChanged="SelectedItemChanged" SelectedItemChanged="SelectedItemChanged"
Class="details-list" /> Class="details-list content-panel__table" />
</div>
</div>

View File

@@ -8,6 +8,8 @@
} }
</MudMenu> </MudMenu>
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
<MudIconButton Icon="@Icons.Material.Filled.AddCircle" Color="Color.Info" OnClick="AddTracker">Add trackers</MudIconButton> <MudIconButton Icon="@Icons.Material.Filled.AddCircle" Color="Color.Info" OnClick="AddTracker">Add trackers</MudIconButton>
<MudIconButton Icon="@Icons.Material.Filled.Edit" Color="Color.Info" OnClick="EditTrackerToolbar" Disabled="@(SelectedItem is null)">Edit tracker URL</MudIconButton> <MudIconButton Icon="@Icons.Material.Filled.Edit" Color="Color.Info" OnClick="EditTrackerToolbar" Disabled="@(SelectedItem is null)">Edit tracker URL</MudIconButton>
@@ -16,7 +18,9 @@
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudIconButton Icon="@Icons.Material.Outlined.ViewColumn" Color="Color.Inherit" OnClick="ColumnOptions" title="Choose Columns" /> <MudIconButton Icon="@Icons.Material.Outlined.ViewColumn" Color="Color.Inherit" OnClick="ColumnOptions" title="Choose Columns" />
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<DynamicTable @ref="Table" <DynamicTable @ref="Table"
T="Lantean.QBitTorrentClient.Models.TorrentTracker" T="Lantean.QBitTorrentClient.Models.TorrentTracker"
ColumnDefinitions="Columns" ColumnDefinitions="Columns"
@@ -29,4 +33,6 @@
OnTableDataLongPress="TableDataLongPress" OnTableDataLongPress="TableDataLongPress"
OnTableDataContextMenu="TableDataContextMenu" OnTableDataContextMenu="TableDataContextMenu"
SelectedItemChanged="SelectedItemChanged" SelectedItemChanged="SelectedItemChanged"
Class="file-list" /> Class="file-list content-panel__table" />
</div>
</div>

View File

@@ -1,6 +1,10 @@
<DynamicTable T="Lantean.QBitTorrentClient.Models.WebSeed" <div class="content-panel">
<div class="content-panel__body">
<DynamicTable T="Lantean.QBitTorrentClient.Models.WebSeed"
ColumnDefinitions="Columns" ColumnDefinitions="Columns"
Items="WebSeeds" Items="WebSeeds"
MultiSelection="false" MultiSelection="false"
SelectOnRowClick="false" SelectOnRowClick="false"
Class="details-list" /> Class="details-list content-panel__table" />
</div>
</div>

View File

@@ -1,9 +1,11 @@
@inherits LayoutComponentBase @inherits LayoutComponentBase
@layout LoggedInLayout @layout LoggedInLayout
<MudDrawer Open="DrawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2" Overlay="false"> <div class="app-shell__body">
<MudDrawer Open="DrawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2" Overlay="false" Class="app-shell__sidebar">
<TorrentsListNav Torrents="Torrents" SelectedTorrent="@SelectedTorrent" SortDirection="SortDirection" SortColumn="@SortColumn" /> <TorrentsListNav Torrents="Torrents" SelectedTorrent="@SelectedTorrent" SortDirection="SortDirection" SortColumn="@SortColumn" />
</MudDrawer> </MudDrawer>
<MudMainContent> <MudMainContent Class="app-shell__main">
@Body @Body
</MudMainContent> </MudMainContent>
</div>

View File

@@ -1,11 +1,13 @@
@inherits LayoutComponentBase @inherits LayoutComponentBase
@layout LoggedInLayout @layout LoggedInLayout
<MudDrawer Open="DrawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2" Overlay="false"> <div class="app-shell__body">
<MudDrawer Open="DrawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2" Overlay="false" Class="app-shell__sidebar">
<FiltersNav CategoryChanged="CategoryChanged" StatusChanged="StatusChanged" TagChanged="TagChanged" TrackerChanged="TrackerChanged" /> <FiltersNav CategoryChanged="CategoryChanged" StatusChanged="StatusChanged" TagChanged="TagChanged" TrackerChanged="TrackerChanged" />
</MudDrawer> </MudDrawer>
<MudMainContent> <MudMainContent Class="app-shell__main">
<CascadingValue Value="SearchTermChanged" Name="SearchTermChanged"> <CascadingValue Value="SearchTermChanged" Name="SearchTermChanged">
@Body @Body
</CascadingValue> </CascadingValue>
</MudMainContent> </MudMainContent>
</div>

View File

@@ -24,20 +24,9 @@
<CascadingValue Value="SearchTermChanged" Name="SearchTermChanged"> <CascadingValue Value="SearchTermChanged" Name="SearchTermChanged">
<CascadingValue Value="@(MainData?.LostConnection ?? false)" Name="LostConnection"> <CascadingValue Value="@(MainData?.LostConnection ?? false)" Name="LostConnection">
<CascadingValue Value="Version" Name="Version"> <CascadingValue Value="Version" Name="Version">
<div class="app-shell">
@Body @Body
</CascadingValue> <MudAppBar Bottom="true" Elevation="0" Dense="true" Class="app-shell__status-bar">
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
<MudAppBar Bottom="true" Fixed="true" Elevation="0" Dense="true" Style="background-color: var(--mud-palette-dark-lighten); z-index: 900">
@if (MainData?.LostConnection == true) @if (MainData?.LostConnection == true)
{ {
<MudText Class="mx-2 mb-1 d-none d-sm-flex" Color="Color.Error">qBittorrent client is not reachable</MudText> <MudText Class="mx-2 mb-1 d-none d-sm-flex" Color="Color.Error">qBittorrent client is not reachable</MudText>
@@ -66,6 +55,19 @@
@DisplayHelpers.Size(MainData?.ServerState.UploadInfoData, "(", ")") @DisplayHelpers.Size(MainData?.ServerState.UploadInfoData, "(", ")")
</MudText> </MudText>
</MudAppBar> </MudAppBar>
</div>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue> </CascadingValue>
</CascadingValue> </CascadingValue>
</CascadingValue> </CascadingValue>

View File

@@ -1,11 +1,13 @@
@inherits LayoutComponentBase @inherits LayoutComponentBase
@layout LoggedInLayout @layout LoggedInLayout
<MudDrawer Open="DrawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2" Overlay="false"> <div class="app-shell__body">
<MudDrawer Open="DrawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2" Overlay="false" Class="app-shell__sidebar">
<MudNavMenu> <MudNavMenu>
<ApplicationActions IsMenu="false" Preferences="Preferences" /> <ApplicationActions IsMenu="false" Preferences="Preferences" />
</MudNavMenu> </MudNavMenu>
</MudDrawer> </MudDrawer>
<MudMainContent> <MudMainContent Class="app-shell__main">
@Body @Body
</MudMainContent> </MudMainContent>
</div>

View File

@@ -2,14 +2,14 @@
{ {
public class FileRow public class FileRow
{ {
public string OriginalName { get; set; } public required string OriginalName { get; set; }
public string? NewName { get; set; } public string? NewName { get; set; }
public bool IsFolder { get; set; } public bool IsFolder { get; set; }
public string Name { get; set; } public required string Name { get; set; }
public int Level { get; set; } public int Level { get; set; }
public bool Renamed { get; set; } public bool Renamed { get; set; }
public string? ErrorMessage { get; set; } public string? ErrorMessage { get; set; }
public string Path { get; set; } public required string Path { get; set; }
public override bool Equals(object? obj) public override bool Equals(object? obj)
{ {

View File

@@ -1,6 +1,8 @@
@page "/about" @page "/about"
@layout OtherLayout @layout OtherLayout
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -9,10 +11,12 @@
} }
<MudText Class="px-5 no-wrap">About</MudText> <MudText Class="px-5 no-wrap">About</MudText>
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<MudTabs Elevation="2" ApplyEffectsToContainer="true"> <MudTabs Elevation="2" ApplyEffectsToContainer="true">
<MudTabPanel Text="About"> <MudTabPanel Text="About">
<MudContainer MaxWidth="MaxWidth.ExtraExtraLarge" Class="mt-3"> <MudContainer MaxWidth="MaxWidth.ExtraExtraLarge" Class="mt-3 content-panel__container">
<MudGrid Class="mt-0 mb-4"> <MudGrid Class="mt-0 mb-4">
<MudItem xs="12" sm="3" md="2" lg="2" xl="1" Class="d-flex justify-center"> <MudItem xs="12" sm="3" md="2" lg="2" xl="1" Class="d-flex justify-center">
<MudImage Src="images/mascot.png" Alt="Mascot" Class="ma-6" <MudImage Src="images/mascot.png" Alt="Mascot" Class="ma-6"
@@ -1105,3 +1109,5 @@
</MudContainer> </MudContainer>
</MudTabPanel> </MudTabPanel>
</MudTabs> </MudTabs>
</div>
</div>

View File

@@ -1,6 +1,8 @@
@page "/blocks" @page "/blocks"
@layout OtherLayout @layout OtherLayout
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -10,7 +12,8 @@
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudText Class="pl-5 no-wrap">Blocked IPs</MudText> <MudText Class="pl-5 no-wrap">Blocked IPs</MudText>
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<MudCard Elevation="1" Class="ml-4 mr-4 mb-4"> <MudCard Elevation="1" Class="ml-4 mr-4 mb-4">
<MudCardContent> <MudCardContent>
<EditForm Model="Model" OnSubmit="Submit"> <EditForm Model="Model" OnSubmit="Submit">
@@ -33,4 +36,6 @@
MultiSelection="false" MultiSelection="false"
SelectOnRowClick="false" SelectOnRowClick="false"
RowClassFunc="RowClass" RowClassFunc="RowClass"
Class="search-list" /> Class="search-list content-panel__table" />
</div>
</div>

View File

@@ -1,6 +1,8 @@
@page "/categories" @page "/categories"
@layout OtherLayout @layout OtherLayout
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -11,14 +13,18 @@
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudIconButton Icon="@Icons.Material.Filled.PlaylistAdd" OnClick="AddCategory" title="Add Category" /> <MudIconButton Icon="@Icons.Material.Filled.PlaylistAdd" OnClick="AddCategory" title="Add Category" />
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<DynamicTable @ref="Table" <DynamicTable @ref="Table"
T="Category" T="Category"
ColumnDefinitions="Columns" ColumnDefinitions="Columns"
Items="Results" Items="Results"
MultiSelection="false" MultiSelection="false"
SelectOnRowClick="false" SelectOnRowClick="false"
Class="details-list" /> Class="details-list content-panel__table" />
</div>
</div>
@code { @code {
private RenderFragment<RowContext<Category>> ActionsColumn private RenderFragment<RowContext<Category>> ActionsColumn

View File

@@ -1,7 +1,8 @@
@page "/details/{hash}" @page "/details/{hash}"
@layout DetailsLayout @layout DetailsLayout
<div style="overflow-x: auto; white-space: nowrap; width: 100%;"> <div class="content-panel">
<div class="content-panel__toolbar content-panel__toolbar--scroll">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -17,6 +18,7 @@
</MudToolBar> </MudToolBar>
</div> </div>
<div class="content-panel__body">
@if (ShowTabs) @if (ShowTabs)
{ {
<CascadingValue Value="RefreshInterval" Name="RefreshInterval"> <CascadingValue Value="RefreshInterval" Name="RefreshInterval">
@@ -39,3 +41,5 @@
</MudTabs> </MudTabs>
</CascadingValue> </CascadingValue>
} }
</div>
</div>

View File

@@ -1,6 +1,8 @@
@page "/log" @page "/log"
@layout OtherLayout @layout OtherLayout
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -10,7 +12,8 @@
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudText Class="pl-5 no-wrap">Execution Log</MudText> <MudText Class="pl-5 no-wrap">Execution Log</MudText>
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<MudCard Elevation="1" Class="ml-4 mr-4 mb-4"> <MudCard Elevation="1" Class="ml-4 mr-4 mb-4">
<MudCardContent> <MudCardContent>
<EditForm Model="Model" OnSubmit="Submit"> <EditForm Model="Model" OnSubmit="Submit">
@@ -41,4 +44,6 @@
MultiSelection="false" MultiSelection="false"
SelectOnRowClick="false" SelectOnRowClick="false"
RowClassFunc="RowClass" RowClassFunc="RowClass"
Class="search-list" /> Class="search-list content-panel__table" />
</div>
</div>

View File

@@ -3,6 +3,8 @@
<NavigationLock ConfirmExternalNavigation="@(UpdatePreferences is not null)" OnBeforeInternalNavigation="ValidateExit" /> <NavigationLock ConfirmExternalNavigation="@(UpdatePreferences is not null)" OnBeforeInternalNavigation="ValidateExit" />
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -14,30 +16,50 @@
<MudIconButton Icon="@Icons.Material.Outlined.Save" OnClick="Save" Disabled="@(LostConnection || UpdatePreferences is null)" /> <MudIconButton Icon="@Icons.Material.Outlined.Save" OnClick="Save" Disabled="@(LostConnection || UpdatePreferences is null)" />
<MudIconButton Icon="@Icons.Material.Outlined.Undo" OnClick="Undo" Disabled="@(LostConnection || UpdatePreferences is null)" /> <MudIconButton Icon="@Icons.Material.Outlined.Undo" OnClick="Undo" Disabled="@(LostConnection || UpdatePreferences is null)" />
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<MudTabs Elevation="2" ApplyEffectsToContainer="true" @bind-ActivePanelIndex="ActiveTab" Border="true"> <MudTabs Elevation="2" ApplyEffectsToContainer="true" @bind-ActivePanelIndex="ActiveTab" Border="true">
<MudTabPanel Text="Behaviour"> <MudTabPanel Text="Behaviour">
<div class="options-tab-contents">
<BehaviourOptions @ref="BehaviourOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" /> <BehaviourOptions @ref="BehaviourOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" />
</div>
</MudTabPanel> </MudTabPanel>
<MudTabPanel Text="Downloads"> <MudTabPanel Text="Downloads">
<div class="options-tab-contents">
<DownloadsOptions @ref="DownloadsOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" /> <DownloadsOptions @ref="DownloadsOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" />
</div>
</MudTabPanel> </MudTabPanel>
<MudTabPanel Text="Connection"> <MudTabPanel Text="Connection">
<div class="options-tab-contents">
<ConnectionOptions @ref="ConnectionOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" /> <ConnectionOptions @ref="ConnectionOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" />
</div>
</MudTabPanel> </MudTabPanel>
<MudTabPanel Text="Speed"> <MudTabPanel Text="Speed">
<div class="options-tab-contents">
<SpeedOptions @ref="SpeedOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" /> <SpeedOptions @ref="SpeedOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" />
</div>
</MudTabPanel> </MudTabPanel>
<MudTabPanel Text="BitTorrent"> <MudTabPanel Text="BitTorrent">
<div class="options-tab-contents">
<BitTorrentOptions @ref="BitTorrentOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" /> <BitTorrentOptions @ref="BitTorrentOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" />
</div>
</MudTabPanel> </MudTabPanel>
<MudTabPanel Text="RSS"> <MudTabPanel Text="RSS">
<div class="options-tab-contents">
<RSSOptions @ref="RSSOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" /> <RSSOptions @ref="RSSOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" />
</div>
</MudTabPanel> </MudTabPanel>
<MudTabPanel Text="Web UI"> <MudTabPanel Text="Web UI">
<div class="options-tab-contents">
<WebUIOptions @ref="WebUIOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" /> <WebUIOptions @ref="WebUIOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" />
</div>
</MudTabPanel> </MudTabPanel>
<MudTabPanel Text="Advanced"> <MudTabPanel Text="Advanced">
<div class="options-tab-contents">
<AdvancedOptions @ref="AdvancedOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" /> <AdvancedOptions @ref="AdvancedOptions" Preferences="Preferences" UpdatePreferences="@UpdatePreferences" PreferencesChanged="PreferencesChanged" />
</div>
</MudTabPanel> </MudTabPanel>
</MudTabs> </MudTabs>
</div>
</div>

View File

@@ -1,6 +1,8 @@
@page "/rss" @page "/rss"
@layout OtherLayout @layout OtherLayout
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -15,8 +17,10 @@
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudIconButton Icon="@Icons.Material.Outlined.DownloadForOffline" OnClick="EditDownloadRules" title="Edit auto downloading rules" /> <MudIconButton Icon="@Icons.Material.Outlined.DownloadForOffline" OnClick="EditDownloadRules" title="Edit auto downloading rules" />
</MudToolBar> </MudToolBar>
</div>
<MudContainer MaxWidth="MaxWidth.ExtraExtraLarge"> <div class="content-panel__body">
<MudContainer MaxWidth="MaxWidth.ExtraExtraLarge" Class="content-panel__container">
<MudGrid Class="rss-contents"> <MudGrid Class="rss-contents">
<MudItem xs="4" Style="height: 100%"> <MudItem xs="4" Style="height: 100%">
<MudList T="string" SelectionMode="SelectionMode.SingleSelection" SelectedValue="SelectedFeed" SelectedValueChanged="SelectedFeedChanged" Dense> <MudList T="string" SelectionMode="SelectionMode.SingleSelection" SelectedValue="SelectedFeed" SelectedValueChanged="SelectedFeedChanged" Dense>
@@ -71,3 +75,5 @@
</MudItem> </MudItem>
</MudGrid> </MudGrid>
</MudContainer> </MudContainer>
</div>
</div>

View File

@@ -1,6 +1,8 @@
@page "/search" @page "/search"
@layout OtherLayout @layout OtherLayout
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -10,7 +12,8 @@
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudText Class="pl-5 no-wrap">Search</MudText> <MudText Class="pl-5 no-wrap">Search</MudText>
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<MudCard Elevation="1" Class="ml-4 mr-4 mb-4"> <MudCard Elevation="1" Class="ml-4 mr-4 mb-4">
<MudCardContent> <MudCardContent>
<EditForm Model="Model" OnValidSubmit="DoSearch"> <EditForm Model="Model" OnValidSubmit="DoSearch">
@@ -59,4 +62,6 @@
Items="Results" Items="Results"
MultiSelection="false" MultiSelection="false"
SelectOnRowClick="false" SelectOnRowClick="false"
Class="search-list" /> Class="search-list content-panel__table" />
</div>
</div>

View File

@@ -1,6 +1,8 @@
@page "/statistics" @page "/statistics"
@layout OtherLayout @layout OtherLayout
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -10,8 +12,10 @@
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudText Class="pl-5 no-wrap">Statistics</MudText> <MudText Class="pl-5 no-wrap">Statistics</MudText>
</MudToolBar> </MudToolBar>
</div>
<MudContainer MaxWidth="MaxWidth.ExtraExtraLarge" Class="details-tab-contents"> <div class="content-panel__body">
<MudContainer MaxWidth="MaxWidth.ExtraExtraLarge" Class="details-tab-contents content-panel__container">
<MudText Typo="Typo.subtitle2" Class="pt-6">User statistics</MudText> <MudText Typo="Typo.subtitle2" Class="pt-6">User statistics</MudText>
<MudGrid> <MudGrid>
<MudItem xs="12"> <MudItem xs="12">
@@ -60,3 +64,5 @@
</MudItem> </MudItem>
</MudGrid> </MudGrid>
</MudContainer> </MudContainer>
</div>
</div>

View File

@@ -1,6 +1,8 @@
@page "/tags" @page "/tags"
@layout OtherLayout @layout OtherLayout
<div class="content-panel">
<div class="content-panel__toolbar">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
@if (!DrawerOpen) @if (!DrawerOpen)
{ {
@@ -11,14 +13,18 @@
<MudDivider Vertical="true" /> <MudDivider Vertical="true" />
<MudIconButton Icon="@Icons.Material.Filled.NewLabel" OnClick="AddTag" title="Add Tag" /> <MudIconButton Icon="@Icons.Material.Filled.NewLabel" OnClick="AddTag" title="Add Tag" />
</MudToolBar> </MudToolBar>
</div>
<div class="content-panel__body">
<DynamicTable @ref="Table" <DynamicTable @ref="Table"
T="string" T="string"
ColumnDefinitions="Columns" ColumnDefinitions="Columns"
Items="Results" Items="Results"
MultiSelection="false" MultiSelection="false"
SelectOnRowClick="false" SelectOnRowClick="false"
Class="details-list" /> Class="details-list content-panel__table" />
</div>
</div>
@code { @code {
private RenderFragment<RowContext<string>> ActionsColumn private RenderFragment<RowContext<string>> ActionsColumn

View File

@@ -7,7 +7,8 @@
<TorrentActions RenderType="RenderType.MenuItems" Hashes="GetContextMenuTargetHashes()" PrimaryHash="@(ContextMenuItem?.Hash)" Torrents="MainData.Torrents" Preferences="Preferences" /> <TorrentActions RenderType="RenderType.MenuItems" Hashes="GetContextMenuTargetHashes()" PrimaryHash="@(ContextMenuItem?.Hash)" Torrents="MainData.Torrents" Preferences="Preferences" />
</MudMenu> </MudMenu>
<div style="overflow-x: auto; white-space: nowrap; width: 100%;"> <div class="content-panel">
<div class="content-panel__toolbar content-panel__toolbar--scroll">
<MudToolBar Gutters="false" Dense="true"> <MudToolBar Gutters="false" Dense="true">
<MudIconButton Icon="@Icons.Material.Outlined.AddLink" OnClick="AddTorrentLink" title="Add torrent link" /> <MudIconButton Icon="@Icons.Material.Outlined.AddLink" OnClick="AddTorrentLink" title="Add torrent link" />
<MudIconButton Icon="@Icons.Material.Outlined.AddCircle" OnClick="AddTorrentFile" title="Add torrent file" /> <MudIconButton Icon="@Icons.Material.Outlined.AddCircle" OnClick="AddTorrentFile" title="Add torrent file" />
@@ -20,12 +21,12 @@
<MudTextField Value="SearchText" TextChanged="SearchTextChanged" Immediate="true" DebounceInterval="1000" Placeholder="Filter torrent list" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField> <MudTextField Value="SearchText" TextChanged="SearchTextChanged" Immediate="true" DebounceInterval="1000" Placeholder="Filter torrent list" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
</MudToolBar> </MudToolBar>
</div> </div>
<div class="content-panel__body">
<MudContainer MaxWidth="MaxWidth.ExtraExtraLarge" Class="ma-0 pa-0"> <MudContainer MaxWidth="MaxWidth.ExtraExtraLarge" Class="ma-0 pa-0 content-panel__container">
<DynamicTable <DynamicTable
@ref="Table" @ref="Table"
T="Torrent" T="Torrent"
Class="torrent-list" Class="torrent-list content-panel__table"
ColumnDefinitions="Columns" ColumnDefinitions="Columns"
Items="Torrents" Items="Torrents"
OnRowClick="RowClick" OnRowClick="RowClick"
@@ -38,6 +39,8 @@
OnTableDataLongPress="TableDataLongPress" OnTableDataLongPress="TableDataLongPress"
/> />
</MudContainer> </MudContainer>
</div>
</div>
@code { @code {
private static RenderFragment<RowContext<Torrent>> ProgressBarColumn private static RenderFragment<RowContext<Torrent>> ProgressBarColumn

View File

@@ -1,4 +1,4 @@
#blazor-error-ui { #blazor-error-ui {
background: lightyellow; background: lightyellow;
bottom: 0; bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
@@ -65,15 +65,16 @@ code {
} }
.mud-appbar.mud-appbar-fixed-bottom { .mud-appbar.mud-appbar-fixed-bottom {
height: 35px; height: var(--app-status-bar-height);
} }
.mud-main-content { .mud-main-content {
padding-bottom: 35px; padding: var(--mud-appbar-height) 0 var(--app-status-bar-height);
box-sizing: border-box;
} }
.mud-drawer-fixed.mud-drawer-mini.mud-drawer-clipped-always, .mud-drawer-fixed.mud-drawer-persistent:not(.mud-drawer-clipped-never), .mud-drawer-fixed.mud-drawer-responsive.mud-drawer-clipped-always, .mud-drawer-fixed.mud-drawer-temporary.mud-drawer-clipped-always { .mud-drawer-fixed.mud-drawer-mini.mud-drawer-clipped-always, .mud-drawer-fixed.mud-drawer-persistent:not(.mud-drawer-clipped-never), .mud-drawer-fixed.mud-drawer-responsive.mud-drawer-clipped-always, .mud-drawer-fixed.mud-drawer-temporary.mud-drawer-clipped-always {
height: calc(100% - var(--mud-appbar-height) - 35px); height: calc(100% - var(--mud-appbar-height) - var(--app-status-bar-height));
} }
.w-100 { .w-100 {
@@ -154,25 +155,68 @@ code {
margin-right: 5px; margin-right: 5px;
} }
.torrent-list .mud-table-container { /*. Layout helpers */
height: calc(100vh - 160px); .content-panel {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
} }
.file-list .mud-table-container { .content-panel__toolbar {
height: calc(100vh - 245px); flex: 0 0 auto;
} }
.details-list .mud-table-container { .content-panel__toolbar--scroll {
height: calc(100vh - 200px); overflow-x: auto;
white-space: nowrap;
} }
.details-tab-contents { .content-panel__body {
height: calc(100vh - 200px); flex: 1 1 auto;
overflow: auto; min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
} }
.content-panel__container {
flex: 1 1 auto;
display: flex;
flex-direction: column;
min-height: 0;
}
.content-panel__table {
flex: 1 1 auto;
display: flex;
flex-direction: column;
min-height: 0;
}
.content-panel__table .mud-table-container {
flex: 1 1 auto;
height: 100%;
}
.content-panel__body > .mud-tabs { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.content-panel__body > .mud-tabs .mud-tabs-panels { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.content-panel__body > .mud-tabs .mud-tab-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.content-panel__body > .mud-tabs .mud-tab-panel > .mud-tab-panel-content { flex: 1 1 auto; min-height: 0; overflow: auto; }
.torrent-list .mud-table-container,
.file-list .mud-table-container,
.details-list .mud-table-container,
.search-list .mud-table-container { .search-list .mud-table-container {
height: calc(100vh - 260px); height: 100%;
}
.details-tab-contents,
.options-tab-contents,
.rss-contents {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
} }
tr.log-normal td { tr.log-normal td {
@@ -220,10 +264,6 @@ td .folder-button {
padding: 6px 16px 6px 16px !important; padding: 6px 16px 6px 16px !important;
} }
.rss-contents {
height: calc(100vh - 149px);
}
@keyframes spin { @keyframes spin {
0% { 0% {
transform: rotate(0deg); transform: rotate(0deg);
@@ -256,3 +296,73 @@ td .folder-button {
.mud-popover .mud-divider:last-child { .mud-popover .mud-divider:last-child {
display: none; display: none;
} }
:root {
--app-viewport-height: 100vh;
--app-status-bar-height: 35px;
}
@supports (height: 100dvh) {
:root {
--app-viewport-height: 100dvh;
}
}
html,
body {
height: var(--app-viewport-height);
min-height: var(--app-viewport-height);
}
body {
margin: 0;
overflow: hidden;
overscroll-behavior: none;
}
#app,
.mud-layout {
height: 100%;
min-height: 100%;
}
.app-shell {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
overflow: hidden;
}
.app-shell__body {
display: flex;
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
.app-shell__sidebar {
flex: 0 0 auto;
}
.app-shell__main {
display: flex;
flex-direction: column;
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
padding: var(--mud-appbar-height) 0 var(--app-status-bar-height);
box-sizing: border-box;
}
.app-shell__status-bar.mud-appbar {
flex: 0 0 var(--app-status-bar-height);
height: var(--app-status-bar-height);
width: 100%;
background-color: var(--mud-palette-dark-lighten);
align-items: center;
justify-content: flex-start;
}
.app-shell__status-bar .mud-toolbar {
width: 100%;
}