From c6a9da834c1e6187ffdb5a1b4fff036b03fea26f Mon Sep 17 00:00:00 2001 From: Daniel Balk <67603460+Daniel-Balk@users.noreply.github.com> Date: Thu, 6 Apr 2023 01:26:31 +0200 Subject: [PATCH] added domain overview --- .../Views/Domain/{Index.razor => View.razor} | 0 Moonlight/Shared/Views/Domains.razor | 49 +++++++++++++++++++ 2 files changed, 49 insertions(+) rename Moonlight/Shared/Views/Domain/{Index.razor => View.razor} (100%) diff --git a/Moonlight/Shared/Views/Domain/Index.razor b/Moonlight/Shared/Views/Domain/View.razor similarity index 100% rename from Moonlight/Shared/Views/Domain/Index.razor rename to Moonlight/Shared/Views/Domain/View.razor diff --git a/Moonlight/Shared/Views/Domains.razor b/Moonlight/Shared/Views/Domains.razor index b225122..e98fc70 100644 --- a/Moonlight/Shared/Views/Domains.razor +++ b/Moonlight/Shared/Views/Domains.razor @@ -1,2 +1,51 @@ @page "/domains" +@using Moonlight.App.Repositories.Domains +@using Moonlight.App.Database.Entities +@using Microsoft.EntityFrameworkCore +@using BlazorTable +@using Moonlight.App.Services +@using domain = Moonlight.App.Database.Entities.Domain + +@inject DomainRepository DomainRepository +@inject DomainService DomainService +@inject SmartTranslateService SmartTranslateService + + + @foreach (var domain in domains) + { +
+
+ +
+
+ } +
+ +@code { + [CascadingParameter] + public User? User { get; set; } + + private domain[] domains { get; set; } + + public async Task Load(LazyLoader loader) + { + domains = DomainRepository + .Get() + .Include(x => x.SharedDomain) + .Include(x => x.Owner) + .Where(x => x.Owner == User) + .ToArray(); + } +} \ No newline at end of file