Show github release icon in mirror list

Signed-off-by: Harry Chen <i@harrychen.xyz>
This commit is contained in:
Harry Chen 2021-02-02 13:49:23 +08:00
parent fac52c9f5c
commit 23e15ce321
No known key found for this signature in database
GPG Key ID: 9F98D3E7C18D0378
3 changed files with 5 additions and 2 deletions

View File

@ -76,7 +76,8 @@
{{mir.name}}
<span class="label label-new" v-if='mir.is_new'>new</span>
<a v-if='mir.help_url' :href="mir.help_url"><i aria-hidden="true" class="fa fa-question-circle" title="Help"></i><span class="sr-only">[Help]</span></a>
</a>
<a v-if='mir.github_release' :href="javascript:void(0)"></a><i aria-hidden="true" class="fa fa-github" title="GitHub Release"></i><span class="sr-only">[GitHub Release]</span>
</a> </a>
</td>
<td class="col-md-4">
{{mir.last_update}}<span v-if="mir.show_status" :class="['label', 'label-status', mir.label, 'hidden-xs']">{{mir.status}}</span>

View File

@ -145,8 +145,9 @@ var processMirrorItem = function(d){
d = $.extend(d, options[d.name]);
}
d.help_url = help_url[d.name];
d.is_new = new_mirrors[d.name];
d.is_new = Boolean(new_mirrors[d.name]);
d.description = descriptions[d.name];
d.github_release = d.url && d.url.startsWith('/github-release/');
if (d.is_master === undefined) {
d.is_master = true;
}

View File

@ -78,6 +78,7 @@ function legacyIndexRender(r){
description: descriptions[m.name],
url: force_help[m.name] ? help_url[m.name] : m.url ? m.url : '/' + m.name + '/',
is_new: !!new_mirrors[m.name],
github_release: m.url && m.url.startsWith('/github-release/'),
help_url: help_url[m.name],
last_update: getMirDate(target),
label: label_map[status],