summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Views/JsonValidator
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-24 20:29:03 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-24 20:29:03 -0500
commita6b11035961a0e3cc31653a888554915f7d3c747 (patch)
treea0ebc1231c5b18b3dc8f00a3c34c3fbbd569634e /src/SMAPI.Web/Views/JsonValidator
parent5ae640dc91adff8dfb0827e2a3c3f6b54be7c612 (diff)
downloadSMAPI-a6b11035961a0e3cc31653a888554915f7d3c747.tar.gz
SMAPI-a6b11035961a0e3cc31653a888554915f7d3c747.tar.bz2
SMAPI-a6b11035961a0e3cc31653a888554915f7d3c747.zip
add file pickers to web UI for mobile users
Diffstat (limited to 'src/SMAPI.Web/Views/JsonValidator')
-rw-r--r--src/SMAPI.Web/Views/JsonValidator/Index.cshtml9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
index a00c8387..7287e00b 100644
--- a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
+++ b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
@@ -28,14 +28,16 @@
{
<meta name="robots" content="noindex" />
}
- <link rel="stylesheet" href="~/Content/css/json-validator.css?r=20191204" />
+ <link rel="stylesheet" href="~/Content/css/file-upload.css?r=202002" />
+ <link rel="stylesheet" href="~/Content/css/json-validator.css?r=202002" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tmont/sunlight@1.22.0/src/themes/sunlight.default.min.css" />
<script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/tmont/sunlight@1.22.0/src/sunlight.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/tmont/sunlight@1.22.0/src/plugins/sunlight-plugin.linenumbers.min.js" crossorigin="anonymous"></script>
<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?r=20191204"></script>
+ <script src="~/Content/js/file-upload.js?r=202002"></script>
+ <script src="~/Content/js/json-validator.js?r=202002"></script>
<script>
$(function() {
smapi.jsonValidator(@Json.Serialize(this.Url.PlainAction("Index", "JsonValidator", new { schemaName = "$schemaName", id = "$id" })), @Json.Serialize(Model.PasteID));
@@ -86,6 +88,7 @@ else if (!isEditView && Model.PasteID != null)
{
<h2>Upload a JSON file</h2>
<form action="@this.Url.PlainAction("PostAsync", "JsonValidator")" method="post">
+ <input id="inputFile" type="file" />
<ol>
<li>
Choose the JSON format:<br />
@@ -97,7 +100,7 @@ else if (!isEditView && Model.PasteID != null)
</select>
</li>
<li>
- Drag the file onto this textbox (or paste the text in):<br />
+ Drag the file onto this textbox <small>(or <a href="#" id="choose-file-link">choose a file</a>)</small>:<br />
<textarea id="input" name="Content" placeholder="paste file here">@Model.Content</textarea>
</li>
<li>