Implemented interaction with docker registry.

This commit is contained in:
2024-07-06 18:07:13 +05:00
parent a8d656148a
commit 10ccf2f800
155 changed files with 5142 additions and 89 deletions

View File

@@ -3,3 +3,4 @@ import.meta.glob([
]);
import './bootstrap';
import './_menu.js';
import './block-copy.js';

View File

@@ -0,0 +1,21 @@
[].slice.call(document.querySelectorAll('.block-copy')).map(function(el) {
let button = el.querySelector('button');
button.addEventListener('click', () => {
navigator.clipboard.writeText(el.querySelector('.block-copy-text').textContent)
.then(() => {
button.textContent = button.getAttribute('data-copy-success');
setTimeout(function () {
button.textContent = button.getAttribute('data-default');
}, 3000);
})
.catch(err => {
button.textContent = button.getAttribute('data-copy-error');
setTimeout(function () {
button.textContent = button.getAttribute('data-default');
}, 3000);
console.log('Something went wrong', err);
});
});
});