diff --git a/CouchLog/Components/AdminSettings/Pages/Index.razor b/CouchLog/Components/AdminSettings/Pages/Index.razor new file mode 100644 index 0000000..e506207 --- /dev/null +++ b/CouchLog/Components/AdminSettings/Pages/Index.razor @@ -0,0 +1,7 @@ +@page "/AdminSettings" + +

Index

+ +@code { + +} diff --git a/CouchLog/Components/AdminSettings/Pages/UserManagement.razor b/CouchLog/Components/AdminSettings/Pages/UserManagement.razor new file mode 100644 index 0000000..930e403 --- /dev/null +++ b/CouchLog/Components/AdminSettings/Pages/UserManagement.razor @@ -0,0 +1,7 @@ +@page "/AdminSettings/UserManagement" + +

UserManagement

+ +@code { + +} diff --git a/CouchLog/Components/AdminSettings/Pages/_Imports.razor b/CouchLog/Components/AdminSettings/Pages/_Imports.razor new file mode 100644 index 0000000..7ff33ad --- /dev/null +++ b/CouchLog/Components/AdminSettings/Pages/_Imports.razor @@ -0,0 +1,2 @@ +@using CouchLog.Components.AdminSettings.Shared +@layout AdminSettingsLayout \ No newline at end of file diff --git a/CouchLog/Components/AdminSettings/Shared/AdminSettingsLayout.razor b/CouchLog/Components/AdminSettings/Shared/AdminSettingsLayout.razor new file mode 100644 index 0000000..626588c --- /dev/null +++ b/CouchLog/Components/AdminSettings/Shared/AdminSettingsLayout.razor @@ -0,0 +1,17 @@ +@inherits LayoutComponentBase +@layout CouchLog.Components.Layout.MainLayout + +

Manage your account

+ +
+

Change your account settings

+
+
+
+ +
+
+ @Body +
+
+
\ No newline at end of file diff --git a/CouchLog/Components/AdminSettings/Shared/AdminSettingsNavMenu.razor b/CouchLog/Components/AdminSettings/Shared/AdminSettingsNavMenu.razor new file mode 100644 index 0000000..3202bbf --- /dev/null +++ b/CouchLog/Components/AdminSettings/Shared/AdminSettingsNavMenu.razor @@ -0,0 +1,18 @@ +@using Microsoft.AspNetCore.Identity +@using CouchLog.Data + +@inject SignInManager SignInManager + + \ No newline at end of file diff --git a/CouchLog/Components/Layout/MainLayout.razor b/CouchLog/Components/Layout/MainLayout.razor index 78624f3..e188a38 100644 --- a/CouchLog/Components/Layout/MainLayout.razor +++ b/CouchLog/Components/Layout/MainLayout.razor @@ -6,10 +6,6 @@
-
- About -
-
@Body
diff --git a/CouchLog/Components/Pages/AdminSettings.razor b/CouchLog/Components/Pages/AdminSettings.razor deleted file mode 100644 index b9d02ac..0000000 --- a/CouchLog/Components/Pages/AdminSettings.razor +++ /dev/null @@ -1,7 +0,0 @@ -@page "/AdminSettings" - -@using Microsoft.AspNetCore.Authorization - -@attribute [Authorize] - -Admin Settings \ No newline at end of file diff --git a/CouchLog/Components/Pages/GlobalList.razor b/CouchLog/Components/Pages/GlobalList.razor index 050de7b..5444781 100644 --- a/CouchLog/Components/Pages/GlobalList.razor +++ b/CouchLog/Components/Pages/GlobalList.razor @@ -16,6 +16,7 @@ GlobalList
+

Global List

@@ -59,13 +60,17 @@
+ + +
@foreach (var Entity in GlobalEntities) {
-
- + +
+ + }
+
@code @@ -268,4 +291,24 @@ GenreIds.Add(GenreId); } } + + private async Task DeleteEntity(GlobalEntity entity) + { + if(entity.PicturePath != null) + { + try + { + File.Delete(Path.Combine("wwwroot", entity.PicturePath)); + } + catch(Exception) + { + } + } + + CouchLogDB.GlobalEntities.Remove(entity); + + await CouchLogDB.SaveChangesAsync(); + + NavigationManager.NavigateTo(NavigationManager.Uri, true); + } } \ No newline at end of file diff --git a/CouchLog/CouchLog.sln b/CouchLog/CouchLog.sln index c459fa5..7f8153c 100644 --- a/CouchLog/CouchLog.sln +++ b/CouchLog/CouchLog.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.14.36511.14 +# Visual Studio Version 18 +VisualStudioVersion = 18.1.11304.174 d18.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CouchLog", "CouchLog.csproj", "{4FBF15C3-5FC5-4605-9EBC-3F7DA1ADC47A}" EndProject diff --git a/CouchLog/wwwroot/Pictures/James Bond Casino Royale_2b7bafde-0d3a-44ca-816f-54da65c2a482.jpg b/CouchLog/wwwroot/Pictures/James Bond Casino Royale_2b7bafde-0d3a-44ca-816f-54da65c2a482.jpg deleted file mode 100644 index c29322f..0000000 Binary files a/CouchLog/wwwroot/Pictures/James Bond Casino Royale_2b7bafde-0d3a-44ca-816f-54da65c2a482.jpg and /dev/null differ diff --git a/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_2df9da94-dccd-42aa-a4fd-bd4f354f8655.jpg b/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_2df9da94-dccd-42aa-a4fd-bd4f354f8655.jpg deleted file mode 100644 index c29322f..0000000 Binary files a/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_2df9da94-dccd-42aa-a4fd-bd4f354f8655.jpg and /dev/null differ diff --git a/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_6272acfb-d5b5-4e1c-a28c-38d2cc41393e.jpg b/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_6272acfb-d5b5-4e1c-a28c-38d2cc41393e.jpg deleted file mode 100644 index c29322f..0000000 Binary files a/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_6272acfb-d5b5-4e1c-a28c-38d2cc41393e.jpg and /dev/null differ diff --git a/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_6c6e842a-409a-47e1-b0c7-8c9335438c65.jpg b/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_6c6e842a-409a-47e1-b0c7-8c9335438c65.jpg deleted file mode 100644 index c29322f..0000000 Binary files a/CouchLog/wwwroot/Pictures/James_Bond_Casino_Royale_6c6e842a-409a-47e1-b0c7-8c9335438c65.jpg and /dev/null differ diff --git a/CouchLog/wwwroot/Pictures/Robin_Hood_f1e1a307-f81b-4404-b583-d64eb743a49f.jpg b/CouchLog/wwwroot/Pictures/Robin_Hood_f1e1a307-f81b-4404-b583-d64eb743a49f.jpg deleted file mode 100644 index 7c5bcb6..0000000 Binary files a/CouchLog/wwwroot/Pictures/Robin_Hood_f1e1a307-f81b-4404-b583-d64eb743a49f.jpg and /dev/null differ