Added webspace delete
This commit is contained in:
@@ -10,7 +10,12 @@
|
||||
<div class="col-xl-4 mb-xl-10">
|
||||
<div class="card h-md-100">
|
||||
<div class="card-body d-flex flex-column flex-center">
|
||||
<img class="img-fluid" src="https://shs.moonlightpanel.xyz/api/screenshot?url=http://@(CurrentWebSpace.Domain)" alt="Website screenshot"/>
|
||||
<div class="position-relative" style="width: 100%; height: 0; padding-bottom: 56.25%;">
|
||||
<div class="position-absolute top-0 start-0 w-100 h-100 d-flex justify-content-center align-items-center">
|
||||
<img class="img-fluid" src="/assets/media/gif/loading.gif" alt="Placeholder" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;">
|
||||
<div class="position-absolute top-0 start-0 w-100 h-100" style="background-image: url('https://shs.moonlightpanel.xyz/api/screenshot?url=http://@(CurrentWebSpace.Domain)'); background-size: cover; background-position: center;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
@using Moonlight.App.Database.Entities
|
||||
@using Moonlight.App.Services
|
||||
@using Moonlight.App.Services.Interop
|
||||
|
||||
@inject SmartTranslateService SmartTranslateService
|
||||
@inject WebSpaceService WebSpaceService
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject AlertService AlertService
|
||||
|
||||
<div class="card card-body">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex">
|
||||
<div class="symbol symbol-circle me-5">
|
||||
<div class="symbol-label bg-transparent text-primary border border-secondary border-dashed">
|
||||
<i class="bx bx-globe bx-md"></i>
|
||||
@@ -14,13 +21,17 @@
|
||||
<div class="text-muted fs-5">@(WebSpace.CloudPanel.Name)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<WButton Text="@(SmartTranslateService.Translate("Delete"))"
|
||||
WorkingText="@(SmartTranslateService.Translate("Deleting"))"
|
||||
OnClick="Delete"
|
||||
CssClasses="btn-danger">
|
||||
</WButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="separator my-5"></div>
|
||||
</div>
|
||||
<div class="card mb-5 mb-xl-10">
|
||||
<div class="my-5"></div>
|
||||
<div class="card mb-xl-10 mb-5">
|
||||
<div class="card-body pt-0 pb-0">
|
||||
<ul class="nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bold">
|
||||
<li class="nav-item mt-2">
|
||||
@@ -54,4 +65,13 @@
|
||||
|
||||
[Parameter]
|
||||
public WebSpace WebSpace { get; set; }
|
||||
|
||||
private async Task Delete()
|
||||
{
|
||||
if (await AlertService.ConfirmMath())
|
||||
{
|
||||
await WebSpaceService.Delete(WebSpace);
|
||||
NavigationManager.NavigateTo("/webspaces");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user