-
- @if (photofileid != -1)
- {
-
))
- }
- else
- {
-
- }
-
-
-
-
-
-
+
+
+ @if (PageState.User != null)
+ {
+ @if (photofileid != -1)
+ {
+
+ }
+ else
+ {
-
-
- @if (filter == "to")
+ }
+
+
+
+ }
+
+
+ @if (profiles != null)
+ {
+
+
+
+ }
+
+
+ @if (notifications != null)
+ {
+
+
+ @if (filter == "to")
+ {
+
+
+ |
+ |
+ From |
+ Subject |
+ Received |
+
+
+ |
+ |
+ @(context.FromUser == null ? "System" : context.FromUser.DisplayName) |
+ @context.Subject |
+ @context.CreatedOn |
+
+
+ |
+ @(context.Body.Length > 100 ? context.Body.Substring(0, 100) : context.Body) |
+
+
+ }
+ else
+ {
+
+
+ |
+ |
+ To |
+ Subject |
+ Sent |
+
+
+ |
+ |
+ @(context.ToUser == null ? context.ToEmail : context.ToUser.DisplayName) |
+ @context.Subject |
+ @context.CreatedOn |
+
+
+ |
+ @(context.Body.Length > 100 ? context.Body.Substring(0, 100) : context.Body) |
+
+
+ }
+
+
+ }
+
+
@code {
private string username = string.Empty;
@@ -196,15 +187,15 @@
username = PageState.User.Username;
email = PageState.User.Email;
displayname = PageState.User.DisplayName;
-
+
if (PageState.User.PhotoFileId != null)
{
photofileid = PageState.User.PhotoFileId.Value;
}
-
+
profiles = await ProfileService.GetProfilesAsync(ModuleState.SiteId);
settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId);
-
+
await LoadNotificationsAsync();
}
else
@@ -243,12 +234,12 @@
user.DisplayName = (displayname == string.Empty ? username : displayname);
user.PhotoFileId = null;
photofileid = filemanager.GetFileId();
-
+
if (photofileid != -1)
{
user.PhotoFileId = photofileid;
}
-
+
await UserService.UpdateUserAsync(user);
await SettingService.UpdateUserSettingsAsync(settings, PageState.User.UserId);
await logger.LogInformation("User Profile Saved");
@@ -294,7 +285,7 @@
{
await NotificationService.DeleteNotificationAsync(Notification.NotificationId);
}
-
+
await logger.LogInformation("Notification Deleted {Notification}", Notification);
await LoadNotificationsAsync();
StateHasChanged();
@@ -309,7 +300,7 @@
private async void FilterChanged(ChangeEventArgs e)
{
filter = (string)e.Value;
-
+
await LoadNotificationsAsync();
StateHasChanged();
}
diff --git a/Oqtane.Client/Modules/Controls/PermissionGrid.razor b/Oqtane.Client/Modules/Controls/PermissionGrid.razor
index 48a3d5b8..543403f2 100644
--- a/Oqtane.Client/Modules/Controls/PermissionGrid.razor
+++ b/Oqtane.Client/Modules/Controls/PermissionGrid.razor
@@ -12,7 +12,7 @@
Role |
@foreach (PermissionString permission in _permissions)
{
-
@permission.PermissionName @EntityName |
+
@permission.PermissionName |
}
@foreach (Role role in _roles)
@@ -38,7 +38,7 @@
User |
@foreach (PermissionString permission in _permissions)
{
-
@permission.PermissionName @EntityName |
+
@permission.PermissionName |
}
diff --git a/Oqtane.Client/Modules/Controls/TabStrip.razor b/Oqtane.Client/Modules/Controls/TabStrip.razor
index 10527d0f..4f0b872f 100644
--- a/Oqtane.Client/Modules/Controls/TabStrip.razor
+++ b/Oqtane.Client/Modules/Controls/TabStrip.razor
@@ -38,7 +38,15 @@
public RenderFragment ChildContent { get; set; } // contains the TabPanels
[Parameter]
- public string ActiveTab { get; set; } // optional - defaults to first TabPanel if not specified
+ public string ActiveTab { get; set; } // optional - defaults to first TabPanel if not specified. Can also be set using a "tab=" querystring parameter.
+
+ protected override void OnInitialized()
+ {
+ if (PageState.QueryString.ContainsKey("tab"))
+ {
+ ActiveTab = PageState.QueryString["tab"];
+ }
+ }
internal void AddTabPanel(TabPanel tabPanel)
{
@@ -47,6 +55,7 @@
{
ActiveTab = tabPanel.Name;
}
+ StateHasChanged();
}
private string DisplayHeading(string Name, string Heading)