summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-10-20 17:26:26 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-10-20 17:26:26 -0400
commit39bacfa8688232e11850cdf2c0b0b4c953be1d76 (patch)
tree9bf5607db756303c8cb3739e0c517a0278a89c03 /src
parent2b5db3ce7e37632422475239faa063c5bcc09064 (diff)
downloadSMAPI-39bacfa8688232e11850cdf2c0b0b4c953be1d76.tar.gz
SMAPI-39bacfa8688232e11850cdf2c0b0b4c953be1d76.tar.bz2
SMAPI-39bacfa8688232e11850cdf2c0b0b4c953be1d76.zip
hide technical columns by default (#597)
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI.Web/Views/Mods/Index.cshtml18
-rw-r--r--src/SMAPI.Web/wwwroot/Content/css/mods.css4
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/mods.js6
3 files changed, 21 insertions, 7 deletions
diff --git a/src/SMAPI.Web/Views/Mods/Index.cshtml b/src/SMAPI.Web/Views/Mods/Index.cshtml
index 2b33fcaf..8d1b91ad 100644
--- a/src/SMAPI.Web/Views/Mods/Index.cshtml
+++ b/src/SMAPI.Web/Views/Mods/Index.cshtml
@@ -26,16 +26,22 @@
}
<div id="app">
- <label for="search-box">Search: </label>
- <input type="text" id="search-box" v-model="search" v-on:input="applySearch" />
+ <div>
+ <label for="search-box">Search: </label>
+ <input type="text" id="search-box" v-model="search" v-on:input="applySearch"/>
+ </div>
+ <div id="show-fields-option">
+ <input type="checkbox" id="show-all-fields" v-model="showAllFields" />
+ <label for="show-all-fields">show advanced fields</label>
+ </div>
<table class="wikitable" id="mod-list">
<tr>
<th>mod name</th>
<th>links</th>
<th>author</th>
<th>compatibility</th>
- <th>broke in</th>
- <th>code</th>
+ <th v-show="showAllFields">broke in</th>
+ <th v-show="showAllFields">code</th>
<th>&nbsp;</th>
</tr>
<tr v-for="mod in mods" :key="mod.Name" v-bind:id="mod.Slug" :key="mod.Slug" v-bind:data-status="mod.BetaCompatibility != null ? mod.BetaCompatibility.Status : mod.Compatibility.Status" v-show="mod.Visible">
@@ -59,8 +65,8 @@
<span v-html="mod.BetaCompatibility.Summary"></span>
</div>
</td>
- <td class="mod-broke-in" v-html="mod.BrokeIn"></td>
- <td>
+ <td class="mod-broke-in" v-html="mod.BrokeIn" v-show="showAllFields"></td>
+ <td v-show="showAllFields">
<span v-if="mod.SourceUrl"><a v-bind:href="mod.SourceUrl">source</a></span>
<span v-else class="mod-closed-source">no source</span>
</td>
diff --git a/src/SMAPI.Web/wwwroot/Content/css/mods.css b/src/SMAPI.Web/wwwroot/Content/css/mods.css
index d250440f..fee01450 100644
--- a/src/SMAPI.Web/wwwroot/Content/css/mods.css
+++ b/src/SMAPI.Web/wwwroot/Content/css/mods.css
@@ -42,6 +42,10 @@ table.wikitable > caption {
font-weight:bold
}
+#show-fields-option {
+ opacity: 0.7;
+}
+
#mod-list .mod-page-links,
#mod-list .mod-alt-authors,
#mod-list .mod-alt-names,
diff --git a/src/SMAPI.Web/wwwroot/Content/js/mods.js b/src/SMAPI.Web/wwwroot/Content/js/mods.js
index 1b15b622..16c7cd5e 100644
--- a/src/SMAPI.Web/wwwroot/Content/js/mods.js
+++ b/src/SMAPI.Web/wwwroot/Content/js/mods.js
@@ -4,7 +4,11 @@ var smapi = smapi || {};
var app;
smapi.modList = function (mods) {
// init data
- var data = { mods: mods, search: "" };
+ var data = {
+ mods: mods,
+ showAllFields: false,
+ search: ""
+ };
for (var i = 0; i < data.mods.length; i++) {
var mod = mods[i];