summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web')
-rw-r--r--src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs5
-rw-r--r--src/SMAPI.Web/ViewModels/ModModel.cs5
-rw-r--r--src/SMAPI.Web/Views/Mods/Index.cshtml9
3 files changed, 18 insertions, 1 deletions
diff --git a/src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs b/src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs
index f4331f8d..850272eb 100644
--- a/src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs
+++ b/src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs
@@ -58,6 +58,9 @@ namespace StardewModdingAPI.Web.Framework.Caching.Wiki
/// <summary>The human-readable warnings for players about this mod.</summary>
public string[] Warnings { get; set; }
+ /// <summary>Extra metadata links (usually for open pull requests).</summary>
+ public Tuple<Uri, string>[] MetadataLinks { get; set; }
+
/// <summary>The link anchor for the mod entry in the wiki compatibility list.</summary>
public string Anchor { get; set; }
@@ -122,6 +125,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Wiki
this.CustomSourceUrl = mod.CustomSourceUrl;
this.CustomUrl = mod.CustomUrl;
this.ContentPackFor = mod.ContentPackFor;
+ this.MetadataLinks = mod.MetadataLinks;
this.Warnings = mod.Warnings;
this.Anchor = mod.Anchor;
@@ -156,6 +160,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Wiki
CustomUrl = this.CustomUrl,
ContentPackFor = this.ContentPackFor,
Warnings = this.Warnings,
+ MetadataLinks = this.MetadataLinks,
Anchor = this.Anchor,
// stable compatibility
diff --git a/src/SMAPI.Web/ViewModels/ModModel.cs b/src/SMAPI.Web/ViewModels/ModModel.cs
index 8668f67b..b57e03f8 100644
--- a/src/SMAPI.Web/ViewModels/ModModel.cs
+++ b/src/SMAPI.Web/ViewModels/ModModel.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using System.Linq;
using StardewModdingAPI.Toolkit.Framework.Clients.Wiki;
@@ -37,6 +38,9 @@ namespace StardewModdingAPI.Web.ViewModels
/// <summary>The human-readable warnings for players about this mod.</summary>
public string[] Warnings { get; set; }
+ /// <summary>Extra metadata links (usually for open pull requests).</summary>
+ public Tuple<Uri, string>[] MetadataLinks { get; set; }
+
/// <summary>A unique identifier for the mod that can be used in an anchor URL.</summary>
public string Slug { get; set; }
@@ -61,6 +65,7 @@ namespace StardewModdingAPI.Web.ViewModels
this.BetaCompatibility = entry.BetaCompatibility != null ? new ModCompatibilityModel(entry.BetaCompatibility) : null;
this.ModPages = this.GetModPageUrls(entry).ToArray();
this.Warnings = entry.Warnings;
+ this.MetadataLinks = entry.MetadataLinks;
this.Slug = entry.Anchor;
}
diff --git a/src/SMAPI.Web/Views/Mods/Index.cshtml b/src/SMAPI.Web/Views/Mods/Index.cshtml
index 8293fbe2..2bc135c3 100644
--- a/src/SMAPI.Web/Views/Mods/Index.cshtml
+++ b/src/SMAPI.Web/Views/Mods/Index.cshtml
@@ -92,7 +92,14 @@
<span v-else class="mod-closed-source">no source</span>
</td>
<td>
- <small><a v-bind:href="'#' + mod.Slug">#</a></small>
+ <small>
+ <a v-bind:href="'#' + mod.Slug">#</a>
+ <span v-show="showAdvanced">
+ <template v-for="(link, i) in mod.MetadataLinks">
+ <a v-bind:href="link.Item1">{{link.Item2}}</a>
+ </template>
+ </span>
+ </small>
</td>
</tr>
</tbody>