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:click={() => removeChannel(channel.id)}
on:keydown={() => removeChannel(channel.id)}>🗑️</button on:keydown={() => removeChannel(channel.id)}>🗑️</button
> >
{#if channel.isPrivate == true} <!-- Show invite if channel has password but is not DM -->
<button on:click={() => inviteChannel(channel.id)}>🤝</button> {#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} {/if}
<button on:click={() => changePassword(channel.id)}>🔑</button>
</div> </div>
</li> </li>

Loading…
Cancel
Save