Skip to content

Commit 66584e9

Browse files
committed
Merge branch 'release/v1.24' into lunny/changelog_1.24.3
2 parents 5cbb3f7 + 81ee93e commit 66584e9

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

modules/setting/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
275275
HTTPAddr = filepath.Join(AppWorkPath, HTTPAddr)
276276
}
277277
default:
278-
log.Fatal("Invalid PROTOCOL %q", Protocol)
278+
log.Fatal("Invalid PROTOCOL %q", protocolCfg)
279279
}
280280
UseProxyProtocol = sec.Key("USE_PROXY_PROTOCOL").MustBool(false)
281281
ProxyProtocolTLSBridging = sec.Key("PROXY_PROTOCOL_TLS_BRIDGING").MustBool(false)

routers/api/v1/swagger/action.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ type swaggerResponseActionWorkflow struct {
4444
// swagger:response ActionWorkflowList
4545
type swaggerResponseActionWorkflowList struct {
4646
// in:body
47-
Body []api.ActionWorkflow `json:"body"`
47+
Body api.ActionWorkflowResponse `json:"body"`
4848
}

templates/swagger/v1_json.tmpl

Lines changed: 20 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web_src/js/features/repo-settings.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {minimatch} from 'minimatch';
22
import {createMonaco} from './codeeditor.ts';
3-
import {onInputDebounce, queryElems, toggleClass, toggleElem} from '../utils/dom.ts';
3+
import {onInputDebounce, queryElems, toggleElem} from '../utils/dom.ts';
44
import {POST} from '../modules/fetch.ts';
55
import {initRepoSettingsBranchesDrag} from './repo-settings-branches.ts';
66
import {fomanticQuery} from '../modules/fomantic/base.ts';
@@ -124,14 +124,18 @@ function initRepoSettingsOptions() {
124124
const pageContent = document.querySelector('.page-content.repository.settings.options');
125125
if (!pageContent) return;
126126

127-
// Enable or select internal/external wiki system and issue tracker.
127+
// toggle related panels for the checkbox/radio inputs, the "selector" may not exist
128+
const toggleTargetContextPanel = (selector: string, enabled: boolean) => {
129+
if (!selector) return;
130+
queryElems(document, selector, (el) => el.classList.toggle('disabled', !enabled));
131+
};
128132
queryElems<HTMLInputElement>(pageContent, '.enable-system', (el) => el.addEventListener('change', () => {
129-
toggleClass(el.getAttribute('data-target'), 'disabled', !el.checked);
130-
toggleClass(el.getAttribute('data-context'), 'disabled', el.checked);
133+
toggleTargetContextPanel(el.getAttribute('data-target'), el.checked);
134+
toggleTargetContextPanel(el.getAttribute('data-context'), !el.checked);
131135
}));
132136
queryElems<HTMLInputElement>(pageContent, '.enable-system-radio', (el) => el.addEventListener('change', () => {
133-
toggleClass(el.getAttribute('data-target'), 'disabled', el.value === 'false');
134-
toggleClass(el.getAttribute('data-context'), 'disabled', el.value === 'true');
137+
toggleTargetContextPanel(el.getAttribute('data-target'), el.value === 'true');
138+
toggleTargetContextPanel(el.getAttribute('data-context'), el.value === 'false');
135139
}));
136140

137141
queryElems<HTMLInputElement>(pageContent, '.js-tracker-issue-style', (el) => el.addEventListener('change', () => {

0 commit comments

Comments
 (0)