Update: Text Channel Stuff
Bugs: Files don't work Bugs: Video In-Line don't work Added: idk, everything?
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage
|
||||
x:Class="RelayClient.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
@@ -12,82 +12,88 @@
|
||||
ColumnSpacing="10">
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0"
|
||||
Grid.ColumnSpan="2"
|
||||
StrokeThickness="1"
|
||||
Padding="10">
|
||||
<VerticalStackLayout Spacing="4">
|
||||
<Label x:Name="UserLabel"
|
||||
Text="Logged in as: Unknown"
|
||||
FontAttributes="Bold"
|
||||
FontSize="18" />
|
||||
<Label x:Name="ChannelLabel"
|
||||
Text="No channel selected"
|
||||
FontSize="14" />
|
||||
<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 -->
|
||||
<Border Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
StrokeThickness="1"
|
||||
Padding="10">
|
||||
<!-- Sidebar: channel list -->
|
||||
<Border Grid.Row="1" Grid.Column="0" StrokeThickness="1" Padding="10">
|
||||
<ScrollView>
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Label Text="Channels"
|
||||
FontAttributes="Bold"
|
||||
FontSize="16" />
|
||||
<VerticalStackLayout x:Name="SidebarList"
|
||||
Spacing="6" />
|
||||
<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 -->
|
||||
<Border Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
StrokeThickness="1"
|
||||
Padding="10">
|
||||
<!-- 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" />
|
||||
<VerticalStackLayout x:Name="MessagesLayout" Spacing="8" />
|
||||
</ScrollView>
|
||||
</Border>
|
||||
<Border x:Name="RtcView"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
StrokeThickness="1"
|
||||
Padding="10"
|
||||
IsVisible="False">
|
||||
<!-- <WebView Source="test.html"/> -->
|
||||
<Grid RowDefinitions="Auto,*"
|
||||
ColumnDefinitions="*">
|
||||
|
||||
<!-- 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 -->
|
||||
<Grid Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
ColumnDefinitions="*,Auto"
|
||||
ColumnSpacing="10">
|
||||
<Entry x:Name="MessageEntry"
|
||||
Grid.Column="0"
|
||||
Placeholder="Type a message..."
|
||||
ReturnType="Send"
|
||||
Completed="MessageEntry_OnCompleted" />
|
||||
<!-- Input area -->
|
||||
<VerticalStackLayout x:Name="InputArea" Grid.Row="2" Grid.Column="1" Spacing="4">
|
||||
|
||||
<Button Grid.Column="1"
|
||||
Text="Send"
|
||||
Clicked="SendButton_OnClicked" />
|
||||
</Grid>
|
||||
|
||||
<!-- Swap View -->
|
||||
<Button x:Name="ViewSwapped" Grid.Row="2" Grid.Column="0"
|
||||
Text="Swap to WebView"
|
||||
Clicked="SwapView_OnClicked" />
|
||||
<!-- 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>
|
||||
</ContentPage>
|
||||
|
||||
Reference in New Issue
Block a user