helpz: append /git to path if GLOBAL_CONFIG has set git attribute
Some checks failed
docker-images / multi (push) Has been cancelled

Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
Shengqi Chen 2024-08-28 14:36:05 +08:00
parent c04b34bade
commit 8b143c090b
No known key found for this signature in database
GPG Key ID: 6EE389C0F18AF774

View File

@ -31,7 +31,7 @@ function generateFormConfig(form) {
function renderCode(tmpl) {
// generate mustache config
let conf: Record<string, string> = {
path: (mirrorId.endsWith(".git") ? "/git/" : "/") + mirrorId,
path: ((mirrorId.endsWith(".git") || GLOBAL_CONFIG.git) ? "/git/" : "/") + mirrorId,
};
Array.from(document.querySelectorAll("form.z-global")).forEach((elm) => {
Object.assign(conf, generateFormConfig(elm));