restores the blogs page header height, and fixes the bool 'is in a romm and connected'
This commit is contained in:
parent
5dc991b885
commit
b709d4dd6d
5 changed files with 18 additions and 10 deletions
|
|
@ -76,8 +76,11 @@ namespace PostIt.ViewModels.Chat
|
|||
public partial string? SelectedUser { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(IsConnectedAndInARoom))]
|
||||
public partial string CurrentRoom { get; set; } = "General";
|
||||
|
||||
public bool IsConnectedAndInARoom => IsConnected && !string.IsNullOrEmpty(CurrentRoom);
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string NickName { get; set; } = "";
|
||||
|
||||
|
|
@ -87,6 +90,7 @@ namespace PostIt.ViewModels.Chat
|
|||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(SendMessageCommand))]
|
||||
[NotifyCanExecuteChangedFor(nameof(OpenCallCommand), nameof(ShowCallCommand))]
|
||||
[NotifyPropertyChangedFor(nameof(IsConnectedAndInARoom))]
|
||||
public partial bool IsConnected { get; set; } = false;
|
||||
|
||||
[ObservableProperty]
|
||||
|
|
|
|||
|
|
@ -2,20 +2,15 @@
|
|||
x:Class="PostIt.Views.Blogs.BlogsPage"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:models="using:Yavsc.Blogspot"
|
||||
xmlns:postitControls="using:PostIt.Controls"
|
||||
xmlns:reader="clr-namespace:Markdown.Avalonia;assembly=Markdown.Avalonia"
|
||||
xmlns:services="using:PostIt.Services"
|
||||
xmlns:vm="using:PostIt.ViewModels"
|
||||
x:Name="BlogsPageRoot"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
x:DataType="vm:BlogsViewModel"
|
||||
AutomaticallyApplySafeAreaPadding="True"
|
||||
Header="Billets de blog"
|
||||
mc:Ignorable="d">
|
||||
Header="Billets de blog">
|
||||
<Design.DataContext>
|
||||
<vm:BlogsViewModel />
|
||||
</Design.DataContext>
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ public partial class BlogsPage : ContentPage
|
|||
PostsSplitter.HorizontalAlignment = isWide ? HorizontalAlignment.Center : HorizontalAlignment.Stretch;
|
||||
PostsSplitter.VerticalAlignment = isWide ? VerticalAlignment.Stretch : VerticalAlignment.Center;
|
||||
PostsSplitter.Margin = isWide ? new Thickness(0, 12) : new Thickness(12, 0);
|
||||
NavigationPage.SetBarHeightOverride(this, isWide ? 36 : null);
|
||||
}
|
||||
|
||||
private static void SetArea(Control control, int row, int column, int rowSpan = 1, int columnSpan = 1)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
Text="{Binding CurrentRoom}"
|
||||
PlaceholderText="Nom du salon" />
|
||||
<Button Command="{Binding JoinRoomCommand}" Content="Rejoindre Salon (Join)" />
|
||||
<Button Command="{Binding LeaveRoomCommand}" Content="Quitter le salon" IsEnabled="{Binding !!SelectedRoom}" />
|
||||
<Button Command="{Binding LeaveRoomCommand}" Content="Quitter le salon" IsEnabled="{Binding IsConnectedAndInARoom}" />
|
||||
<!-- Choix de la salle en focus parmi celles jointes -->
|
||||
<ComboBox
|
||||
Width="180"
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
AcceptsReturn="False"
|
||||
IsEnabled="{Binding !!SelectedRoom}"
|
||||
IsEnabled="{Binding IsConnectedAndInARoom}"
|
||||
PlaceholderText="Votre message..."
|
||||
Text="{Binding MessageToSend}">
|
||||
<TextBox.KeyBindings>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,16 @@
|
|||
],
|
||||
"PodcastCameraId": "/dev/video0",
|
||||
"PodcastMicrophoneId": "default",
|
||||
"PodcastKeepScreenOn": false,
|
||||
"PodcastBlurBackground": false,
|
||||
"LanCallAddress": null,
|
||||
"AndroidKeepChatConnected": false,
|
||||
"ChatRoomsByAccount": {
|
||||
"1E801AB5E07C3365EDFE78054C60FB3A13A84182A65DDCC7F85DBE3F8B5D142D": [
|
||||
"General"
|
||||
]
|
||||
},
|
||||
"SelectedLanguage": "fr-FR",
|
||||
"SaveCommand": {}
|
||||
"SaveCommand": {},
|
||||
"ApplyCommand": {}
|
||||
}
|
||||
Loading…
Reference in a new issue