Skip to content

Commit

Permalink
Fix download buttons on branches page (#30147)
Browse files Browse the repository at this point in the history
Fixes go-gitea/gitea#30143, regression from
go-gitea/gitea#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.

(cherry picked from commit c85619b82d19a928cb219eba3f38473928b29b0c)
  • Loading branch information
silverwind authored and earl-warren committed Mar 30, 2024
1 parent ea4755b commit 8d2b764
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions web_src/css/modules/animations.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
opacity: 0.3;
}

.btn.is-loading > *,
.button.is-loading > * {
opacity: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion web_src/js/features/repo-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 8d2b764

Please sign in to comment.