1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 10:07:22 +00:00

Fix some UI bugs and clean up unused tests (#34088)

1. Make the material icon falls back to basic theme correctly
2. Remove `TestAttributeReader`, the problem has been resolved.
3. Fix `toggleElem` bug and add tests
This commit is contained in:
wxiaoguang
2025-04-01 15:02:30 +08:00
committed by GitHub
parent d54418a7d3
commit 86c1a33369
4 changed files with 23 additions and 69 deletions

View File

@ -44,7 +44,7 @@ export function toggleClass(el: ElementArg, className: string, force?: boolean)
* @param force force=true to show or force=false to hide, undefined to toggle
*/
export function toggleElem(el: ElementArg, force?: boolean) {
toggleClass(el, 'tw-hidden', !force);
toggleClass(el, 'tw-hidden', force === undefined ? force : !force);
}
export function showElem(el: ElementArg) {