mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-15 20:40:52 +09:00
chore: various trivial fixes (#38070)
Follow-up to #37987, addressing the unresolved review comments on the org members search form. And fix more trivial problems together (see the commit titles) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -278,6 +278,7 @@ a {
|
||||
|
||||
a:hover {
|
||||
text-decoration-line: underline;
|
||||
text-underline-position: under; /* necessary for CJK fonts, otherwise, default "auto" makes the underline cross-over the CJK text bottom */
|
||||
}
|
||||
|
||||
/* a = always colored, underlined on hover */
|
||||
|
||||
@@ -39,25 +39,16 @@ a.ui.label {
|
||||
height: 2.1666em;
|
||||
}
|
||||
|
||||
.ui.label > .color-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.ui.label > .icon {
|
||||
width: auto;
|
||||
margin: 0 0.75em 0 0;
|
||||
}
|
||||
|
||||
.ui.label > .detail {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
font-weight: var(--font-weight-medium);
|
||||
margin-left: 1em;
|
||||
margin-left: 0.5em; /* our .ui.label already provides flex gap, so the margin here shouldn't be too large */
|
||||
opacity: 0.8;
|
||||
}
|
||||
.ui.label > .detail .icon {
|
||||
margin: 0 0.25em 0 0;
|
||||
}
|
||||
|
||||
.ui.label > .close.icon,
|
||||
.ui.label > .delete.icon {
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.toast-body pre {
|
||||
white-space: pre-wrap; /* online editor, when git hook fails, the rendered message uses "pre" */
|
||||
}
|
||||
|
||||
.toast-close {
|
||||
border-radius: var(--border-radius);
|
||||
width: 30px;
|
||||
|
||||
@@ -1,23 +1,12 @@
|
||||
import {registerGlobalInitFunc} from '../modules/observer.ts';
|
||||
import {addDelegatedEventListener, queryElems} from '../utils/dom.ts';
|
||||
|
||||
export function initRepositorySearch() {
|
||||
const repositorySearchForm = document.querySelector<HTMLFormElement>('#repo-search-form');
|
||||
if (!repositorySearchForm) return;
|
||||
|
||||
repositorySearchForm.addEventListener('change', (e: Event) => {
|
||||
e.preventDefault();
|
||||
|
||||
const params = new URLSearchParams();
|
||||
for (const [key, value] of new FormData(repositorySearchForm).entries()) {
|
||||
params.set(key, value as string);
|
||||
}
|
||||
if ((e.target as HTMLInputElement).name === 'clear-filter') {
|
||||
params.delete('archived');
|
||||
params.delete('fork');
|
||||
params.delete('mirror');
|
||||
params.delete('template');
|
||||
params.delete('private');
|
||||
}
|
||||
|
||||
params.delete('clear-filter');
|
||||
window.location.search = params.toString();
|
||||
registerGlobalInitFunc('initRepositorySearch', (form: HTMLFormElement) => {
|
||||
addDelegatedEventListener(form, 'change', 'input[type="radio"]', () => form.submit());
|
||||
form.querySelector('.repo-search-filter-reset')!.addEventListener('click', () => {
|
||||
queryElems(form, 'input[type="radio"]', (el: HTMLInputElement) => el.checked = false);
|
||||
form.submit();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@ function initDevtestPage() {
|
||||
levelMap[level](message);
|
||||
});
|
||||
}
|
||||
document.querySelector('.toast-test-button-pre')!.addEventListener('click', () => {
|
||||
showErrorToast(html`<div>message <pre>pre ${'a'.repeat(200)}</pre><details><summary>summary</summary>details</details></div>`, {useHtmlBody: true});
|
||||
});
|
||||
}
|
||||
|
||||
const modalButtons = document.querySelector('.modal-buttons');
|
||||
|
||||
Reference in New Issue
Block a user