All checks were successful
Dotnet build and test / build (pull_request) Successful in 8m18s
79 lines
3.2 KiB
XML
79 lines
3.2 KiB
XML
<ContentPage
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="cl:avalonia.Controls"
|
|
x:Class="PostIt.Views.SettingsPage"
|
|
xmlns:vm="using:PostIt.ViewModels"
|
|
x:DataType="vm:Settings"
|
|
>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Text="Authority"/>
|
|
<TextBox Grid.Row="1" x:Name="AuthorityTextBox"
|
|
Text="{Binding Authentication.Authority, Mode=TwoWay}"/>
|
|
|
|
<TextBlock Grid.Row="2" Text="ClientId"/>
|
|
<TextBox Grid.Row="3" x:Name="ClientIdTextBox"
|
|
Text="{Binding Authentication.ClientId, Mode=TwoWay}"/>
|
|
|
|
<TextBlock Grid.Row="4" Text="Scopes (space-separated)"/>
|
|
<TextBox Grid.Row="5" x:Name="ScopesTextBox"
|
|
Text="{Binding Authentication.ScopeListText, Mode=TwoWay}"/>
|
|
|
|
<TextBlock Grid.Row="6" Text="Blogs API URL"/>
|
|
<TextBox Grid.Row="7" x:Name="BlogsApiUrlTextBox"
|
|
Text="{Binding BlogsApiUrl, Mode=TwoWay}"/>
|
|
|
|
<TextBlock Grid.Row="8" Text="API URL"/>
|
|
<TextBox Grid.Row="9" x:Name="BusinessApiUrlTextBox"
|
|
Text="{Binding ApiUrl, Mode=TwoWay}"/>
|
|
|
|
<TextBlock Grid.Row="10" Text="Dark mode"/>
|
|
<CheckBox Grid.Row="11" x:Name="DarkModeCheckBox" IsChecked="{Binding DarkMode, Mode=TwoWay}"/>
|
|
|
|
<StackPanel Grid.Row="12" Spacing="8">
|
|
<TextBlock Text="Avatar: PNG, JPG/JPEG, WEBP, GIF. Taille max 2 MB."
|
|
Opacity="0.8"
|
|
TextWrapping="Wrap" />
|
|
|
|
<TextBlock x:Name="AvatarUploadStatusText"
|
|
Text=""
|
|
TextWrapping="Wrap" />
|
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button x:Name="ChooseAvatarButton"
|
|
Content="Choisir l'avatar"
|
|
Click="ChooseAvatar_Click"
|
|
Margin="0,0,8,0"/>
|
|
|
|
<!-- Sauver: bound to the Save RelayCommand on the Settings
|
|
VM. The source generator emits an ICommand property whose
|
|
name matches the source method exactly (no "Command"
|
|
suffix is added), so we bind {Binding Save} here. See
|
|
AGENTS.md "Avalonia + CommunityToolkit.Mvvm : conventions
|
|
de binding pour [RelayCommand]" for the full rationale.
|
|
IsEnabled tracks IsDirty so the button auto-disables
|
|
when there's nothing to persist. -->
|
|
<Button Content="Sauver"
|
|
Command="{Binding Save}"
|
|
IsEnabled="{Binding IsDirty}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</ContentPage>
|