summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Views
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Views')
-rw-r--r--src/SMAPI.Web/Views/Index/Index.cshtml6
-rw-r--r--src/SMAPI.Web/Views/Index/Privacy.cshtml4
-rw-r--r--src/SMAPI.Web/Views/JsonValidator/Index.cshtml12
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml2
-rw-r--r--src/SMAPI.Web/Views/Mods/Index.cshtml6
-rw-r--r--src/SMAPI.Web/Views/Shared/_Layout.cshtml4
-rw-r--r--src/SMAPI.Web/Views/_ViewStart.cshtml4
7 files changed, 7 insertions, 31 deletions
diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml
index 9841ca42..acb8df78 100644
--- a/src/SMAPI.Web/Views/Index/Index.cshtml
+++ b/src/SMAPI.Web/Views/Index/Index.cshtml
@@ -1,7 +1,3 @@
-@{
- #nullable disable
-}
-
@using Microsoft.Extensions.Options
@using StardewModdingAPI.Web.Framework
@using StardewModdingAPI.Web.Framework.ConfigModels
@@ -28,7 +24,7 @@
<div id="call-to-action">
<div class="cta-dropdown">
- <a href="@Model.StableVersion.DownloadUrl" class="main-cta download">Download SMAPI @Model.StableVersion.Version</a><br />
+ <a href="@Model!.StableVersion.DownloadUrl" class="main-cta download">Download SMAPI @Model.StableVersion.Version</a><br />
<div class="dropdown-content">
<a href="https://www.nexusmods.com/stardewvalley/mods/2400"><img src="Content/images/nexus-icon.png" /> Download from Nexus</a>
<a href="@Model.StableVersion.DownloadUrl"><img src="Content/images/direct-download-icon.png" /> Direct download</a>
diff --git a/src/SMAPI.Web/Views/Index/Privacy.cshtml b/src/SMAPI.Web/Views/Index/Privacy.cshtml
index 1dc327d7..fd78f908 100644
--- a/src/SMAPI.Web/Views/Index/Privacy.cshtml
+++ b/src/SMAPI.Web/Views/Index/Privacy.cshtml
@@ -1,7 +1,3 @@
-@{
- #nullable disable
-}
-
@using Microsoft.Extensions.Options
@using StardewModdingAPI.Web.Framework
@using StardewModdingAPI.Web.Framework.ConfigModels
diff --git a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
index 5e38e4dc..f5ec0f7a 100644
--- a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
+++ b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
@@ -1,7 +1,3 @@
-@{
- #nullable disable
-}
-
@using Humanizer
@using StardewModdingAPI.Web.Framework
@using StardewModdingAPI.Web.ViewModels.JsonValidator
@@ -9,10 +5,10 @@
@{
// get view data
- string curPageUrl = this.Url.PlainAction("Index", "JsonValidator", new { schemaName = Model.SchemaName, id = Model.PasteID }, absoluteUrl: true);
- string newUploadUrl = this.Url.PlainAction("Index", "JsonValidator", new { schemaName = Model.SchemaName });
- string schemaDisplayName = null;
- bool isValidSchema = Model.SchemaName != null && Model.SchemaFormats.TryGetValue(Model.SchemaName, out schemaDisplayName) && schemaDisplayName?.ToLower() != "none";
+ string curPageUrl = this.Url.PlainAction("Index", "JsonValidator", new { schemaName = Model!.SchemaName, id = Model.PasteID }, absoluteUrl: true)!;
+ string newUploadUrl = this.Url.PlainAction("Index", "JsonValidator", new { schemaName = Model.SchemaName })!;
+ string? schemaDisplayName = null;
+ bool isValidSchema = Model.SchemaName != null && Model.SchemaFormats.TryGetValue(Model.SchemaName, out schemaDisplayName) && schemaDisplayName.ToLower() != "none";
// build title
ViewData["Title"] = "JSON validator";
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml
index dbaa14e0..dfb603f2 100644
--- a/src/SMAPI.Web/Views/LogParser/Index.cshtml
+++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml
@@ -23,7 +23,7 @@
.GetValues<LogSection>()
.ToDictionary(section => (int)section, section => section.ToString());
- string curPageUrl = this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }, absoluteUrl: true);
+ string curPageUrl = this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }, absoluteUrl: true)!;
ISet<int> screenIds = new HashSet<int>(log?.Messages.Select(p => p.ScreenId) ?? Array.Empty<int>());
}
diff --git a/src/SMAPI.Web/Views/Mods/Index.cshtml b/src/SMAPI.Web/Views/Mods/Index.cshtml
index 4b6400ad..78eabad7 100644
--- a/src/SMAPI.Web/Views/Mods/Index.cshtml
+++ b/src/SMAPI.Web/Views/Mods/Index.cshtml
@@ -1,7 +1,3 @@
-@{
- #nullable disable
-}
-
@using Humanizer
@using Humanizer.Localisation
@using StardewModdingAPI.Web.Framework
@@ -10,7 +6,7 @@
@{
ViewData["Title"] = "Mod compatibility";
- TimeSpan staleAge = DateTimeOffset.UtcNow - Model.LastUpdated;
+ TimeSpan staleAge = DateTimeOffset.UtcNow - Model!.LastUpdated;
bool hasBeta = Model.BetaVersion != null;
string betaLabel = $"SDV {Model.BetaVersion} only";
diff --git a/src/SMAPI.Web/Views/Shared/_Layout.cshtml b/src/SMAPI.Web/Views/Shared/_Layout.cshtml
index 248cc7ef..1e82ab5f 100644
--- a/src/SMAPI.Web/Views/Shared/_Layout.cshtml
+++ b/src/SMAPI.Web/Views/Shared/_Layout.cshtml
@@ -1,7 +1,3 @@
-@{
- #nullable disable
-}
-
@using Microsoft.Extensions.Options
@using StardewModdingAPI.Web.Framework
@using StardewModdingAPI.Web.Framework.ConfigModels
diff --git a/src/SMAPI.Web/Views/_ViewStart.cshtml b/src/SMAPI.Web/Views/_ViewStart.cshtml
index 0dbac246..820a2f6e 100644
--- a/src/SMAPI.Web/Views/_ViewStart.cshtml
+++ b/src/SMAPI.Web/Views/_ViewStart.cshtml
@@ -1,7 +1,3 @@
@{
- #nullable disable
-}
-
-@{
Layout = "_Layout";
}