mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
Add force_show_help_mirrors
Signed-off-by: Harry Chen <i@harrychen.xyz>
This commit is contained in:
parent
15d4ef785b
commit
6fdc2990d1
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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', {
|
||||
|
|
|
|||
Loading…
Reference in New Issue