postit: persist settings save and apply ApiUrl changes without restart #51
13 changed files with 69 additions and 39 deletions
postit: extend shared status bar to main, dialogs and billing flows
commit
fe1eb52a55
|
|
@ -48,6 +48,14 @@ public partial class AddCircleMemberDialogViewModel : ViewModelBase
|
|||
[ObservableProperty]
|
||||
public partial string StatusMessage { get; set; } = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial StatusNotice ActionStatus { get; set; } = StatusNotice.FromMessage(string.Empty);
|
||||
|
||||
partial void OnStatusMessageChanged(string value)
|
||||
{
|
||||
ActionStatus = StatusNotice.FromMessage(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised when the user confirms a selection. The hosting
|
||||
/// <c>CirclesPage</c> subscribes to this event and calls
|
||||
|
|
|
|||
|
|
@ -36,6 +36,14 @@ public partial class BillingQueriesPageViewModel : ViewModelBase
|
|||
[ObservableProperty]
|
||||
public partial string StatusMessage { get; set; } = "Chargement des commandes...";
|
||||
|
||||
[ObservableProperty]
|
||||
public partial StatusNotice ActionStatus { get; set; } = StatusNotice.FromMessage("Chargement des commandes...");
|
||||
|
||||
partial void OnStatusMessageChanged(string value)
|
||||
{
|
||||
ActionStatus = StatusNotice.FromMessage(value);
|
||||
}
|
||||
|
||||
public string Title => IsReadOnly
|
||||
? $"Demandes en cours ({Form.Title})"
|
||||
: $"Commandes {Form.Title}";
|
||||
|
|
|
|||
|
|
@ -27,6 +27,14 @@ public partial class CommandFormsPageViewModel : ViewModelBase
|
|||
[ObservableProperty]
|
||||
public partial string StatusMessage { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial StatusNotice ActionStatus { get; set; } = StatusNotice.FromMessage(string.Empty);
|
||||
|
||||
partial void OnStatusMessageChanged(string value)
|
||||
{
|
||||
ActionStatus = StatusNotice.FromMessage(value);
|
||||
}
|
||||
|
||||
public string Title => $"Formulaires pour {Performer.UserName}";
|
||||
public string ContextLabel => $"{Activity.Name} · {Forms.Count} formulaire(s)";
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,17 @@ public partial class MainViewModel : ViewModelBase
|
|||
[ObservableProperty]
|
||||
public partial string StatusMessage { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial StatusNotice ActionStatus { get; set; } = StatusNotice.FromMessage(string.Empty);
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string SearchText { get; set; }
|
||||
|
||||
partial void OnStatusMessageChanged(string value)
|
||||
{
|
||||
ActionStatus = StatusNotice.FromMessage(value);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
public partial ObservableCollection<BlogPostDto> Posts { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,14 @@ public partial class PostAclDialogViewModel : ViewModelBase
|
|||
[ObservableProperty]
|
||||
public partial string StatusMessage { get; set; } = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial StatusNotice ActionStatus { get; set; } = StatusNotice.FromMessage(string.Empty);
|
||||
|
||||
partial void OnStatusMessageChanged(string value)
|
||||
{
|
||||
ActionStatus = StatusNotice.FromMessage(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Idempotency gate for <see cref="LoadAsync"/>: the dialog
|
||||
/// attaches the load trigger in <c>DataContextChanged</c>,
|
||||
|
|
|
|||
|
|
@ -42,6 +42,14 @@ public partial class SignaturePageViewModel : ViewModelBase
|
|||
[ObservableProperty]
|
||||
public partial string StatusMessage { get; set; } = "Prêt.";
|
||||
|
||||
[ObservableProperty]
|
||||
public partial StatusNotice ActionStatus { get; set; } = StatusNotice.FromMessage("Prêt.");
|
||||
|
||||
partial void OnStatusMessageChanged(string value)
|
||||
{
|
||||
ActionStatus = StatusNotice.FromMessage(value);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
public partial int StrokeCount { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="PostIt.Views.AddCircleMemberDialog"
|
||||
xmlns:vm="using:PostIt.ViewModels"
|
||||
xmlns:postitControls="using:PostIt.Controls"
|
||||
xmlns:services="using:PostIt.Services"
|
||||
x:DataType="vm:AddCircleMemberDialogViewModel"
|
||||
>
|
||||
|
|
@ -47,8 +48,8 @@
|
|||
|
||||
<!-- Action buttons -->
|
||||
<Grid Grid.Row="3" ColumnDefinitions="*,Auto,Auto" Margin="0,8,0,0">
|
||||
<TextBlock Grid.Column="0" Text="{Binding StatusMessage}"
|
||||
VerticalAlignment="Center"/>
|
||||
<postitControls:StatusBar Grid.Column="0"
|
||||
DataContext="{Binding ActionStatus}" />
|
||||
<Button Grid.Column="1" Content="Ajouter"
|
||||
x:Name="AddButton"
|
||||
Command="{Binding AddAsync}"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<ContentPage xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:PostIt.ViewModels"
|
||||
xmlns:postitControls="using:PostIt.Controls"
|
||||
x:Class="PostIt.Views.BillingQueriesPage"
|
||||
x:DataType="vm:BillingQueriesPageViewModel"
|
||||
Header="Commandes billing">
|
||||
|
|
@ -36,16 +37,8 @@
|
|||
</ListBox>
|
||||
|
||||
<Grid Grid.Row="3" ColumnDefinitions="*,Auto" Margin="0,12,0,0">
|
||||
<TextBox Grid.Column="0"
|
||||
Text="{Binding StatusMessage}"
|
||||
IsReadOnly="True"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
VerticalAlignment="Center" />
|
||||
<postitControls:StatusBar Grid.Column="0"
|
||||
DataContext="{Binding ActionStatus}" />
|
||||
<ProgressBar Grid.Column="1" Width="120" IsIndeterminate="True" IsVisible="{Binding IsBusy}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<ContentPage xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:PostIt.ViewModels"
|
||||
xmlns:postitControls="using:PostIt.Controls"
|
||||
xmlns:wf="using:Yavsc.Abstract.Workflow"
|
||||
x:Class="PostIt.Views.CommandFormsPage"
|
||||
x:DataType="vm:CommandFormsPageViewModel"
|
||||
|
|
@ -41,16 +42,8 @@
|
|||
<Button Grid.Column="4"
|
||||
Content="Demandes en cours (lecture seule)"
|
||||
Command="{Binding OpenOngoingQueriesCommand}" />
|
||||
<TextBox Grid.Column="6"
|
||||
Text="{Binding StatusMessage}"
|
||||
IsReadOnly="True"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
VerticalAlignment="Center" />
|
||||
<postitControls:StatusBar Grid.Column="6"
|
||||
DataContext="{Binding ActionStatus}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ContentPage>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:cvm="using:PostIt.ViewModels.Commands"
|
||||
xmlns:postitControls="using:PostIt.Controls"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="PostIt.Views.Commands.BrushPage"
|
||||
|
||||
|
|
@ -93,16 +94,8 @@
|
|||
Content="{Binding SubmitLabel}"
|
||||
Command="{Binding SubmitCommand}"
|
||||
IsEnabled="{Binding IsSupported}" />
|
||||
<TextBox Grid.Column="2"
|
||||
Text="{Binding StatusMessage}"
|
||||
IsReadOnly="True"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
VerticalAlignment="Center" />
|
||||
<postitControls:StatusBar Grid.Column="2"
|
||||
DataContext="{Binding ActionStatus}" />
|
||||
<ProgressBar Grid.Column="3"
|
||||
Width="120"
|
||||
IsIndeterminate="True"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="using:PostIt.ViewModels"
|
||||
xmlns:postitControls="using:PostIt.Controls"
|
||||
xmlns:models="using:Yavsc.Blogspot"
|
||||
xmlns:views="using:PostIt.Views"
|
||||
xmlns:AvaloniaEdit="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
|
||||
|
|
@ -104,7 +105,8 @@
|
|||
VerticalAlignment="Stretch">
|
||||
</TextBox>
|
||||
|
||||
<TextBlock Grid.Row="3" Text="{Binding StatusMessage}" Foreground="Gray" />
|
||||
<postitControls:StatusBar Grid.Row="3"
|
||||
DataContext="{Binding ActionStatus}" />
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="PostIt.Views.PostAclDialog"
|
||||
xmlns:vm="using:PostIt.ViewModels"
|
||||
xmlns:postitControls="using:PostIt.Controls"
|
||||
xmlns:dtos="using:Yavsc.Api.Client.Dtos"
|
||||
x:DataType="vm:PostAclDialogViewModel"
|
||||
>
|
||||
|
|
@ -53,8 +54,8 @@
|
|||
|
||||
<!-- Status bar -->
|
||||
<Grid Grid.Row="3" ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Text="{Binding StatusMessage}"
|
||||
VerticalAlignment="Center"/>
|
||||
<postitControls:StatusBar Grid.Column="0"
|
||||
DataContext="{Binding ActionStatus}" />
|
||||
<ProgressBar Grid.Column="1" IsIndeterminate="True"
|
||||
IsVisible="{Binding IsBusy}"
|
||||
Width="120"/>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:d="http://github.com/avaloniaui/avalonia"
|
||||
xmlns:vm="using:PostIt.ViewModels"
|
||||
xmlns:controls="using:PostIt.Controls"
|
||||
xmlns:postitControls="using:PostIt.Controls"
|
||||
x:Class="PostIt.Views.SignaturePage"
|
||||
x:DataType="vm:SignaturePageViewModel"
|
||||
HorizontalAlignment="Stretch"
|
||||
|
|
@ -59,10 +60,8 @@
|
|||
<Button Content="Capturer" Command="{Binding CaptureAsync}" />
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Grid.Row="3"
|
||||
Text="{Binding StatusMessage}"
|
||||
Foreground="Gray"
|
||||
TextWrapping="Wrap" />
|
||||
<postitControls:StatusBar Grid.Row="3"
|
||||
DataContext="{Binding ActionStatus}" />
|
||||
|
||||
<TextBlock Grid.Row="4"
|
||||
FontSize="11"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue