Add force_show_help_mirrors

Signed-off-by: Harry Chen <i@harrychen.xyz>
This commit is contained in:
Harry Chen 2020-09-19 00:39:54 +08:00
parent 15d4ef785b
commit 6fdc2990d1
4 changed files with 9 additions and 3 deletions

View File

@ -466,7 +466,7 @@ unlisted_mirrors:
url: '/github-release/conda-forge/miniforge/'
force_help_mirrors:
force_redirect_help_mirrors:
- AOSP
- lineageOS
- homebrew
@ -490,6 +490,9 @@ force_help_mirrors:
- flutter-sdk.git
- julia-general.git
force_show_help_mirrors:
- hugging-face-models
label_map:
unknown: label-default
syncing: label-info

View File

@ -45,6 +45,9 @@ $(document).ready(() => {
globalOptions.unlisted_mirrors.forEach(elem => {
availableMirrorIds.add(elem.name)
});
globalOptions.force_show_help_mirrors.forEach(elem => {
availableMirrorIds.add(elem)
});
console.log(window.mirrorId);
if (!availableMirrorIds.has(window.mirrorId)) {
location.href = "/404-help-hidden.html"; // this will break 404 issue submission

View File

@ -11,7 +11,7 @@ var new_mirrors = {};
global_options.options.new_mirrors.forEach((m) => new_mirrors[m] = true);
var unlisted = global_options.options.unlisted_mirrors;
var options = {};
global_options.options.force_help_mirrors.forEach((m) => options[m] = {'url': "/help/" + m + "/"})
global_options.options.force_redirect_help_mirrors.forEach((m) => options[m] = {'url': "/help/" + m + "/"})
var descriptions = {};
global_options.options.mirror_desc.forEach((m) => descriptions[m.name] = m.desc);

View File

@ -47,7 +47,7 @@ function legacyIndexRender(r){
global_options.options.new_mirrors.forEach((m) => new_mirrors[m] = true);
var unlisted = global_options.options.unlisted_mirrors;
var force_help = {}
global_options.options.force_help_mirrors.forEach((m) => force_help[m] = true);
global_options.options.force_redirect_help_mirrors.forEach((m) => force_help[m] = true);
var descriptions = {};
global_options.options.mirror_desc.forEach((m) => descriptions[m.name] = m.desc);
r.subrequest('/static/tunasync.json', {