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