diff --git a/warpgate-web/src/admin/Target.svelte b/warpgate-web/src/admin/Target.svelte index 375413f67..16c0fd0d9 100644 --- a/warpgate-web/src/admin/Target.svelte +++ b/warpgate-web/src/admin/Target.svelte @@ -56,7 +56,7 @@ async function remove () { } async function toggleRole (role: Role) { - if (role.id in roleIsAllowed) { + if (roleIsAllowed[role.id]) { await api.deleteTargetRole({ id: target.id, roleId: role.id, diff --git a/warpgate-web/src/admin/User.svelte b/warpgate-web/src/admin/User.svelte index 1034efefe..279ca033d 100644 --- a/warpgate-web/src/admin/User.svelte +++ b/warpgate-web/src/admin/User.svelte @@ -71,7 +71,7 @@ async function remove () { } async function toggleRole (role: Role) { - if (role.id in roleIsAllowed) { + if (roleIsAllowed[role.id]) { await api.deleteUserRole({ id: user.id, roleId: role.id, diff --git a/warpgate-web/src/common/CopyButton.svelte b/warpgate-web/src/common/CopyButton.svelte index c1c96f1b3..91267bad6 100644 --- a/warpgate-web/src/common/CopyButton.svelte +++ b/warpgate-web/src/common/CopyButton.svelte @@ -13,6 +13,7 @@ let successVisible = false let button: HTMLElement async function _click () { + if (disabled) return successVisible = true copyTextToClipboard(text) setTimeout(() => {