Browse Source

* Hide useless buttons on DM channels

master
vvandenb 2 years ago
parent
commit
dc73bdfa2e
  1. 10
      front/volume/src/components/Channels.svelte

10
front/volume/src/components/Channels.svelte

@ -229,10 +229,14 @@
on:click={() => removeChannel(channel.id)}
on:keydown={() => removeChannel(channel.id)}>🗑️</button
>
{#if channel.isPrivate == true}
<button on:click={() => inviteChannel(channel.id)}>🤝</button>
<!-- Show invite if channel has password but is not DM -->
{#if channel.isPrivate == true && channel.password}
<button on:click={() => inviteChannel(channel.id)}>🤝</button>
{/if}
<!-- Show change password if channel is not DM -->
{#if !(channel.isPrivate == true && !channel.password)}
<button on:click={() => changePassword(channel.id)}>🔑</button>
{/if}
<button on:click={() => changePassword(channel.id)}>🔑</button>
</div>
</li>

Loading…
Cancel
Save