Upload folder via GUI - assets

This commit is contained in:
Git Manager GUI
2026-05-11 09:17:13 +02:00
parent b277a9be06
commit 85cb7ef400
3 changed files with 371 additions and 0 deletions

55
assets/js/mcn-script.js Normal file
View File

@@ -0,0 +1,55 @@
(function () {
'use strict';
// ---- Kategorie-Filter ----
document.addEventListener('DOMContentLoaded', function () {
const btns = document.querySelectorAll('.mcn-filter-btn');
const cards = document.querySelectorAll('.mcn-card');
const empty = document.querySelector('.mcn-empty');
btns.forEach(function (btn) {
btn.addEventListener('click', function () {
btns.forEach(function (b) { b.classList.remove('active'); });
btn.classList.add('active');
var filter = btn.dataset.filter;
var visible = 0;
cards.forEach(function (card) {
if (filter === 'all' || card.dataset.category.split(' ').indexOf(filter) !== -1) {
card.style.display = '';
visible++;
} else {
card.style.display = 'none';
}
});
if (empty) {
empty.style.display = visible === 0 ? 'block' : 'none';
}
});
});
// ---- Server-IP Kopieren ----
document.querySelectorAll('.mcn-copy-btn').forEach(function (btn) {
btn.addEventListener('click', function () {
var ip = btn.dataset.ip;
if (navigator.clipboard) {
navigator.clipboard.writeText(ip).then(function () {
btn.textContent = '✅ Kopiert!';
setTimeout(function () { btn.textContent = 'Kopieren'; }, 2000);
});
} else {
var el = document.createElement('textarea');
el.value = ip;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
btn.textContent = '✅ Kopiert!';
setTimeout(function () { btn.textContent = 'Kopieren'; }, 2000);
}
});
});
});
})();