reorganized Raid pages
This commit is contained in:
parent
f40903851e
commit
d0ff8251a2
16 changed files with 174 additions and 53 deletions
85
Lieb/Pages/Raids/RaidOverview/RaidTemplateDetails.razor
Normal file
85
Lieb/Pages/Raids/RaidOverview/RaidTemplateDetails.razor
Normal file
|
@ -0,0 +1,85 @@
|
|||
@using System.Security.Claims
|
||||
@using Lieb.Data
|
||||
@using Lieb.Models
|
||||
@using Lieb.Models.GuildWars2.Raid
|
||||
@inject UserService UserService
|
||||
@inject RaidService RaidService
|
||||
@inject TimeZoneService TimeZoneService
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject RaidRandomizerService RaidRandomizerService
|
||||
|
||||
<body>
|
||||
|
||||
<h5>@_template.Title</h5>
|
||||
|
||||
<label style="white-space: pre-line">@_template.Description</label>
|
||||
|
||||
<div >
|
||||
<div class="times">
|
||||
<h5>Date</h5>
|
||||
<p>@_template.StartTime.ToLongDateString()</p>
|
||||
</div>
|
||||
<div class="times">
|
||||
<h5>Time</h5>
|
||||
<p>from: @_template.StartTime.ToShortTimeString() to: @_template.EndTime.ToShortTimeString()</p>
|
||||
</div>
|
||||
<div class="times">
|
||||
<h5>TimeZone</h5>
|
||||
<p>@_template.TimeZone</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="details">
|
||||
<h5>Organizer</h5>
|
||||
<p>@_template.Organizer</p>
|
||||
</div>
|
||||
<div class="details">
|
||||
<h5>Guild</h5>
|
||||
<p>@_template.Guild</p>
|
||||
</div>
|
||||
<div class="details">
|
||||
<h5>Voice chat</h5>
|
||||
<p>@_template.VoiceChat</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach (var role in _template.Roles.OrderBy(r => r.RaidRoleId))
|
||||
{
|
||||
<tr>
|
||||
<td><Label> <b>@role.Name</b> (@role.Spots) <br> @role.Description </Label></td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<AuthorizeView>
|
||||
@if (_template.RaidOwnerId == _user.Id || _user.RoleAssignments.Max(a => a.LiebRole.Level) >= Constants.RaidEditPowerLevel)
|
||||
{
|
||||
<button class="controlButton raidButton" @onclick="() => EditClicked()">Edit</button>
|
||||
}
|
||||
</AuthorizeView>
|
||||
</body>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public RaidTemplate _template { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public LiebUser? _user { get; set; }
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
}
|
||||
|
||||
async Task EditClicked()
|
||||
{
|
||||
NavigationManager.NavigateTo($"raidtemplateedit/{_template.RaidTemplateId}");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue