From 20ffa75f19a79d9b34a943cac422a0699aa895cf Mon Sep 17 00:00:00 2001 From: monlovesmango Date: Fri, 28 Jul 2023 13:44:44 -0500 Subject: [PATCH] add remove relay button --- extension/options.jsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/extension/options.jsx b/extension/options.jsx index 91d0a1c..fb3622d 100644 --- a/extension/options.jsx +++ b/extension/options.jsx @@ -108,6 +108,9 @@ function Options() { onChange={toggleRelayPolicy.bind(null, i, 'write')} /> + ))}
@@ -351,7 +354,15 @@ function Options() { ]) } + function removeRelay(i) { + setRelays([ + ...relays.slice(0, i), + ...relays.slice(i + 1) + ]) + } + function addNewRelay() { + if (newRelayURL.trim() === '') return relays.push({ url: newRelayURL, policy: {read: true, write: true}