From 9332029c4a0dd9533e9698f1d20c5b30c974b460 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Thu, 6 Apr 2023 19:20:28 +0200 Subject: [PATCH] Removed legacy database ui --- .../Components/Partials/SidebarMenu.razor | 8 -- Moonlight/Shared/Views/Admin/Index.razor | 34 +++------ Moonlight/Shared/Views/Index.razor | 76 +++++-------------- 3 files changed, 30 insertions(+), 88 deletions(-) diff --git a/Moonlight/Shared/Components/Partials/SidebarMenu.razor b/Moonlight/Shared/Components/Partials/SidebarMenu.razor index 2d82030e..c7e6c692 100644 --- a/Moonlight/Shared/Components/Partials/SidebarMenu.razor +++ b/Moonlight/Shared/Components/Partials/SidebarMenu.razor @@ -52,14 +52,6 @@ else Websites -
@@ -50,27 +53,6 @@
-
-
-
-
-
-
- Databases -
- - @(DatabaseCount) - -
-
- - - -
-
-
-
-
@@ -80,7 +62,7 @@ Domains - 0 + @(DomainCount)
-
-
-
-
-
-
- Databases -
- - @(DatabaseCount) - -
-
- - - -
-
-
-
-
-
-
- -
-
- - Create a database - - - A quick way to store your data and manage it from all around the world - -
-
-
@@ -188,20 +157,6 @@
-
-
- -
-
- - Manage your databases - - - Insert, delete and update the data in your databases - -
-
-
@@ -239,16 +194,27 @@ [CascadingParameter] public User User { get; set; } - private int DatabaseCount = 0; private int ServerCount = 0; + private int DomainCount = 0; + private int WebsiteCount = 0; - private async Task Load(LazyLoader lazyLoader) + private Task Load(LazyLoader lazyLoader) { - DatabaseCount = 0; - ServerCount = ServerRepository .Get() .Include(x => x.Owner) .Count(x => x.Owner.Id == User.Id); + + DomainCount = DomainRepository + .Get() + .Include(x => x.Owner) + .Count(x => x.Owner.Id == User.Id); + + WebsiteCount = WebsiteRepository + .Get() + .Include(x => x.Owner) + .Count(x => x.Owner.Id == User.Id); + + return Task.CompletedTask; } } \ No newline at end of file