Fix various legacy problems (#37092)

1.  Fix #36439
2. Fix #37089
3. Fix incorrect layout of admin auth oidc page
4. Fix #35866
5. Fix #35800
6. Fix #36243
This commit is contained in:
wxiaoguang
2026-04-03 20:19:04 +08:00
committed by GitHub
parent 30c07c20e9
commit 74060bb849
18 changed files with 132 additions and 76 deletions

View File

@@ -290,7 +290,9 @@ In markup content, we always use bottom margin for all elements */
We decide which to show via `data-gitea-theme-dark` on `<html>`, which is
mirrored from `--is-dark-theme` in JS (so it also works with auto/custom themes).
*/
html[data-gitea-theme-dark="true"] .markup a[href*="#gh-light-mode-only"],
html[data-gitea-theme-dark="true"] .markup img[src*="#gh-light-mode-only"],
html[data-gitea-theme-dark="false"] .markup a[href*="#gh-dark-mode-only"],
html[data-gitea-theme-dark="false"] .markup img[src*="#gh-dark-mode-only"] {
display: none;
}

View File

@@ -1,7 +1,7 @@
import {POST} from '../modules/fetch.ts';
import {hideToastsAll, showErrorToast} from '../modules/toast.ts';
import {getComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts';
import {hideElem, showElem} from '../utils/dom.ts';
import {hideElem} from '../utils/dom.ts';
import {fomanticQuery} from '../modules/fomantic/base.ts';
import {registerGlobalEventFunc, registerGlobalInitFunc} from '../modules/observer.ts';
import {htmlEscape} from '../utils/html.ts';
@@ -36,12 +36,12 @@ function initTagNameEditor(elForm: HTMLFormElement) {
const hideTargetInput = function(tagNameInput: HTMLInputElement) {
const value = tagNameInput.value;
const tagHelper = elForm.querySelector('.tag-name-helper')!;
// Old behavior: if the tag already exists, hide the target branch selector and show a helper text to indicate the tag already exists.
// However, it is not right: when creating from an existing tag (not a draft or release yet), it still needs the "target branch"
// So the new logic here: don't hide the target branch selector.
if (existingTags.includes(value)) {
// If the tag already exists, hide the target branch selector.
hideElem(elForm.querySelectorAll('.tag-target-selector'));
tagHelper.textContent = existingTagHelperText;
} else {
showElem(elForm.querySelectorAll('.tag-target-selector'));
tagHelper.textContent = value ? newTagHelperText : defaultTagHelperText;
}
};