feat: Add filters API endpoints for retrieving, updating, generating, and exporting MikroTik configurations
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 7m37s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 7m37s
This commit is contained in:
@@ -200,14 +200,35 @@ function ServerManager() {
|
||||
return `${urlSettings.baseUrl}?${params.toString()}`;
|
||||
};
|
||||
|
||||
const copyToClipboard = async (text) => {
|
||||
// Функция резервного копирования для http
|
||||
const fallbackCopyToClipboard = (text) => {
|
||||
const textArea = document.createElement('textarea');
|
||||
textArea.value = text;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
document.execCommand('copy');
|
||||
setSuccess('Ссылка скопирована в буфер обмена!');
|
||||
setTimeout(() => setSuccess(''), 3000);
|
||||
} catch (err) {
|
||||
setError('Не удалось скопировать ссылку');
|
||||
}
|
||||
document.body.removeChild(textArea);
|
||||
};
|
||||
|
||||
const copyToClipboard = async (text) => {
|
||||
if (navigator.clipboard) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
setSuccess('Ссылка скопирована в буфер обмена!');
|
||||
setTimeout(() => setSuccess(''), 3000);
|
||||
return;
|
||||
} catch (err) {
|
||||
// fallback ниже
|
||||
}
|
||||
}
|
||||
fallbackCopyToClipboard(text);
|
||||
};
|
||||
|
||||
const quickCopyLink = async (server) => {
|
||||
|
||||
Reference in New Issue
Block a user