diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-12-01 21:55:20 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-12-02 20:14:07 -0500 |
commit | 5f532c259d5d3050bd6a053659067617db136d57 (patch) | |
tree | 06b8bf7ac63ccab8be27908002612a53d5975075 /src/SMAPI.Web/Views | |
parent | 8766a79408ce79bd632c1fe1c9b17ab0a7a6a976 (diff) | |
download | SMAPI-5f532c259d5d3050bd6a053659067617db136d57.tar.gz SMAPI-5f532c259d5d3050bd6a053659067617db136d57.tar.bz2 SMAPI-5f532c259d5d3050bd6a053659067617db136d57.zip |
migrate from AWS to Azure
This commit migrates from subdomains to paths (due to the cost of a wildcard HTTPS certificate on Azure), adds a web project to redirect the old subdomains from AWS to Azure, and removes AWS-specific hacks.
Diffstat (limited to 'src/SMAPI.Web/Views')
-rw-r--r-- | src/SMAPI.Web/Views/Index/Index.cshtml | 10 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/Index/Privacy.cshtml | 4 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/JsonValidator/Index.cshtml | 10 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 16 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/Shared/_Layout.cshtml | 8 |
5 files changed, 24 insertions, 24 deletions
diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index f42dde3b..a79a08f5 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -44,14 +44,14 @@ } <div><a href="https://stardewvalleywiki.com/Modding:Player_Guide" class="secondary-cta">Player guide</a></div> <div class="sublinks"> - <a href="https://github.com/Pathoschild/SMAPI">source code</a> | <a href="@(new UriBuilder(SiteConfig.Value.RootUrl) { Path = "privacy" }.Uri)">privacy</a> + <a href="https://github.com/Pathoschild/SMAPI">source code</a> | <a href="@Url.Action("Privacy", "Index")">privacy</a> </div> <img id="pufferchick" src="Content/images/pufferchick.png" /> </div> <h2 id="help">Get help</h2> <ul> - <li><a href="@SiteConfig.Value.ModListUrl">Mod compatibility list</a></li> + <li><a href="@Url.Action("Index", "Mods")">Mod compatibility list</a></li> <li>Get help <a href="https://smapi.io/community">on Discord or in the forums</a></li> </ul> @@ -61,7 +61,7 @@ <div class="github-description"> @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description)) </div> - <p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@SiteConfig.Value.ModListUrl">mod compatibility list</a> for more info.</p> + <p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@Url.Action("Index", "Mods")">mod compatibility list</a> for more info.</p> } else { @@ -70,13 +70,13 @@ else <div class="github-description"> @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description)) </div> - <p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@SiteConfig.Value.ModListUrl">mod compatibility list</a> for more info.</p> + <p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@Url.Action("Index", "Mods")">mod compatibility list</a> for more info.</p> <h3>SMAPI @Model.BetaVersion.Version?</h3> <div class="github-description"> @Html.Raw(Markdig.Markdown.ToHtml(Model.BetaVersion.Description)) </div> - <p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@SiteConfig.Value.ModListUrl">mod compatibility list</a> for more info.</p> + <p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@Url.Action("Index", "Mods")">mod compatibility list</a> for more info.</p> } <h2 id="donate">Support SMAPI ♥</h2> diff --git a/src/SMAPI.Web/Views/Index/Privacy.cshtml b/src/SMAPI.Web/Views/Index/Privacy.cshtml index 914384a8..fe4d773a 100644 --- a/src/SMAPI.Web/Views/Index/Privacy.cshtml +++ b/src/SMAPI.Web/Views/Index/Privacy.cshtml @@ -8,7 +8,7 @@ <link rel="stylesheet" href="~/Content/css/privacy.css" /> } -← <a href="@SiteConfig.Value.RootUrl">back to SMAPI page</a> +← <a href="@Url.Action("Index", "Index")">back to SMAPI page</a> <p>SMAPI is an <a href="https://github.com/Pathoschild/SMAPI">open-source</a> and non-profit project. Your privacy is important, so this page explains what information SMAPI uses and transmits. <strong>This page is informational only, it's not a legal document.</strong></p> @@ -34,7 +34,7 @@ </ol> <h3>Log parser</h3> -<p>The <a href="https://log.smapi.io/">log parser page</a> lets you store a log file for analysis and sharing. The log data is stored indefinitely in an obfuscated form as unlisted pastes in <a href="https://pastebin.com/">Pastebin</a>. No personal information is stored by the log parser beyond what you choose to upload, but see <em><a href="#web-logging">web logging</a></em> and the <a href="https://pastebin.com/doc_privacy_statement">Pastebin Privacy Statement</a>.</p> +<p>The <a href="https://smapi.io/log">log parser page</a> lets you store a log file for analysis and sharing. The log data is stored indefinitely in an obfuscated form as unlisted pastes in <a href="https://pastebin.com/">Pastebin</a>. No personal information is stored by the log parser beyond what you choose to upload, but see <em><a href="#web-logging">web logging</a></em> and the <a href="https://pastebin.com/doc_privacy_statement">Pastebin Privacy Statement</a>.</p> <h3>Multiplayer sync</h3> <p>As part of its multiplayer API, SMAPI transmits basic context to players you connect to (mainly your OS, SMAPI version, game version, and installed mods). This is used to enable multiplayer features like inter-mod messages, compatibility checks, etc. Although this information is normally hidden from players, it may be visible due to mods or configuration changes.</p> diff --git a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml index 3143fad9..41dec929 100644 --- a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml +++ b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml @@ -3,8 +3,8 @@ @{ // get view data - string curPageUrl = new Uri(new Uri(Model.SectionUrl), $"{Model.SchemaName}/{Model.PasteID}").ToString(); - string newUploadUrl = Model.SchemaName != null ? new Uri(new Uri(Model.SectionUrl), Model.SchemaName).ToString() : Model.SectionUrl; + string curPageUrl = this.Url.Action("Index", "JsonValidator", new { schemaName = Model.SchemaName, id = Model.PasteID }); + string newUploadUrl = this.Url.Action("Index", "JsonValidator", new { schemaName = Model.SchemaName }); string schemaDisplayName = null; bool isValidSchema = Model.SchemaName != null && Model.SchemaFormats.TryGetValue(Model.SchemaName, out schemaDisplayName) && schemaDisplayName != "None"; @@ -34,8 +34,8 @@ <script src="https://cdn.jsdelivr.net/gh/tmont/sunlight@1.22.0/src/lang/sunlight.javascript.min.js" crossorigin="anonymous"></script> <script src="~/Content/js/json-validator.js"></script> <script> - $(function () { - smapi.jsonValidator(@Json.Serialize(Model.SectionUrl), @Json.Serialize(Model.PasteID)); + $(function() { + smapi.jsonValidator(@Json.Serialize(this.Url.Action("Index", "JsonValidator")), @Json.Serialize(Model.PasteID)); }); </script> } @@ -70,7 +70,7 @@ else if (Model.PasteID != null) @if (Model.Content == null) { <h2>Upload a JSON file</h2> - <form action="@Model.SectionUrl" method="post"> + <form action="@this.Url.Action("PostAsync", "JsonValidator")" method="post"> <ol> <li> Choose the JSON format:<br /> diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index df2ac115..07e18421 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -32,7 +32,7 @@ showSections: @Json.Serialize(Enum.GetNames(typeof(LogSection)).ToDictionary(section => section, section => false), noFormatting), showLevels: @Json.Serialize(defaultFilters, noFormatting), enableFilters: @Json.Serialize(!Model.ShowRaw) - }, '@Model.SectionUrl'); + }, '@this.Url.Action("Index", "LogParser")'); }); </script> } @@ -49,8 +49,8 @@ else if (Model.ParseError != null) { <div class="banner error" v-pre> <strong>Oops, couldn't parse that log. (Make sure you upload the log file, not the console text.)</strong><br /> - Share this URL when asking for help: <code>@(new Uri(new Uri(Model.SectionUrl), Model.PasteID))</code><br /> - (Or <a href="@Model.SectionUrl">upload a new log</a>.)<br /> + Share this URL when asking for help: <code>https://@this.Context.Request.Host.ToUriComponent()@this.Url.Action("Index", "LogParser", new { id = Model.PasteID }))</code><br /> + (Or <a href="@this.Url.Action("Index", "LogParser")">upload a new log</a>.)<br /> <br /> <small v-pre>Error details: @Model.ParseError</small> </div> @@ -58,8 +58,8 @@ else if (Model.ParseError != null) else if (Model.ParsedLog?.IsValid == true) { <div class="banner success" v-pre> - <strong>Share this link to let someone else see the log:</strong> <code>@(new Uri(new Uri(Model.SectionUrl), Model.PasteID))</code><br /> - (Or <a href="@Model.SectionUrl">upload a new log</a>.) + <strong>Share this link to let someone else see the log:</strong> <code>https://@this.Context.Request.Host.ToUriComponent()@this.Url.Action("Index", "LogParser", new { id = Model.PasteID })</code><br /> + (Or <a href="@this.Url.Action("Index", "LogParser")">upload a new log</a>.) </div> } @@ -127,7 +127,7 @@ else if (Model.ParsedLog?.IsValid == true) </div> <h2>How do I share my log?</h2> - <form action="@Model.SectionUrl" method="post"> + <form action="@this.Url.Action("PostAsync", "LogParser")" method="post"> <ol> <li> Drag the file onto this textbox (or paste the text in):<br /> @@ -322,12 +322,12 @@ else if (Model.ParsedLog?.IsValid == true) } </table> - <small><a href="@(new Uri(new Uri(Model.SectionUrl), Model.PasteID))?raw=true">view raw log</a></small> + <small><a href="@this.Url.Action("Index", "LogParser", new { id = Model.PasteID })?raw=true">view raw log</a></small> } else { <pre v-pre>@Model.ParsedLog.RawText</pre> - <small><a href="@(new Uri(new Uri(Model.SectionUrl), Model.PasteID))">view parsed log</a></small> + <small><a href="@this.Url.Action("Index", "LogParser", new { id = Model.PasteID })">view parsed log</a></small> } </div> } diff --git a/src/SMAPI.Web/Views/Shared/_Layout.cshtml b/src/SMAPI.Web/Views/Shared/_Layout.cshtml index 87a22f06..e4b6ca94 100644 --- a/src/SMAPI.Web/Views/Shared/_Layout.cshtml +++ b/src/SMAPI.Web/Views/Shared/_Layout.cshtml @@ -15,15 +15,15 @@ <div id="sidebar"> <h4>SMAPI</h4> <ul> - <li><a href="@SiteConfig.Value.RootUrl">About SMAPI</a></li> + <li><a href="@Url.Action("Index", "Index")">About SMAPI</a></li> <li><a href="https://stardewvalleywiki.com/Modding:Index">Modding docs</a></li> </ul> <h4>Tools</h4> <ul> - <li><a href="@SiteConfig.Value.ModListUrl">Mod compatibility</a></li> - <li><a href="@SiteConfig.Value.LogParserUrl">Log parser</a></li> - <li><a href="@SiteConfig.Value.JsonValidatorUrl">JSON validator</a></li> + <li><a href="@Url.Action("Index", "Mods")">Mod compatibility</a></li> + <li><a href="@Url.Action("Index", "LogParser")">Log parser</a></li> + <li><a href="@Url.Action("Index", "JsonValidator")">JSON validator</a></li> </ul> </div> <div id="content-column"> |