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