Fix repo settings and protocol log problems (#35012) (#35013)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled

Backport #35012
This commit is contained in:
wxiaoguang
2025-07-10 01:20:15 +08:00
committed by GitHub
parent 053f9186bc
commit 81ee93e5bc
2 changed files with 11 additions and 7 deletions

View File

@@ -275,7 +275,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
HTTPAddr = filepath.Join(AppWorkPath, HTTPAddr)
}
default:
log.Fatal("Invalid PROTOCOL %q", Protocol)
log.Fatal("Invalid PROTOCOL %q", protocolCfg)
}
UseProxyProtocol = sec.Key("USE_PROXY_PROTOCOL").MustBool(false)
ProxyProtocolTLSBridging = sec.Key("PROXY_PROTOCOL_TLS_BRIDGING").MustBool(false)

View File

@@ -1,6 +1,6 @@
import {minimatch} from 'minimatch';
import {createMonaco} from './codeeditor.ts';
import {onInputDebounce, queryElems, toggleClass, toggleElem} from '../utils/dom.ts';
import {onInputDebounce, queryElems, toggleElem} from '../utils/dom.ts';
import {POST} from '../modules/fetch.ts';
import {initRepoSettingsBranchesDrag} from './repo-settings-branches.ts';
import {fomanticQuery} from '../modules/fomantic/base.ts';
@@ -124,14 +124,18 @@ function initRepoSettingsOptions() {
const pageContent = document.querySelector('.page-content.repository.settings.options');
if (!pageContent) return;
// Enable or select internal/external wiki system and issue tracker.
// toggle related panels for the checkbox/radio inputs, the "selector" may not exist
const toggleTargetContextPanel = (selector: string, enabled: boolean) => {
if (!selector) return;
queryElems(document, selector, (el) => el.classList.toggle('disabled', !enabled));
};
queryElems<HTMLInputElement>(pageContent, '.enable-system', (el) => el.addEventListener('change', () => {
toggleClass(el.getAttribute('data-target'), 'disabled', !el.checked);
toggleClass(el.getAttribute('data-context'), 'disabled', el.checked);
toggleTargetContextPanel(el.getAttribute('data-target'), el.checked);
toggleTargetContextPanel(el.getAttribute('data-context'), !el.checked);
}));
queryElems<HTMLInputElement>(pageContent, '.enable-system-radio', (el) => el.addEventListener('change', () => {
toggleClass(el.getAttribute('data-target'), 'disabled', el.value === 'false');
toggleClass(el.getAttribute('data-context'), 'disabled', el.value === 'true');
toggleTargetContextPanel(el.getAttribute('data-target'), el.value === 'true');
toggleTargetContextPanel(el.getAttribute('data-context'), el.value === 'false');
}));
queryElems<HTMLInputElement>(pageContent, '.js-tracker-issue-style', (el) => el.addEventListener('change', () => {