1
0
mirror of https://github.com/go-gitea/gitea synced 2024-11-07 09:15:53 +01:00

Fix download buttons on branches page (#30147)

Fixes https://github.com/go-gitea/gitea/issues/30143, regression from
https://github.com/go-gitea/gitea/pull/29920.

We have `.button` on the repo page, but on the branch page it's a
`.btn`. Eventually we should find a solution to have a single button
class but until then this solution should be acceptable.
This commit is contained in:
silverwind 2024-03-27 21:05:49 +01:00 committed by GitHub
parent 1ad48f781e
commit c85619b82d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

@ -13,6 +13,7 @@
opacity: 0.3;
}
.btn.is-loading > *,
.button.is-loading > * {
opacity: 0;
}

@ -3,7 +3,7 @@ import {hideElem, showElem} from '../utils/dom.js';
import {POST} from '../modules/fetch.js';
async function getArchive($target, url, first) {
const dropdownBtn = $target[0].closest('.ui.dropdown.button');
const dropdownBtn = $target[0].closest('.ui.dropdown.button') ?? $target[0].closest('.ui.dropdown.btn');
try {
dropdownBtn.classList.add('is-loading');