show SMAPI 3.0 readiness for unofficial updates too (#606)
This commit is contained in:
parent
39341d772e
commit
0130416bd1
|
@ -65,7 +65,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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">
|
||||
<tr v-for="mod in mods" :key="mod.Name" v-bind:id="mod.Slug" :key="mod.Slug" v-bind:data-status="mod.LatestCompatibility.Status" v-show="mod.Visible">
|
||||
<td>
|
||||
{{mod.Name}}
|
||||
<small class="mod-alt-names" v-if="mod.AlternateNames">(aka {{mod.AlternateNames}})</small>
|
||||
|
@ -87,13 +87,13 @@
|
|||
</div>
|
||||
<div v-for="(warning, i) in mod.Warnings">⚠ {{warning}}</div>
|
||||
</td>
|
||||
<td class="mod-broke-in" v-html="mod.BetaCompatibility ? mod.BetaCompatibility.BrokeIn : mod.Compatibility.BrokeIn" v-show="showAdvanced"></td>
|
||||
<td class="mod-broke-in" v-html="mod.LatestCompatibility.BrokeIn" v-show="showAdvanced"></td>
|
||||
<td v-show="showAdvanced">
|
||||
<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>
|
||||
<td v-show="showAdvanced">
|
||||
<template v-if="(mod.BetaCompatibility || mod.Compatibility).Status == 'ok' || mod.Smapi3Status == 'ok' || mod.Smapi3Status == 'soon'">
|
||||
<template v-if="mod.LatestCompatibility.Status == 'ok' || mod.LatestCompatibility.Status == 'unofficial' || mod.Smapi3Status == 'ok' || mod.Smapi3Status == 'soon'">
|
||||
<small v-if="mod.Smapi3Status == 'ok'">✓</small>
|
||||
<small v-else-if="mod.Smapi3Status == 'broken'">✖</small>
|
||||
<small v-else-if="mod.Smapi3Status == 'soon' && mod.Smapi3Url"><a v-bind:href="mod.Smapi3Url">↻ soon</a></small>
|
||||
|
|
|
@ -124,6 +124,9 @@ smapi.modList = function (mods) {
|
|||
// set initial visibility
|
||||
mod.Visible = true;
|
||||
|
||||
// set overall compatibility
|
||||
mod.LatestCompatibility = mod.BetaCompatibility || mod.Compatibility;
|
||||
|
||||
// concatenate searchable text
|
||||
mod.SearchableText = [mod.Name, mod.AlternateNames, mod.Author, mod.AlternateAuthors, mod.Compatibility.Summary, mod.BrokeIn];
|
||||
if (mod.Compatibility.UnofficialVersion)
|
||||
|
@ -202,7 +205,7 @@ smapi.modList = function (mods) {
|
|||
return false;
|
||||
|
||||
// check status
|
||||
var status = (mod.BetaCompatibility || mod.Compatibility).Status;
|
||||
var status = mod.LatestCompatibility.Status;
|
||||
if (filters.status[status] && !filters.status[status].value)
|
||||
return false;
|
||||
|
||||
|
@ -250,7 +253,7 @@ smapi.modList = function (mods) {
|
|||
* @returns {string} The compatibility group (one of 'compatible', 'workaround', 'soon', 'broken', 'abandoned', or 'invalid').
|
||||
*/
|
||||
getCompatibilityGroup: function (mod) {
|
||||
var status = (mod.BetaCompatibility || mod.Compatibility).Status;
|
||||
var status = mod.LatestCompatibility.Status;
|
||||
switch (status) {
|
||||
// obsolete
|
||||
case "abandoned":
|
||||
|
|
Loading…
Reference in New Issue