mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2025-05-08 03:34:03 +02:00
30 lines
857 B
Plaintext
30 lines
857 B
Plaintext
@page "/instances/{InstanceGuid:guid}/edit"
|
|
@attribute [Authorize(Permission.CreateInstancesPolicy)]
|
|
@using Phantom.Common.Data.Instance
|
|
@using Phantom.Common.Data.Web.Users
|
|
@using Phantom.Web.Services.Instances
|
|
@inherits Phantom.Web.Components.PhantomComponent
|
|
@inject InstanceManager InstanceManager
|
|
|
|
@if (InstanceConfiguration == null) {
|
|
<h1>Instance Not Found</h1>
|
|
<p>Return to <a href="instances">all instances</a>.</p>
|
|
}
|
|
else {
|
|
<h1>Edit Instance: @InstanceConfiguration.InstanceName</h1>
|
|
<InstanceAddOrEditForm EditedInstanceConfiguration="InstanceConfiguration" />
|
|
}
|
|
|
|
@code {
|
|
|
|
[Parameter]
|
|
public Guid InstanceGuid { get; init; }
|
|
|
|
private InstanceConfiguration? InstanceConfiguration { get; set; }
|
|
|
|
protected override void OnInitialized() {
|
|
InstanceConfiguration = InstanceManager.GetByGuid(InstanceGuid)?.Configuration;
|
|
}
|
|
|
|
}
|