Quellcode durchsuchen

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.
tags/v1.22.0-rc0
silverwind vor 2 Monaten
Ursprung
Commit
c85619b82d
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 1
    0
      web_src/css/modules/animations.css
  2. 1
    1
      web_src/js/features/repo-common.js

+ 1
- 0
web_src/css/modules/animations.css Datei anzeigen

@@ -13,6 +13,7 @@
opacity: 0.3;
}

.btn.is-loading > *,
.button.is-loading > * {
opacity: 0;
}

+ 1
- 1
web_src/js/features/repo-common.js Datei anzeigen

@@ -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');

Laden…
Abbrechen
Speichern