diff options
author | Dan Volchek <volchek2@illinois.edu> | 2019-08-25 17:14:55 -0700 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 19:14:19 -0400 |
commit | 00b067fead282bb30eb8ca67572f16bd6e1920b7 (patch) | |
tree | e6b55b6250a16aafb97ca42bdbcb4f5724334622 /src/SMAPI.Web/Views/LogParser | |
parent | 15fd868f59e84629b66e0cb8fcfdda86b1ffd813 (diff) | |
download | SMAPI-00b067fead282bb30eb8ca67572f16bd6e1920b7.tar.gz SMAPI-00b067fead282bb30eb8ca67572f16bd6e1920b7.tar.bz2 SMAPI-00b067fead282bb30eb8ca67572f16bd6e1920b7.zip |
detect the client's platform and check the appropriate input in the log parser
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser')
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index e974c308..0dca003b 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -1,5 +1,6 @@ @using Newtonsoft.Json @using StardewModdingAPI.Web.Framework.LogParsing.Models +@using StardewModdingAPI.Web.Framework.UserAgentParsing @model StardewModdingAPI.Web.ViewModels.LogParserModel @{ @@ -67,10 +68,13 @@ else if (Model.ParsedLog?.IsValid == true) <h2>Where do I find my SMAPI log?</h2> <div>What system do you use?</div> <ul id="os-list"> - <li><input type="radio" name="os" value="android" id="os-android" /> <label for="os-android">Android</label></li> - <li><input type="radio" name="os" value="linux" id="os-linux" /> <label for="os-linux">Linux</label></li> - <li><input type="radio" name="os" value="mac" id="os-mac" /> <label for="os-mac">Mac</label></li> - <li><input type="radio" name="os" value="windows" id="os-windows" /> <label for="os-windows">Windows</label></li> + @{ + Platform? clientPlatform = Context.Items[ClientPlatformMiddleware.ClientPlatformKey] as Platform?; + } + <li><input type="radio" name="os" value="android" id="os-android" @(clientPlatform == Platform.Android ? "checked" : "")/> <label for="os-android">Android</label></li> + <li><input type="radio" name="os" value="linux" id="os-linux" @(clientPlatform == Platform.Linux ? "checked" : "")/> <label for="os-linux">Linux</label></li> + <li><input type="radio" name="os" value="mac" id="os-mac" @(clientPlatform == Platform.Mac ? "checked" : "")/> <label for="os-mac">Mac</label></li> + <li><input type="radio" name="os" value="windows" id="os-windows" @(clientPlatform == Platform.Windows ? "checked" : "")/> <label for="os-windows">Windows</label></li> </ul> <div data-os="android"> On Android: |