- improve mobile view

This commit is contained in:
Roland 2026-07-05 07:47:01 +02:00
parent e64a38ccdf
commit 890b5bbf0b
5 changed files with 109 additions and 12 deletions

View file

@ -224,8 +224,7 @@
"RelativeToolTip": "wwwroot\\app.css",
"ViewState": "AgIAAJYCAAAAAAAAAAAiwKoCAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003000|",
"WhenOpened": "2026-07-04T08:22:21.143Z",
"EditorCaption": ""
"WhenOpened": "2026-07-04T08:22:21.143Z"
},
{
"$type": "Document",
@ -271,7 +270,7 @@
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor",
"ViewState": "AgIAADIAAAAAAAAAAAApwEUAAAByAAAAAAAAAA==",
"ViewState": "AgIAADMAAAAAAAAAAAApwEYAAAByAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:04:36.444Z",
"EditorCaption": ""
@ -310,8 +309,7 @@
"RelativeToolTip": "Components\\Pages\\Settings.razor",
"ViewState": "AgIAABIAAAAAAAAAAAAAADMAAAAfAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:43:26.6Z",
"EditorCaption": ""
"WhenOpened": "2026-05-15T16:43:26.6Z"
},
{
"$type": "Document",

View file

@ -224,8 +224,7 @@
"RelativeToolTip": "wwwroot\\app.css",
"ViewState": "AgIAAJYCAAAAAAAAAAAiwKoCAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003000|",
"WhenOpened": "2026-07-04T08:22:21.143Z",
"EditorCaption": ""
"WhenOpened": "2026-07-04T08:22:21.143Z"
},
{
"$type": "Document",
@ -271,7 +270,7 @@
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor",
"ViewState": "AgIAADIAAAAAAAAAAAApwEUAAAByAAAAAAAAAA==",
"ViewState": "AgIAADMAAAAAAAAAAAApwEYAAAByAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:04:36.444Z",
"EditorCaption": ""
@ -310,8 +309,7 @@
"RelativeToolTip": "Components\\Pages\\Settings.razor",
"ViewState": "AgIAABIAAAAAAAAAAAAAADMAAAAfAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:43:26.6Z",
"EditorCaption": ""
"WhenOpened": "2026-05-15T16:43:26.6Z"
},
{
"$type": "Document",

View file

@ -29,7 +29,8 @@ else
<div class="main-content">
@if (_isAuthenticated)
{
<aside class="sidebar">
<aside class="sidebar @(_showMobileSidebar ? "mobile-visible" : "")">
<div class="mobile-sidebar-close" @onclick="CloseMobileSidebar">✕</div>
<div class="sidebar-logo">
<img src="/Assets/logo.jpg" alt="Author Buddy" />
</div>
@ -343,6 +344,14 @@ else
</aside>
}
@if (_isAuthenticated)
{
<button class="hamburger" @onclick="ToggleMobileSidebar">☰</button>
}
@if (_showMobileSidebar)
{
<div class="mobile-sidebar-backdrop" @onclick="CloseMobileSidebar"></div>
}
<main class="detail-panel">
@if (currentProjectId > 0)
{
@ -452,6 +461,7 @@ else
private string newFileName = string.Empty;
private FileTreeItem? newFileParentDir;
private bool showCopyProjectDialog;
private bool _showMobileSidebar;
private Action? _opStateHandler;
private string? _editingCategoryPath;
private HashSet<string> _selectedFiles = new();
@ -710,9 +720,20 @@ else
private void NavigateTo(string path)
{
activeSection = null;
_showMobileSidebar = false;
Navigation.NavigateTo(path);
}
private void ToggleMobileSidebar()
{
_showMobileSidebar = !_showMobileSidebar;
}
private void CloseMobileSidebar()
{
_showMobileSidebar = false;
}
private void ToggleInfoOverlay()
{
_showInfoOverlay = !_showInfoOverlay;

View file

@ -3,7 +3,7 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>E:\ollama_net\ollama\AuthorBuddy.Web\bin\Release\net10.0\publish\</_PublishTargetUrl>
<History>True|2026-07-04T08:31:55.1105019Z||;True|2026-07-03T19:42:19.2725521+02:00||;True|2026-07-03T19:14:41.2291817+02:00||;True|2026-06-26T17:29:16.2419779+02:00||;True|2026-06-14T08:09:44.9432726+02:00||;</History>
<History>True|2026-07-05T05:05:59.5910017Z||;True|2026-07-04T10:31:55.1105019+02:00||;True|2026-07-03T19:42:19.2725521+02:00||;True|2026-07-03T19:14:41.2291817+02:00||;True|2026-06-26T17:29:16.2419779+02:00||;True|2026-06-14T08:09:44.9432726+02:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

View file

@ -1237,6 +1237,37 @@ button.primary {
border-color: var(--accent-color);
}
/* Hamburger menu */
.hamburger {
display: none;
align-self: flex-start;
flex-shrink: 0;
z-index: 1100;
font-size: 24px;
width: 40px;
height: 40px;
border: none;
background: var(--button-bg);
color: var(--text-main);
cursor: pointer;
border-radius: 4px;
line-height: 40px;
text-align: center;
margin: 6px;
}
.hamburger:hover {
background: var(--button-hover);
}
.mobile-sidebar-backdrop {
display: none;
}
.mobile-sidebar-close {
display: none;
}
/* Editor modified badge */
.editor-modified-badge {
color: #e74c3c;
@ -1765,10 +1796,59 @@ button.primary {
overflow: auto;
}
.hamburger {
display: inline-flex;
align-items: center;
justify-content: center;
}
.mobile-sidebar-backdrop {
display: block;
}
.sidebar {
display: none;
}
.mobile-sidebar-close {
display: block;
position: absolute;
top: 6px;
right: 6px;
z-index: 1060;
font-size: 20px;
width: 32px;
height: 32px;
border: none;
background: transparent;
color: var(--text-main);
cursor: pointer;
border-radius: 4px;
line-height: 32px;
text-align: center;
}
.mobile-sidebar-close:hover {
background: var(--button-hover);
}
.sidebar.mobile-visible {
display: flex;
flex-direction: column;
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 1050;
width: 280px;
max-width: 85vw;
min-width: 200px;
border-right: 2px solid var(--border-color);
background: var(--window-bg);
padding: 4px;
overflow-y: auto;
}
.main-content {
flex-direction: column;
}