diff --git a/Oqtane.Client/Modules/Admin/Login/Index.razor b/Oqtane.Client/Modules/Admin/Login/Index.razor index 99d297b0..ebf204b5 100644 --- a/Oqtane.Client/Modules/Admin/Login/Index.razor +++ b/Oqtane.Client/Modules/Admin/Login/Index.razor @@ -117,7 +117,7 @@ { await logger.LogInformation("Login Successful For Username {Username}", Username); authstateprovider.NotifyAuthenticationChanged(); - NavigationManager.NavigateTo(NavigateUrl(ReturnUrl)); + NavigationManager.NavigateTo(NavigateUrl(ReturnUrl, "reload")); } else { diff --git a/Oqtane.Client/Modules/Admin/Tenants/Add.razor b/Oqtane.Client/Modules/Admin/Tenants/Add.razor index 6acbe5be..90fb1e05 100644 --- a/Oqtane.Client/Modules/Admin/Tenants/Add.razor +++ b/Oqtane.Client/Modules/Admin/Tenants/Add.razor @@ -85,7 +85,7 @@ string name = ""; string type = "LocalDB"; string server = "(LocalDb)\\MSSQLLocalDB"; - string database = "Oqtane-" + DateTime.Now.ToString("yyyyMMddHHmm"); + string database = "Oqtane-" + DateTime.UtcNow.ToString("yyyyMMddHHmm"); string username = ""; string password = ""; string schema = ""; diff --git a/Oqtane.Client/Modules/Admin/UserProfile/Add.razor b/Oqtane.Client/Modules/Admin/UserProfile/Add.razor index a5c3656f..f66ac87f 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/Add.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/Add.razor @@ -81,7 +81,7 @@ notification.Subject = subject; notification.Body = body; notification.ParentId = null; - notification.CreatedOn = DateTime.Now; + notification.CreatedOn = DateTime.UtcNow; notification.IsDelivered = false; notification.DeliveredOn = null; diff --git a/Oqtane.Client/Modules/Admin/UserProfile/View.razor b/Oqtane.Client/Modules/Admin/UserProfile/View.razor index 076e55e8..951ac04d 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/View.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/View.razor @@ -140,7 +140,7 @@ notification.Subject = subject; notification.Body = body; notification.ParentId = notificationid; - notification.CreatedOn = DateTime.Now; + notification.CreatedOn = DateTime.UtcNow; notification.IsDelivered = false; notification.DeliveredOn = null; diff --git a/Oqtane.Client/Modules/Weather/Index.razor b/Oqtane.Client/Modules/Weather/Index.razor index 88e346f8..081469b7 100644 --- a/Oqtane.Client/Modules/Weather/Index.razor +++ b/Oqtane.Client/Modules/Weather/Index.razor @@ -37,6 +37,6 @@ else protected override async Task OnInitializedAsync() { WeatherForecastService forecastservice = new WeatherForecastService(); - forecasts = await forecastservice.GetForecastAsync(DateTime.Now); + forecasts = await forecastservice.GetForecastAsync(DateTime.UtcNow); } } \ No newline at end of file diff --git a/Oqtane.Client/Services/Interfaces/IPageService.cs b/Oqtane.Client/Services/Interfaces/IPageService.cs index 35ae6a2f..3a2ab862 100644 --- a/Oqtane.Client/Services/Interfaces/IPageService.cs +++ b/Oqtane.Client/Services/Interfaces/IPageService.cs @@ -9,6 +9,7 @@ namespace Oqtane.Services Task> GetPagesAsync(int SiteId); Task GetPageAsync(int PageId); Task GetPageAsync(int PageId, int UserId); + Task GetPageAsync(string Path, int SiteId); Task AddPageAsync(Page Page); Task AddPageAsync(int PageId, int UserId); Task UpdatePageAsync(Page Page); diff --git a/Oqtane.Client/Services/ModuleDefinitionService.cs b/Oqtane.Client/Services/ModuleDefinitionService.cs index a2952e4c..f2ddb714 100644 --- a/Oqtane.Client/Services/ModuleDefinitionService.cs +++ b/Oqtane.Client/Services/ModuleDefinitionService.cs @@ -59,13 +59,13 @@ namespace Oqtane.Services public async Task LoadModuleDefinitionsAsync(int SiteId) { + // get list of modules from the server + List moduledefinitions = await GetModuleDefinitionsAsync(SiteId); + // download assemblies to browser when running client-side Blazor var authstateprovider = (IdentityAuthenticationStateProvider)_serviceProvider.GetService(typeof(IdentityAuthenticationStateProvider)); if (authstateprovider != null) { - // get list of modules from the server - List moduledefinitions = await GetModuleDefinitionsAsync(SiteId); - // get list of loaded assemblies on the client ( in the client-side hosting module the browser client has its own app domain ) Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); diff --git a/Oqtane.Client/Services/PageService.cs b/Oqtane.Client/Services/PageService.cs index 9ad8cbbc..4b757600 100644 --- a/Oqtane.Client/Services/PageService.cs +++ b/Oqtane.Client/Services/PageService.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Components; using System.Collections.Generic; using Oqtane.Shared; using System; +using System.Net; namespace Oqtane.Services { @@ -44,6 +45,18 @@ namespace Oqtane.Services return await _http.GetJsonAsync(apiurl + "/" + PageId.ToString() + "?userid=" + UserId.ToString()); } + public async Task GetPageAsync(string Path, int SiteId) + { + try + { + return await _http.GetJsonAsync(apiurl + "/path/" + SiteId.ToString() + "?path=" + WebUtility.UrlEncode(Path)); + } + catch + { + return null; + } + } + public async Task AddPageAsync(Page Page) { return await _http.PostJsonAsync(apiurl, Page); diff --git a/Oqtane.Client/Themes/Controls/ControlPanel.razor b/Oqtane.Client/Themes/Controls/ControlPanel.razor index 4f4c7a77..f30d2435 100644 --- a/Oqtane.Client/Themes/Controls/ControlPanel.razor +++ b/Oqtane.Client/Themes/Controls/ControlPanel.razor @@ -76,7 +76,7 @@
- +