- continue
This commit is contained in:
parent
5eba92e83a
commit
4af00fd978
3 changed files with 63 additions and 54 deletions
|
|
@ -218,6 +218,10 @@
|
|||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
|
|
@ -264,7 +268,21 @@
|
|||
"RelativeToolTip": "Components\\Pages\\Settings.razor",
|
||||
"ViewState": "AgIAAIsCAAAAAAAAAAArwKACAAAQAAAAAAAAAA==",
|
||||
"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",
|
||||
|
|
@ -278,19 +296,6 @@
|
|||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"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",
|
||||
"DocumentIndex": 1,
|
||||
|
|
@ -824,10 +829,6 @@
|
|||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|",
|
||||
"WhenOpened": "2026-05-14T10:14:25.605Z"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,16 +212,12 @@
|
|||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 7,
|
||||
"SelectedChildIndex": 5,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
|
|
@ -268,7 +264,19 @@
|
|||
"RelativeToolTip": "Components\\Pages\\Settings.razor",
|
||||
"ViewState": "AgIAAIsCAAAAAAAAAAArwKACAAAQAAAAAAAAAA==",
|
||||
"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": ""
|
||||
},
|
||||
{
|
||||
|
|
@ -283,19 +291,6 @@
|
|||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"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",
|
||||
"DocumentIndex": 1,
|
||||
|
|
|
|||
|
|
@ -493,6 +493,7 @@ else
|
|||
private string exportFileName = string.Empty;
|
||||
private string exportFormat = "Html";
|
||||
private long _lastThoughtScrollTicks;
|
||||
private string? _lastVisitedPage;
|
||||
|
||||
[Inject]
|
||||
private NavigationManager Navigation { get; set; } = default!;
|
||||
|
|
@ -552,23 +553,30 @@ else
|
|||
|
||||
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);
|
||||
|
||||
// Auto-login runs AFTER circuit establishment (correct scoped services)
|
||||
await LoadCurrentUser();
|
||||
// #if DEBUG
|
||||
// if (!_isAuthenticated && Program.DebugAutoLogin)
|
||||
// {
|
||||
// var users = await SettingsService.GetUsersAsync();
|
||||
// var first = users.FirstOrDefault(u => u.Role == UserRole.Administrator);
|
||||
// if (first != null)
|
||||
// {
|
||||
// await AuthService.AdminBypassLoginAsync(first.Id);
|
||||
// AuthStateProvider.NotifyStateChanged();
|
||||
// await LoadCurrentUser();
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
// #if DEBUG
|
||||
// if (!_isAuthenticated && Program.DebugAutoLogin)
|
||||
// {
|
||||
// var users = await SettingsService.GetUsersAsync();
|
||||
// var first = users.FirstOrDefault(u => u.Role == UserRole.Administrator);
|
||||
// if (first != null)
|
||||
// {
|
||||
// await AuthService.AdminBypassLoginAsync(first.Id);
|
||||
// AuthStateProvider.NotifyStateChanged();
|
||||
// await LoadCurrentUser();
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
if (_isAuthenticated)
|
||||
{
|
||||
await LoadProjects();
|
||||
|
|
@ -606,9 +614,14 @@ else
|
|||
await LoadProjects();
|
||||
await LoadProjectContext();
|
||||
|
||||
if (Navigation.Uri.Contains("quick-markdown") ||
|
||||
Navigation.Uri.Contains("chat") ||
|
||||
Navigation.Uri.Contains("editor/"))
|
||||
{
|
||||
// Save current page to localStorage
|
||||
await JS.InvokeVoidAsync("localStorage.setItem", "last_visited_page", Navigation.Uri);
|
||||
}
|
||||
}
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue