- continue

This commit is contained in:
Roland 2026-08-30 15:38:12 +02:00
parent 5eba92e83a
commit 4af00fd978
3 changed files with 63 additions and 54 deletions

View file

@ -218,6 +218,10 @@
"$type": "Bookmark", "$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
}, },
{
"$type": "Bookmark",
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
},
{ {
"$type": "Document", "$type": "Document",
"DocumentIndex": 5, "DocumentIndex": 5,
@ -264,7 +268,21 @@
"RelativeToolTip": "Components\\Pages\\Settings.razor", "RelativeToolTip": "Components\\Pages\\Settings.razor",
"ViewState": "AgIAAIsCAAAAAAAAAAArwKACAAAQAAAAAAAAAA==", "ViewState": "AgIAAIsCAAAAAAAAAAArwKACAAAQAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:43:26.6Z" "WhenOpened": "2026-05-15T16:43:26.6Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MainLayout.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor",
"ViewState": "AgIAAFkCAAAAAAAAAADgv2oCAAAwAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:04:36.444Z",
"EditorCaption": ""
}, },
{ {
"$type": "Document", "$type": "Document",
@ -278,19 +296,6 @@
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-06-26T13:33:25.661Z" "WhenOpened": "2026-06-26T13:33:25.661Z"
}, },
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MainLayout.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor",
"ViewState": "AgIAAO8BAAAAAAAAAAAiwAICAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:04:36.444Z",
"EditorCaption": ""
},
{ {
"$type": "Document", "$type": "Document",
"DocumentIndex": 1, "DocumentIndex": 1,
@ -824,10 +829,6 @@
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|",
"WhenOpened": "2026-05-14T10:14:25.605Z" "WhenOpened": "2026-05-14T10:14:25.605Z"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
} }
] ]
} }

View file

@ -212,16 +212,12 @@
"DocumentGroups": [ "DocumentGroups": [
{ {
"DockedWidth": 200, "DockedWidth": 200,
"SelectedChildIndex": 7, "SelectedChildIndex": 5,
"Children": [ "Children": [
{ {
"$type": "Bookmark", "$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
}, },
{
"$type": "Bookmark",
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
},
{ {
"$type": "Document", "$type": "Document",
"DocumentIndex": 5, "DocumentIndex": 5,
@ -268,7 +264,19 @@
"RelativeToolTip": "Components\\Pages\\Settings.razor", "RelativeToolTip": "Components\\Pages\\Settings.razor",
"ViewState": "AgIAAIsCAAAAAAAAAAArwKACAAAQAAAAAAAAAA==", "ViewState": "AgIAAIsCAAAAAAAAAAArwKACAAAQAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:43:26.6Z", "WhenOpened": "2026-05-15T16:43:26.6Z"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MainLayout.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor",
"ViewState": "AgIAAFkCAAAAAAAAAADgv2oCAAAwAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:04:36.444Z",
"EditorCaption": "" "EditorCaption": ""
}, },
{ {
@ -283,19 +291,6 @@
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-06-26T13:33:25.661Z" "WhenOpened": "2026-06-26T13:33:25.661Z"
}, },
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MainLayout.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor",
"ViewState": "AgIAAFUCAAAAAAAAAAAiwGECAABPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:04:36.444Z",
"EditorCaption": ""
},
{ {
"$type": "Document", "$type": "Document",
"DocumentIndex": 1, "DocumentIndex": 1,

View file

@ -493,6 +493,7 @@ else
private string exportFileName = string.Empty; private string exportFileName = string.Empty;
private string exportFormat = "Html"; private string exportFormat = "Html";
private long _lastThoughtScrollTicks; private long _lastThoughtScrollTicks;
private string? _lastVisitedPage;
[Inject] [Inject]
private NavigationManager Navigation { get; set; } = default!; private NavigationManager Navigation { get; set; } = default!;
@ -548,27 +549,34 @@ else
protected override async Task OnAfterRenderAsync(bool firstRender) protected override async Task OnAfterRenderAsync(bool firstRender)
{ {
var themeChanged = OllamaSettings.Theme != ThemeService.Theme; var themeChanged = OllamaSettings.Theme != ThemeService.Theme;
if (firstRender) if (firstRender)
{ {
// Restore last visited page from localStorage
_lastVisitedPage = await JS.InvokeAsync<string>("localStorage.getItem", "last_visited_page");
if (!string.IsNullOrEmpty(_lastVisitedPage))
{
Navigation.NavigateTo(_lastVisitedPage);
}
await ThemeService.ApplyTheme(OllamaSettings.Theme); await ThemeService.ApplyTheme(OllamaSettings.Theme);
// Auto-login runs AFTER circuit establishment (correct scoped services) // Auto-login runs AFTER circuit establishment (correct scoped services)
await LoadCurrentUser(); await LoadCurrentUser();
// #if DEBUG // #if DEBUG
// if (!_isAuthenticated && Program.DebugAutoLogin) // if (!_isAuthenticated && Program.DebugAutoLogin)
// { // {
// var users = await SettingsService.GetUsersAsync(); // var users = await SettingsService.GetUsersAsync();
// var first = users.FirstOrDefault(u => u.Role == UserRole.Administrator); // var first = users.FirstOrDefault(u => u.Role == UserRole.Administrator);
// if (first != null) // if (first != null)
// { // {
// await AuthService.AdminBypassLoginAsync(first.Id); // await AuthService.AdminBypassLoginAsync(first.Id);
// AuthStateProvider.NotifyStateChanged(); // AuthStateProvider.NotifyStateChanged();
// await LoadCurrentUser(); // await LoadCurrentUser();
// } // }
// } // }
// #endif // #endif
if (_isAuthenticated) if (_isAuthenticated)
{ {
await LoadProjects(); await LoadProjects();
@ -605,9 +613,14 @@ else
{ {
await LoadProjects(); await LoadProjects();
await LoadProjectContext(); await LoadProjectContext();
// Save current page to localStorage if (Navigation.Uri.Contains("quick-markdown") ||
await JS.InvokeVoidAsync("localStorage.setItem", "last_visited_page", Navigation.Uri); Navigation.Uri.Contains("chat") ||
Navigation.Uri.Contains("editor/"))
{
// Save current page to localStorage
await JS.InvokeVoidAsync("localStorage.setItem", "last_visited_page", Navigation.Uri);
}
} }
StateHasChanged(); StateHasChanged();
} }