100 lines
4.4 KiB
XML
100 lines
4.4 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage
|
|
x:Class="RelayClient.MainPage"
|
|
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
Title="Relay Client">
|
|
|
|
<Grid RowDefinitions="Auto,*,Auto"
|
|
ColumnDefinitions="220,*"
|
|
Padding="12"
|
|
RowSpacing="10"
|
|
ColumnSpacing="10">
|
|
|
|
<!-- Header -->
|
|
<Border Grid.Row="0" Grid.ColumnSpan="2" StrokeThickness="1" Padding="10">
|
|
<VerticalStackLayout Spacing="2">
|
|
<Label x:Name="UserLabel" Text="Logged in as: Unknown"
|
|
FontAttributes="Bold" FontSize="18" />
|
|
<Label x:Name="ChannelLabel" Text="No channel selected" FontSize="14" />
|
|
<Label x:Name="TypingLabel" Text="" FontSize="11"
|
|
FontAttributes="Italic" TextColor="Gray" IsVisible="False" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
<!-- Sidebar: channel list -->
|
|
<Border Grid.Row="1" Grid.Column="0" StrokeThickness="1" Padding="10">
|
|
<ScrollView>
|
|
<VerticalStackLayout Spacing="8">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<Label Grid.Column="0" Text="Channels"
|
|
FontAttributes="Bold" FontSize="16"
|
|
VerticalOptions="Center" />
|
|
<Button Grid.Column="1" Text="+"
|
|
FontSize="16" Padding="6,2"
|
|
HeightRequest="30" WidthRequest="30"
|
|
Clicked="AddChannel_OnClicked" />
|
|
</Grid>
|
|
<VerticalStackLayout x:Name="SidebarList" Spacing="4" />
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
</Border>
|
|
|
|
<!-- Messages view (text channels) -->
|
|
<Border x:Name="MessagesView" Grid.Row="1" Grid.Column="1" StrokeThickness="1" Padding="10">
|
|
<ScrollView x:Name="MessagesScrollView">
|
|
<VerticalStackLayout x:Name="MessagesLayout" Spacing="8" />
|
|
</ScrollView>
|
|
</Border>
|
|
|
|
<!-- RTC view (voice channels) -->
|
|
<Border x:Name="RtcView" Grid.Row="1" Grid.Column="1"
|
|
StrokeThickness="1" Padding="10" IsVisible="False">
|
|
<Grid RowDefinitions="Auto,*">
|
|
<HybridWebView x:Name="hybridWebView"
|
|
RawMessageReceived="OnHybridWebViewRawMessageReceived"
|
|
Grid.Row="1" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Input area -->
|
|
<VerticalStackLayout x:Name="InputArea" Grid.Row="2" Grid.Column="1" Spacing="4">
|
|
|
|
<!-- Context bar (reply / edit mode) -->
|
|
<Border x:Name="ContextBar" IsVisible="False" StrokeThickness="1" Padding="8,4">
|
|
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="8">
|
|
<Label x:Name="ContextBarLabel" Grid.Column="0"
|
|
VerticalOptions="Center" FontSize="12"
|
|
LineBreakMode="TailTruncation" />
|
|
<Button Grid.Column="1" Text="✕" FontSize="11"
|
|
Padding="6,2" HeightRequest="30"
|
|
Clicked="CancelContext_OnClicked" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Entry row: attach button + editor + send -->
|
|
<Grid ColumnDefinitions="Auto,*,Auto" ColumnSpacing="6">
|
|
<Button Grid.Column="0" Text="📎"
|
|
FontSize="16" Padding="6,2"
|
|
HeightRequest="40" WidthRequest="40"
|
|
Clicked="AttachFile_OnClicked"
|
|
ToolTipProperties.Text="Attach a file or image" />
|
|
<Editor x:Name="MessageEntry"
|
|
Grid.Column="1"
|
|
Placeholder="Type a message… (Shift+Enter for newline)"
|
|
AutoSize="TextChanges"
|
|
MaximumHeightRequest="120"
|
|
TextChanged="MessageEntry_OnTextChanged" />
|
|
<Button x:Name="SendButton" Grid.Column="2"
|
|
Text="Send" VerticalOptions="End"
|
|
Clicked="SendButton_OnClicked" />
|
|
</Grid>
|
|
|
|
</VerticalStackLayout>
|
|
|
|
<!-- Bottom-left: kept empty (swap button removed) -->
|
|
<ContentView Grid.Row="2" Grid.Column="0" />
|
|
|
|
</Grid>
|
|
</ContentPage>
|