smartpanel : add time stamp
- shows last call date in the smartpanel.
- shows "more user friendly", callstatus in smartpanel.
- store last call date in contacts.json.
- edit call button xaml.
Change-Id: I2caa9ddb9d45b5be54a456b67ff535d0c85a4e80
Tuleap: #790
diff --git a/SmartPanel.xaml b/SmartPanel.xaml
index c1a1635..1396381 100644
--- a/SmartPanel.xaml
+++ b/SmartPanel.xaml
@@ -38,6 +38,7 @@
<views:CollapseEmptyString x:Key="_CollapseEmptyString_" />
<views:ContactStatusNotification x:Key="_ContactStatusNotification_" />
<views:boolToVisibility x:Key="_boolToVisibility_" />
+ <views:CallStatusToSpinnerVisibility x:Key="_CallStatusToSpinnerVisibility_" />
<!-- template for contacts. -->
<DataTemplate x:Key="ContactTemplate"
@@ -228,27 +229,39 @@
<Grid Grid.Column="1">
<Grid.RowDefinitions>
- <RowDefinition Height="30"/>
+ <RowDefinition Height="40"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<!-- name of the contact. -->
- <TextBlock x:Name="_contactName_"
- Grid.Row="0"
- Text="{x:Bind _contact._name, Mode=OneWay}"
- TextTrimming="CharacterEllipsis">
- </TextBlock>
+ <StackPanel Grid.Row="0">
+ <TextBlock x:Name="_contactName_"
+ Text="{x:Bind _contact._name, Mode=OneWay}"
+ TextTrimming="CharacterEllipsis">
+ </TextBlock>
+ <StackPanel Orientation="Horizontal">
+ <TextBlock x:Name="_contactLastTime_"
+ FontStyle="Italic"
+ Foreground="#333333"
+ FontSize="10"
+ Text="{x:Bind _contact._lastTime, Mode=OneWay}"/>
+ <ProgressBar Foreground="#333333"
+ Width="100"
+ Visibility="{x:Bind _callStatus, Converter={StaticResource _CallStatusToSpinnerVisibility_}, Mode=OneWay}"
+ IsIndeterminate="True"/>
+ </StackPanel>
+ </StackPanel>
<!-- call button. -->
+ <!-- Style="{StaticResource roundButtonTemplate}" old style, keep it until refacto -->
<Button Grid.Row="0"
Visibility="{x:Bind _isCallable, Converter={StaticResource _boolToVisibility_}, Mode=OneWay}"
Click="_callContact__Click"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
- Margin="10,0"
- Style="{StaticResource roundButtonTemplate}"
+ Style="{StaticResource ButtonStyleForCallBar}"
FontFamily="Segoe MDL2 Assets"
Content="">
<Button.RenderTransform>
- <TranslateTransform X="90" Y="25"/>
+ <TranslateTransform X="0" Y="18"/>
</Button.RenderTransform>
</Button>
</Grid>
@@ -263,13 +276,14 @@
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
- <TextBlock x:Name="_CallStatus_"
+ <!-- KEEP _CallStatus_ FOR DEBUG -->
+ <!--<TextBlock x:Name="_CallStatus_"
Grid.Row="0"
Foreground="White"
Text="{x:Bind _callStatus, Mode=OneWay}"
Visibility="{x:Bind _callStatus, Converter={StaticResource _HasAnActiveCall_}, Mode=OneWay}"
HorizontalAlignment="Center">
- </TextBlock>
+ </TextBlock>-->
<StackPanel Orientation="Horizontal"
Visibility="Visible"
Grid.Row="1"