mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-22 08:42:44 +01:00
29 lines
799 B
Plaintext
29 lines
799 B
Plaintext
@page "/instances/{InstanceGuid:guid}/edit"
|
|
@attribute [Authorize(Permission.CreateInstancesPolicy)]
|
|
@using Phantom.Server.Services.Instances
|
|
@using Phantom.Common.Data.Instance
|
|
@inherits 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; set; }
|
|
|
|
private InstanceConfiguration? InstanceConfiguration { get; set; }
|
|
|
|
protected override void OnInitialized() {
|
|
InstanceConfiguration = InstanceManager.GetInstanceConfiguration(InstanceGuid);
|
|
}
|
|
|
|
}
|