Added Links to GW2Builds

Build Overview is now visible for everyone
This commit is contained in:
Sarah Faey 2022-12-06 16:26:08 +01:00
parent 94f92735d1
commit 267eae1297
8 changed files with 763 additions and 61 deletions

View file

@ -0,0 +1,644 @@
// <auto-generated />
using System;
using Lieb.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Lieb.Migrations
{
[DbContext(typeof(LiebContext))]
[Migration("20221206145056_AddLinkToGW2Build")]
partial class AddLinkToGW2Build
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.10");
modelBuilder.Entity("Lieb.Models.DiscordSettings", b =>
{
b.Property<ulong>("DiscordSettingsId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<bool>("ChangeUserNames")
.HasColumnType("INTEGER");
b.Property<ulong>("DiscordLogChannel")
.HasColumnType("INTEGER");
b.HasKey("DiscordSettingsId");
b.ToTable("DiscordSettings", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Equipped", b =>
{
b.Property<int>("EquippedId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<bool>("CanTank")
.HasColumnType("INTEGER");
b.Property<int>("GuildWars2AccountId")
.HasColumnType("INTEGER");
b.Property<int>("GuildWars2BuildId")
.HasColumnType("INTEGER");
b.HasKey("EquippedId");
b.HasIndex("GuildWars2AccountId");
b.HasIndex("GuildWars2BuildId");
b.ToTable("Equipped", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.GuildWars2Account", b =>
{
b.Property<int>("GuildWars2AccountId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("AccountName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ApiKey")
.IsRequired()
.HasColumnType("TEXT");
b.Property<ulong?>("LiebUserId")
.HasColumnType("INTEGER");
b.HasKey("GuildWars2AccountId");
b.HasIndex("LiebUserId");
b.ToTable("GuildWars2Account", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.GuildWars2Build", b =>
{
b.Property<int>("GuildWars2BuildId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<bool>("Alacrity")
.HasColumnType("INTEGER");
b.Property<string>("BuildName")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("TEXT");
b.Property<int>("Class")
.HasColumnType("INTEGER");
b.Property<int>("DamageType")
.HasColumnType("INTEGER");
b.Property<int>("EliteSpecialization")
.HasColumnType("INTEGER");
b.Property<bool>("Might")
.HasColumnType("INTEGER");
b.Property<bool>("Quickness")
.HasColumnType("INTEGER");
b.Property<string>("Source")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SourceLink")
.IsRequired()
.HasColumnType("TEXT");
b.Property<bool>("UseInRandomRaid")
.HasColumnType("INTEGER");
b.HasKey("GuildWars2BuildId");
b.ToTable("GuildWars2Build", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.DiscordRaidMessage", b =>
{
b.Property<int>("DiscordRaidMessageId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<ulong>("DiscordChannelId")
.HasColumnType("INTEGER");
b.Property<ulong>("DiscordGuildId")
.HasColumnType("INTEGER");
b.Property<ulong>("DiscordMessageId")
.HasColumnType("INTEGER");
b.Property<int?>("RaidId")
.HasColumnType("INTEGER");
b.Property<int?>("RaidTemplateId")
.HasColumnType("INTEGER");
b.HasKey("DiscordRaidMessageId");
b.HasIndex("RaidId");
b.HasIndex("RaidTemplateId");
b.ToTable("DiscordRaidMessage", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.Raid", b =>
{
b.Property<int>("RaidId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("EndTimeUTC")
.HasColumnType("TEXT");
b.Property<int>("EventType")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset>("FreeForAllTimeUTC")
.HasColumnType("TEXT");
b.Property<string>("Guild")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<bool>("MoveFlexUsers")
.HasColumnType("INTEGER");
b.Property<string>("Organizer")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<ulong?>("RaidOwnerId")
.HasColumnType("INTEGER");
b.Property<int>("RaidType")
.HasColumnType("INTEGER");
b.Property<string>("RequiredRole")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("StartTimeUTC")
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("VoiceChat")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("RaidId");
b.ToTable("Raid", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidReminder", b =>
{
b.Property<int>("RaidReminderId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<ulong>("DiscordChannelId")
.HasColumnType("INTEGER");
b.Property<ulong>("DiscordServerId")
.HasColumnType("INTEGER");
b.Property<string>("Message")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<int?>("RaidId")
.HasColumnType("INTEGER");
b.Property<int?>("RaidTemplateId")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset>("ReminderTimeUTC")
.HasColumnType("TEXT");
b.Property<bool>("Sent")
.HasColumnType("INTEGER");
b.Property<int>("TimeType")
.HasColumnType("INTEGER");
b.Property<int>("Type")
.HasColumnType("INTEGER");
b.HasKey("RaidReminderId");
b.HasIndex("RaidId");
b.HasIndex("RaidTemplateId");
b.ToTable("RaidReminder", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidRole", b =>
{
b.Property<int>("RaidRoleId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<bool>("IsRandomSignUpRole")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<int?>("RaidId")
.HasColumnType("INTEGER");
b.Property<int?>("RaidTemplateId")
.HasColumnType("INTEGER");
b.Property<int>("Spots")
.HasColumnType("INTEGER");
b.HasKey("RaidRoleId");
b.HasIndex("RaidId");
b.HasIndex("RaidTemplateId");
b.ToTable("RaidRole", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidSignUp", b =>
{
b.Property<int>("RaidSignUpId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ExternalUserName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int?>("GuildWars2AccountId")
.HasColumnType("INTEGER");
b.Property<ulong?>("LiebUserId")
.HasColumnType("INTEGER");
b.Property<int>("RaidId")
.HasColumnType("INTEGER");
b.Property<int>("RaidRoleId")
.HasColumnType("INTEGER");
b.Property<int>("SignUpType")
.HasColumnType("INTEGER");
b.HasKey("RaidSignUpId");
b.HasIndex("GuildWars2AccountId");
b.HasIndex("LiebUserId");
b.HasIndex("RaidId");
b.HasIndex("RaidRoleId");
b.ToTable("RaidSignUp", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidTemplate", b =>
{
b.Property<int>("RaidTemplateId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("CreateDaysBefore")
.HasColumnType("INTEGER");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<DateTime>("EndTime")
.HasColumnType("TEXT");
b.Property<int>("EventType")
.HasColumnType("INTEGER");
b.Property<DateTime>("FreeForAllTime")
.HasColumnType("TEXT");
b.Property<string>("Guild")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<int>("Interval")
.HasColumnType("INTEGER");
b.Property<bool>("MoveFlexUsers")
.HasColumnType("INTEGER");
b.Property<string>("Organizer")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<ulong?>("RaidOwnerId")
.HasColumnType("INTEGER");
b.Property<int>("RaidType")
.HasColumnType("INTEGER");
b.Property<string>("RequiredRole")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("StartTime")
.HasColumnType("TEXT");
b.Property<string>("TimeZone")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("VoiceChat")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("RaidTemplateId");
b.ToTable("RaidTemplate", (string)null);
});
modelBuilder.Entity("Lieb.Models.LiebRole", b =>
{
b.Property<int>("LiebRoleId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Level")
.HasColumnType("INTEGER");
b.Property<int>("LevelToAssign")
.HasColumnType("INTEGER");
b.Property<string>("RoleName")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<int>("Type")
.HasColumnType("INTEGER");
b.HasKey("LiebRoleId");
b.ToTable("LiebRole", (string)null);
});
modelBuilder.Entity("Lieb.Models.LiebUser", b =>
{
b.Property<ulong>("Id")
.HasColumnType("INTEGER");
b.Property<bool>("AlwaysSignUpWithMainAccount")
.HasColumnType("INTEGER");
b.Property<DateTime?>("BannedUntil")
.HasColumnType("TEXT");
b.Property<DateTime?>("Birthday")
.HasColumnType("TEXT");
b.Property<int>("MainGW2Account")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("Pronouns")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("LiebUser", (string)null);
});
modelBuilder.Entity("Lieb.Models.RoleAssignment", b =>
{
b.Property<int>("RoleAssignmentId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("LiebRoleId")
.HasColumnType("INTEGER");
b.Property<ulong>("LiebUserId")
.HasColumnType("INTEGER");
b.HasKey("RoleAssignmentId");
b.HasIndex("LiebRoleId");
b.HasIndex("LiebUserId");
b.ToTable("RoleAssignment", (string)null);
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Equipped", b =>
{
b.HasOne("Lieb.Models.GuildWars2.GuildWars2Account", "GuildWars2Account")
.WithMany("EquippedBuilds")
.HasForeignKey("GuildWars2AccountId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Lieb.Models.GuildWars2.GuildWars2Build", "GuildWars2Build")
.WithMany("EquippedRoles")
.HasForeignKey("GuildWars2BuildId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("GuildWars2Account");
b.Navigation("GuildWars2Build");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.GuildWars2Account", b =>
{
b.HasOne("Lieb.Models.LiebUser", null)
.WithMany("GuildWars2Accounts")
.HasForeignKey("LiebUserId");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.DiscordRaidMessage", b =>
{
b.HasOne("Lieb.Models.GuildWars2.Raid.Raid", null)
.WithMany("DiscordRaidMessages")
.HasForeignKey("RaidId");
b.HasOne("Lieb.Models.GuildWars2.Raid.RaidTemplate", null)
.WithMany("DiscordRaidMessages")
.HasForeignKey("RaidTemplateId");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidReminder", b =>
{
b.HasOne("Lieb.Models.GuildWars2.Raid.Raid", null)
.WithMany("Reminders")
.HasForeignKey("RaidId");
b.HasOne("Lieb.Models.GuildWars2.Raid.RaidTemplate", null)
.WithMany("Reminders")
.HasForeignKey("RaidTemplateId");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidRole", b =>
{
b.HasOne("Lieb.Models.GuildWars2.Raid.Raid", null)
.WithMany("Roles")
.HasForeignKey("RaidId");
b.HasOne("Lieb.Models.GuildWars2.Raid.RaidTemplate", null)
.WithMany("Roles")
.HasForeignKey("RaidTemplateId");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidSignUp", b =>
{
b.HasOne("Lieb.Models.GuildWars2.GuildWars2Account", "GuildWars2Account")
.WithMany()
.HasForeignKey("GuildWars2AccountId");
b.HasOne("Lieb.Models.LiebUser", "LiebUser")
.WithMany()
.HasForeignKey("LiebUserId");
b.HasOne("Lieb.Models.GuildWars2.Raid.Raid", "Raid")
.WithMany("SignUps")
.HasForeignKey("RaidId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Lieb.Models.GuildWars2.Raid.RaidRole", "RaidRole")
.WithMany()
.HasForeignKey("RaidRoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("GuildWars2Account");
b.Navigation("LiebUser");
b.Navigation("Raid");
b.Navigation("RaidRole");
});
modelBuilder.Entity("Lieb.Models.RoleAssignment", b =>
{
b.HasOne("Lieb.Models.LiebRole", "LiebRole")
.WithMany("RoleAssignments")
.HasForeignKey("LiebRoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Lieb.Models.LiebUser", "LiebUser")
.WithMany("RoleAssignments")
.HasForeignKey("LiebUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LiebRole");
b.Navigation("LiebUser");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.GuildWars2Account", b =>
{
b.Navigation("EquippedBuilds");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.GuildWars2Build", b =>
{
b.Navigation("EquippedRoles");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.Raid", b =>
{
b.Navigation("DiscordRaidMessages");
b.Navigation("Reminders");
b.Navigation("Roles");
b.Navigation("SignUps");
});
modelBuilder.Entity("Lieb.Models.GuildWars2.Raid.RaidTemplate", b =>
{
b.Navigation("DiscordRaidMessages");
b.Navigation("Reminders");
b.Navigation("Roles");
});
modelBuilder.Entity("Lieb.Models.LiebRole", b =>
{
b.Navigation("RoleAssignments");
});
modelBuilder.Entity("Lieb.Models.LiebUser", b =>
{
b.Navigation("GuildWars2Accounts");
b.Navigation("RoleAssignments");
});
#pragma warning restore 612, 618
}
}
}

View file

@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lieb.Migrations
{
public partial class AddLinkToGW2Build : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "SourceLink",
table: "GuildWars2Build",
type: "TEXT",
nullable: false,
defaultValue: "");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SourceLink",
table: "GuildWars2Build");
}
}
}

View file

@ -115,6 +115,10 @@ namespace Lieb.Migrations
.IsRequired() .IsRequired()
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<string>("SourceLink")
.IsRequired()
.HasColumnType("TEXT");
b.Property<bool>("UseInRandomRaid") b.Property<bool>("UseInRandomRaid")
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");

View file

@ -90,5 +90,7 @@ namespace Lieb.Models.GuildWars2
public string Source {get; set;} = string.Empty; public string Source {get; set;} = string.Empty;
public string SourceLink {get; set;} = string.Empty;
} }
} }

View file

@ -86,6 +86,12 @@
<InputText @bind-Value="_build.Source" /> <InputText @bind-Value="_build.Source" />
</label> </label>
</p> </p>
<p>
<label>
Source Link:
<InputText @bind-Value="_build.SourceLink" />
</label>
</p>
<ValidationSummary /> <ValidationSummary />
<button type="submit">Submit</button> <button type="submit">Submit</button>

View file

@ -14,59 +14,76 @@
<span class="oi oi-plus" aria-hidden="true"></span> Add Build <span class="oi oi-plus" aria-hidden="true"></span> Add Build
</NavLink> </NavLink>
</div> </div>
<label>
Filter:
<select @onchange="args => ChangeFilter(args)" >
<option value="All">All</option>
@foreach(GuildWars2Class gw2Class in Enum.GetValues(typeof(GuildWars2Class)))
{
<option value="@gw2Class">@gw2Class.ToString()</option>
}
</select>
</label>
<table class="roletable">
<tr>
<th>Name</th>
<th>Class</th>
<th>Elite</th>
<th>Might</th>
<th>Quick</th>
<th>Alac</th>
<th>Heal</th>
<th>Power</th>
<th>Condition</th>
<th>Hybrid</th>
<th>Other</th>
<th>Random</th>
<th>Source</th>
</tr>
@foreach (var build in _buildsToShow.OrderBy(b => b.Class).ThenBy(b => b.EliteSpecialization))
{
<tr>
<td class="nav-item px-3">
@{string navLink = $"buildedit/{@build.GuildWars2BuildId}";}
<NavLink class="nav-link" href="@navLink">@build.BuildName</NavLink>
</td>
<td>@build.Class.ToString()</td>
<td>@build.EliteSpecialization.ToString()</td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.Might)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.Quickness)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.Alacrity)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Heal)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Power)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Condition)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Hybrid)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Other)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.UseInRandomRaid)" disabled="disabled" /></td>
<td>@build.Source</td>
</tr>
}
</table>
</Authorized> </Authorized>
</AuthorizeView> </AuthorizeView>
<label>
Filter:
<select @onchange="args => ChangeFilter(args)" >
<option value="All">All</option>
@foreach(GuildWars2Class gw2Class in Enum.GetValues(typeof(GuildWars2Class)))
{
<option value="@gw2Class">@gw2Class.ToString()</option>
}
</select>
</label>
<table class="roletable">
<tr>
<th>Name</th>
<th>Class</th>
<th>Elite</th>
<th>Might</th>
<th>Quick</th>
<th>Alac</th>
<th>Heal</th>
<th>Power</th>
<th>Condition</th>
<th>Hybrid</th>
<th>Other</th>
<th>Random</th>
<th>Source</th>
</tr>
@foreach (var build in _buildsToShow.OrderBy(b => b.Class).ThenBy(b => b.EliteSpecialization))
{
<tr>
<AuthorizeView Policy="@Constants.Roles.Admin.Name">
<Authorized>
<td class="nav-item px-3">
@{string navLink = $"buildedit/{@build.GuildWars2BuildId}";}
<NavLink class="nav-link" href="@navLink">@build.BuildName</NavLink>
</td>
</Authorized>
<NotAuthorized>
<td class="nav-item px-3">
<label style="padding: .5rem 1rem;">@build.BuildName</label>
</td>
</NotAuthorized>
</AuthorizeView>
<td>@build.Class.ToString()</td>
<td>@build.EliteSpecialization.ToString()</td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.Might)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.Quickness)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.Alacrity)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Heal)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Power)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Condition)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Hybrid)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Other)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.UseInRandomRaid)" disabled="disabled" /></td>
@if(string.IsNullOrEmpty(build.SourceLink))
{
<td>@build.Source</td>
}
else
{
<NavLink class="nav-link" href="@build.SourceLink" target="blank">@build.Source</NavLink>
}
</tr>
}
</table>
@code @code
{ {

View file

@ -95,7 +95,14 @@
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Hybrid)" disabled="disabled" /></td> <td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Hybrid)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Other)" disabled="disabled" /></td> <td class="checkboxfield"><input type="checkbox" checked="@(build.DamageType == DamageType.Other)" disabled="disabled" /></td>
<td class="checkboxfield"><input type="checkbox" checked="@(build.UseInRandomRaid)" disabled="disabled" /></td> <td class="checkboxfield"><input type="checkbox" checked="@(build.UseInRandomRaid)" disabled="disabled" /></td>
<td>@build.Source</td> @if(string.IsNullOrEmpty(build.SourceLink))
{
<td>@build.Source</td>
}
else
{
<NavLink class="nav-link" href="@build.SourceLink" target="blank">@build.Source</NavLink>
}
</tr> </tr>
} }
</table> </table>

View file

@ -68,15 +68,11 @@
</div> </div>
</Authorized> </Authorized>
</AuthorizeView> </AuthorizeView>
<AuthorizeView Policy="@Constants.Roles.Admin.Name"> <div class="nav-item px-3">
<Authorized> <NavLink class="nav-link" href="buildoverview">
<div class="nav-item px-3"> <span class="oi oi-folder" aria-hidden="true"></span> Build Overview
<NavLink class="nav-link" href="buildoverview"> </NavLink>
<span class="oi oi-folder" aria-hidden="true"></span> Build Overview </div>
</NavLink>
</div>
</Authorized>
</AuthorizeView>
<AuthorizeView Policy="@Constants.Roles.Admin.Name"> <AuthorizeView Policy="@Constants.Roles.Admin.Name">
<Authorized> <Authorized>
<div class="nav-item px-3"> <div class="nav-item px-3">