diff --git a/static/app.js b/static/app.js index 2f63caf..ce1c9c7 100644 --- a/static/app.js +++ b/static/app.js @@ -123,6 +123,23 @@ document.addEventListener('DOMContentLoaded', () => { } }; + window.copyToClipboard = async (elementId) => { + const text = document.getElementById(elementId).textContent; + const btn = event.currentTarget; + try { + await navigator.clipboard.writeText(text); + const originalHtml = btn.innerHTML; + btn.classList.add('copied'); + btn.innerHTML = ''; + setTimeout(() => { + btn.classList.remove('copied'); + btn.innerHTML = originalHtml; + }, 2000); + } catch (err) { + console.error('Failed to copy: ', err); + } + }; + function escapeHtml(unsafe) { if (!unsafe) return ''; return unsafe.toString() diff --git a/static/index.html b/static/index.html index f00e2ed..ea535ab 100644 --- a/static/index.html +++ b/static/index.html @@ -50,11 +50,21 @@
Run these commands on the machine running XIVLauncher to allow incoming connections on the specified port.
sudo ufw allow 4646/tcp
+ sudo ufw allow from localhost to any port 4646 proto tcp
+
+ sudo iptables -I INPUT -p tcp --dport 4646 -j ACCEPT
+ sudo iptables -I INPUT -p tcp -s localhost --dport 4646 -j ACCEPT
+
+