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