Added no subject handler (#451)
* Added no subject handler changed text trimming for address to CharacterEllipsis * Make email subject selectable.
This commit is contained in:
@@ -611,6 +611,6 @@
|
|||||||
"TitleBarServerDisconnectedButton_Title": "no connection",
|
"TitleBarServerDisconnectedButton_Title": "no connection",
|
||||||
"TitleBarServerDisconnectedButton_Description": "Wino is disconnected from the network. Click reconnect to restore connection.",
|
"TitleBarServerDisconnectedButton_Description": "Wino is disconnected from the network. Click reconnect to restore connection.",
|
||||||
"TitleBarServerReconnectButton_Title": "reconnect",
|
"TitleBarServerReconnectButton_Title": "reconnect",
|
||||||
"TitleBarServerReconnectingButton_Title": "connecting"
|
"TitleBarServerReconnectingButton_Title": "connecting",
|
||||||
|
"MailItemNoSubject": "No subject"
|
||||||
}
|
}
|
||||||
|
|||||||
5
Wino.Core.Domain/Translator.Designer.cs
generated
5
Wino.Core.Domain/Translator.Designer.cs
generated
@@ -3082,5 +3082,10 @@ namespace Wino.Core.Domain
|
|||||||
/// connecting
|
/// connecting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string TitleBarServerReconnectingButton_Title => Resources.GetTranslatedString(@"TitleBarServerReconnectingButton_Title");
|
public static string TitleBarServerReconnectingButton_Title => Resources.GetTranslatedString(@"TitleBarServerReconnectingButton_Title");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// No subject
|
||||||
|
/// </summary>
|
||||||
|
public static string MailItemNoSubject => Resources.GetTranslatedString(@"MailItemNoSubject");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
x:Name="SenderTextFromAddress"
|
x:Name="SenderTextFromAddress"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Text="{x:Bind MailItem.FromAddress}"
|
Text="{x:Bind MailItem.FromAddress}"
|
||||||
TextTrimming="WordEllipsis"
|
TextTrimming="CharacterEllipsis"
|
||||||
Visibility="{x:Bind helpers:XamlHelpers.StringToVisibilityReversedConverter(MailItem.FromName)}" />
|
Visibility="{x:Bind helpers:XamlHelpers.StringToVisibilityReversedConverter(MailItem.FromName)}" />
|
||||||
|
|
||||||
<!-- Hover button -->
|
<!-- Hover button -->
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
x:Name="TitleText"
|
x:Name="TitleText"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
MaxLines="1"
|
MaxLines="1"
|
||||||
Text="{x:Bind MailItem.Subject}"
|
Text="{x:Bind helpers:XamlHelpers.GetMailItemSubject(MailItem.Subject)}"
|
||||||
TextTrimming="CharacterEllipsis" />
|
TextTrimming="CharacterEllipsis" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ namespace Wino.Helpers
|
|||||||
return prefer24HourTime ? localTime.ToString(TwentyFourHourTimeFormat) : localTime.ToString(TwelveHourTimeFormat);
|
return prefer24HourTime ? localTime.ToString(TwentyFourHourTimeFormat) : localTime.ToString(TwelveHourTimeFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static string GetMailItemSubject(string subject) => string.IsNullOrWhiteSpace(subject) ? $"({Translator.MailItemNoSubject})" : subject;
|
||||||
public static string GetCreationDateString(DateTime date, bool prefer24HourTime)
|
public static string GetCreationDateString(DateTime date, bool prefer24HourTime)
|
||||||
{
|
{
|
||||||
var localTime = date.ToLocalTime();
|
var localTime = date.ToLocalTime();
|
||||||
|
|||||||
@@ -179,7 +179,8 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="18"
|
FontSize="18"
|
||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
Text="{x:Bind ViewModel.Subject, Mode=OneWay}"
|
IsTextSelectionEnabled="True"
|
||||||
|
Text="{x:Bind helpers:XamlHelpers.GetMailItemSubject( ViewModel.Subject), Mode=OneWay}"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
|
|
||||||
<HyperlinkButton
|
<HyperlinkButton
|
||||||
|
|||||||
Reference in New Issue
Block a user