3.0 Beta 8

This commit is contained in:
2026-04-17 17:55:42 +02:00
parent a0a6fdaf55
commit 8afd4a81b0
30 changed files with 834 additions and 172 deletions

View File

@@ -13,32 +13,70 @@
<div class="items-right"></div>
</navbar>
<main tuiGroup orientation="vertical" style="width: 100%">
@for (category of store.networkData().categories; track category) {
<div class="category">
<h2>{{category.name}}</h2>
<tui-tabs [(activeItemIndex)]="tabActiveIndex">
<button
iconStart="@tui.hash"
tuiTab
type="button"
>
{{"chat.network.tabs.channels"|translate}}
</button>
<div tuiGroup orientation="vertical" style="width: 100%">
@for (channel of category.channels; track channel) {
<button tuiButton class="channel" [appearance]="router.url.endsWith(channel.channelId) ? 'primary' : 'secondary'" [disabled]="channel.type != 'message'" [routerLink]="'/chat/network/'+store.networkData().networkId+'/'+category.categoryId+'/'+channel.channelId">
@switch (channel.type) {
@case ("message") {
<tui-icon icon="@tui.hash"></tui-icon>
}
@case ("broadcast") {
<tui-icon icon="@tui.radio"></tui-icon>
}
@case ("voice") {
<tui-icon icon="@tui.audio-lines"></tui-icon>
}
<button
disabled
iconStart="@tui.users"
tuiTab
type="button"
>
{{"chat.network.tabs.members"|translate}}
</button>
<button
iconStart="@tui.cog"
tuiTab
type="button"
>
{{"chat.network.tabs.settings"|translate}}
</button>
</tui-tabs>
<br/>
@switch (tabActiveIndex) {
@case (0) {
<main tuiGroup orientation="vertical" style="width: 100%">
@for (category of store.networkData().categories; track category) {
<div class="category">
<h2>{{category.name}}</h2>
<div tuiGroup orientation="vertical" style="width: 100%">
@for (channel of category.channels; track channel) {
<button tuiButton class="channel" [appearance]="router.url.endsWith(channel.channelId) ? 'primary' : 'secondary'" [disabled]="channel.type != 'message'" [routerLink]="'/chat/network/'+store.networkData().networkId+'/'+category.categoryId+'/'+channel.channelId">
@switch (channel.type) {
@case ("message") {
<tui-icon icon="@tui.hash"></tui-icon>
}
@case ("broadcast") {
<tui-icon icon="@tui.radio"></tui-icon>
}
@case ("voice") {
<tui-icon icon="@tui.audio-lines"></tui-icon>
}
}
<span>{{channel.name}}</span>
</button>
}
<span>{{channel.name}}</span>
</button>
}
</div>
</div>
</div>
</div>
}
</main>
}
</main>
@case (2) {
<main id="settings">
<network-settings [networkStore]="this.store"></network-settings>
</main>
}
}
</div>
</div>
}