beb3bf9d1d
* feat: add S/MIME certificate management - Introduced `ISmimeCertificateService` interface for managing S/MIME certificates. - Implemented `SmimeCertificateService` class to handle certificate operations. - Updated `WinoPage` enum to include `SignatureAndEncryptionPage`. - Added resource entries in `resources.json` for S/MIME related messages. - Created `SignatureAndEncryptionPage` view and logic for user interaction. - Modified configuration files to integrate the new service and page. - Updated project files to include necessary dependencies for certificate management. * refactor(SmimeCertificateService): ♻️ Use constant for certificate name Refactored the `SmimeCertificateService` to replace the hardcoded string "Wino Mail Certificate" with a constant `CertificateFriendlyName`. This change enhances code maintainability by centralizing the definition of the certificate's friendly name. • Introduced a constant for the certificate's friendly name. • Updated the certificate retrieval and import logic to use the new constant. * feat(alias): ✨ Add S/Mime certificate selection for every alias Added new properties and methods in `MailAccountAlias` to manage signing and encryption certificates, including their thumbprints. This enhancement allows for better handling of S/Mime certificates within the application. • Introduced new properties for signing and encryption certificates. • Updated `resources.json` with new translations for S/Mime certificates. • Enhanced `AliasManagementPageViewModel` to include a dependency on the S/Mime certificate service and updated alias loading methods. • Modified `AliasManagementPage.xaml` to include ComboBox controls for selecting certificates. • Implemented methods in `AliasManagementPage.xaml.cs` to handle certificate selection from dropdowns. This change improves the user experience by allowing users to select and manage their S/Mime certificates directly within the alias management interface. * feat(mail): ✨ Add S/MIME support and file picker updates Enhanced the `MailRenderModel` class by adding a new property `IsSmimeSigned` to indicate if an email is S/MIME signed. The constructor has been updated to accept `MailRenderingOptions`. Updated the file selection logic in `DialogServiceBase` to replace the `FolderPicker` with a `FileSavePicker`, streamlining the process of saving files. Removed unnecessary commented code and added logic to handle file extensions. In `MailRenderingPageViewModel`, a new property `IsSmimeSigned` reflects the S/MIME status of the current render model, along with a new method `ShowSmimeCertificateInfoAsync` to display S/MIME certificate details. Added a `HyperlinkButton` in `MailRenderingPage.xaml` to indicate S/MIME status, which is only visible for signed emails, providing a tooltip and command for more information. In `MimeFileService`, implemented logic to detect S/MIME signatures in messages and exclude S/MIME signature parts from attachments. * refactor(viewmodel): ♻️ Replace dialog service messages Refactored the `SignatureAndEncryptionPageViewModel.cs` to replace calls to `_dialogService.ShowMessageAsync` with `_dialogService.InfoBarMessage`. This change improves the handling of success messages during certificate import and removal processes. * feat(mail): ✨ Add S/MIME encryption indicator Implemented support for S/MIME email handling in the MailRenderingPageViewModel. This includes the addition of a new property to check if an email is encrypted and updates to methods for displaying S/MIME certificate information. A new column was added in the MailRenderingPage.xaml to indicate if an email is encrypted, along with updated tooltips and commands. The MimeFileService was also modified to detect S/MIME encryption and to exclude S/MIME signature certificates during attachment processing. * fix: Added missing property * feat: Added S/Mime decryption and signing verification and improvements * i18n(resources): 🌐 Add S/MIME translation strings Added new translation strings for S/MIME functionalities in `resources.json`, including messages for signatures and certificates in both English and Italian. The code has been updated to utilize these new translation strings, enhancing the application's internationalization. Updated `MailRenderingPageViewModel.cs` to use the new translation strings for signature and certificate messages, improving code readability and consistency with translations. Additionally, the tooltips for S/MIME signing and encryption buttons in `MailRenderingPage.xaml` have been updated to use the new translation strings, enhancing the user experience for Italian-speaking users. * fix: Extract body from MultipartSigned message * feat(smime): ✨ Enhance S/MIME certificate handling Updated the `SmimeCertificateService` to improve the loading of PKCS12 certificate collections by adding `X509KeyStorageFlags.DefaultKeySet` and `X509KeyStorageFlags.Exportable` for better key management. In `ComposePageViewModel`, imported necessary namespaces for S/MIME certificate handling and added a new dependency for `ISmimeCertificateService`. Implemented logic in `OpenAttachmentAsync` to load alias certificates and manage message signing and encryption based on user-selected certificates. This change enhances the security and flexibility of email handling within the application. * feat: Replaced Smime encryption certificate combobox with checkbox Cert selection is useless for encryption * feat: Added S/Mime togglebuttons when composing an email * i18n(translations): 🌐 Add new composer translations Added new translation strings for composer features, including themes, text formatting, and S/MIME signing and encryption options. Updated button labels to utilize these new strings, enhancing the application's internationalization. Additionally, removed an obsolete string related to S/MIME certificate file information. * Example for relay command and fix settings pages runtime error * refactor(viewmodel): ♻️ Update certificate import/export commands Refactored the certificate import and export commands in the `SignatureAndEncryptionPageViewModel`. Changed methods from `async void` to `async Task` for better error handling and tracking of asynchronous operations. Added `[RelayCommand]` attributes to improve adherence to the MVVM pattern. Updated the XAML file to bind buttons directly to the new command methods, removing the need for event handlers. This enhances separation of concerns and simplifies the code. Removed obsolete event handlers from the code-behind file, streamlining the implementation. * fix: export folderPath parameter contains file name * fix: QRESYNC initial modseq should be 1 (#734) * Fix typo in reorder accounts dialog (#754) * fix: Missing commas in translations files * fix: merge issues * Fix mege conflicts. * Some more conflict fixes. * Fixing context. * Fixing saving file with suggested file name. --------- Co-authored-by: Aleh Khantsevich <aleh.khantsevich@gmail.com> Co-authored-by: Konstantin Shkel <null+github@pcho.la> Co-authored-by: Cas Cornelissen <cas.cornelissen@onefinity.io> Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
762 lines
46 KiB
XML
762 lines
46 KiB
XML
<abstract:ComposePageAbstract
|
|
x:Class="Wino.Views.ComposePage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:abstract="using:Wino.Views.Abstract"
|
|
xmlns:controls="using:Wino.Controls"
|
|
xmlns:controls1="using:Wino.Mail.Controls"
|
|
xmlns:coreControls="using:Wino.Mail.WinUI.Controls"
|
|
xmlns:customcontrols="using:Wino.Mail.WinUI.Controls.CustomControls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:data="using:Wino.Mail.ViewModels.Data"
|
|
xmlns:domain="using:Wino.Core.Domain"
|
|
xmlns:entities="using:Wino.Core.Domain.Entities.Shared"
|
|
xmlns:helpers="using:Wino.Helpers"
|
|
xmlns:mail="using:Wino.Core.Domain.Entities.Mail"
|
|
xmlns:mailkit="using:MimeKit"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
|
xmlns:reader="using:Wino.Core.Domain.Models.Reader"
|
|
xmlns:toolkit="using:CommunityToolkit.WinUI.Controls"
|
|
xmlns:ui="using:CommunityToolkit.WinUI"
|
|
x:Name="root"
|
|
d:Background="White"
|
|
Loaded="ComposerLoaded"
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
|
<DataTemplate x:Key="TokenBoxTemplate" x:DataType="entities:AccountContact">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip Content="{x:Bind Address}" />
|
|
</ToolTipService.ToolTip>
|
|
|
|
<!-- TODO: Display contact info. -->
|
|
<!--<Grid.ContextFlyout>
|
|
<MenuFlyout Placement="RightEdgeAlignedBottom">
|
|
<MenuFlyoutItem Text="{x:Bind domain:Translator.ViewContactDetails}" />
|
|
</MenuFlyout>
|
|
</Grid.ContextFlyout>-->
|
|
|
|
<Viewbox Width="24">
|
|
<controls:ImagePreviewControl
|
|
FromAddress="{x:Bind Address}"
|
|
FromName="{x:Bind Name}"
|
|
SenderContactPicture="{x:Bind Base64ContactPicture}" />
|
|
</Viewbox>
|
|
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Margin="6,0,8,0"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind Name}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
<DataTemplate x:Key="SuggestionBoxTemplate" x:DataType="entities:AccountContact">
|
|
<Grid Margin="0,12" ColumnSpacing="6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<controls:ImagePreviewControl
|
|
FromAddress="{x:Bind Address}"
|
|
FromName="{x:Bind Name}"
|
|
SenderContactPicture="{x:Bind Base64ContactPicture}" />
|
|
<TextBlock Grid.Column="1">
|
|
<Run FontWeight="SemiBold" Text="{x:Bind Name}" /><LineBreak /><Run Text="{x:Bind Address}" />
|
|
</TextBlock>
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- Attachment Template -->
|
|
<!-- Margin -8 0 is used to remove the padding from the ListViewItem -->
|
|
<DataTemplate x:Key="ComposerFileAttachmentTemplate" x:DataType="data:MailAttachmentViewModel">
|
|
<Grid
|
|
Height="50"
|
|
Margin="-8,0,0,0"
|
|
Padding="0"
|
|
Background="Transparent"
|
|
ColumnSpacing="3">
|
|
<Grid.ContextFlyout>
|
|
<MenuFlyout>
|
|
<MenuFlyoutItem
|
|
Click="OpenAttachment_Click"
|
|
CommandParameter="{x:Bind}"
|
|
Text="{x:Bind domain:Translator.Buttons_Open}" />
|
|
<MenuFlyoutItem
|
|
Click="SaveAttachment_Click"
|
|
CommandParameter="{x:Bind}"
|
|
Text="{x:Bind domain:Translator.Buttons_Save}" />
|
|
</MenuFlyout>
|
|
</Grid.ContextFlyout>
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip Content="{x:Bind FileName}" />
|
|
</ToolTipService.ToolTip>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="36" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Icon -->
|
|
<ContentControl
|
|
VerticalAlignment="Center"
|
|
Content="{x:Bind AttachmentType}"
|
|
ContentTemplateSelector="{StaticResource FileTypeIconSelector}" />
|
|
|
|
<!-- Name && Size -->
|
|
<Grid
|
|
Grid.Column="1"
|
|
MaxWidth="200"
|
|
VerticalAlignment="Center">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
FontSize="13"
|
|
MaxLines="2"
|
|
Text="{x:Bind FileName}"
|
|
TextTrimming="CharacterEllipsis" />
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
FontSize="11"
|
|
Foreground="Gray"
|
|
Text="{x:Bind ReadableSize}" />
|
|
</Grid>
|
|
|
|
<Button
|
|
Grid.Column="2"
|
|
Margin="0,4,-8,4"
|
|
VerticalAlignment="Stretch"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Click="RemoveAttachment_Click"
|
|
CommandParameter="{x:Bind}">
|
|
<SymbolIcon
|
|
Grid.Column="2"
|
|
VerticalAlignment="Center"
|
|
Foreground="{StaticResource DeleteBrush}"
|
|
Symbol="Delete" />
|
|
</Button>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
</Page.Resources>
|
|
|
|
<Grid
|
|
AllowDrop="True"
|
|
DragLeave="OnComposeGridDragLeave"
|
|
DragOver="OnComposeGridDragOver"
|
|
RowSpacing="7">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border
|
|
Background="{ThemeResource WinoContentZoneBackgroud}"
|
|
BorderBrush="{StaticResource CardStrokeColorDefaultBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="7">
|
|
<Grid>
|
|
<Grid.Resources>
|
|
<SolidColorBrush x:Key="AutoSuggestBoxBorderThemeBrush">Transparent</SolidColorBrush>
|
|
</Grid.Resources>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Format -->
|
|
<toolkit:TabbedCommandBar>
|
|
<toolkit:TabbedCommandBar.Resources>
|
|
<SolidColorBrush x:Key="TabContentContentBorderBackground" Color="Transparent" />
|
|
<SolidColorBrush x:Key="TabContentContentBorderBorderBrush" Color="Transparent" />
|
|
<Thickness x:Key="TabContentBorderBorderThickness">0</Thickness>
|
|
</toolkit:TabbedCommandBar.Resources>
|
|
<toolkit:TabbedCommandBar.PaneCustomContent>
|
|
<toolkit:TabbedCommandBarItem
|
|
CommandAlignment="Right"
|
|
IsDynamicOverflowEnabled="True"
|
|
OverflowButtonAlignment="Left">
|
|
<AppBarButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
Click="{x:Bind WebViewEditor.ToggleEditorTheme}"
|
|
LabelPosition="Collapsed"
|
|
ToolTipService.ToolTip="{x:Bind domain:Translator.Composer_LightTheme}"
|
|
Visibility="{x:Bind WebViewEditor.IsEditorDarkMode, Mode=OneWay}">
|
|
<AppBarButton.Icon>
|
|
<coreControls:WinoFontIcon Icon="LightEditor" />
|
|
</AppBarButton.Icon>
|
|
</AppBarButton>
|
|
|
|
<AppBarButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
Click="{x:Bind WebViewEditor.ToggleEditorTheme}"
|
|
LabelPosition="Collapsed"
|
|
ToolTipService.ToolTip="{x:Bind domain:Translator.Composer_DarkTheme}"
|
|
Visibility="{x:Bind WebViewEditor.IsEditorDarkMode, Mode=OneWay, Converter={StaticResource ReverseBooleanToVisibilityConverter}}">
|
|
<AppBarButton.Icon>
|
|
<coreControls:WinoFontIcon Icon="DarkEditor" />
|
|
</AppBarButton.Icon>
|
|
</AppBarButton>
|
|
|
|
<AppBarButton Command="{x:Bind ViewModel.DiscardCommand}" Label="{x:Bind domain:Translator.Buttons_Discard}">
|
|
<AppBarButton.Icon>
|
|
<coreControls:WinoFontIcon Icon="Delete" />
|
|
</AppBarButton.Icon>
|
|
</AppBarButton>
|
|
<AppBarButton Command="{x:Bind ViewModel.SendCommand}" Label="{x:Bind domain:Translator.Buttons_Send}">
|
|
<AppBarButton.Icon>
|
|
<coreControls:WinoFontIcon Icon="Send" />
|
|
</AppBarButton.Icon>
|
|
</AppBarButton>
|
|
</toolkit:TabbedCommandBarItem>
|
|
</toolkit:TabbedCommandBar.PaneCustomContent>
|
|
<toolkit:TabbedCommandBar.MenuItems>
|
|
<toolkit:TabbedCommandBarItem DefaultLabelPosition="Collapsed" Header="{x:Bind domain:Translator.EditorToolbarOption_Format}">
|
|
<AppBarToggleButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
IsChecked="{x:Bind WebViewEditor.IsEditorBold, Mode=TwoWay}"
|
|
Label="{x:Bind domain:Translator.Composer_Bold}">
|
|
<AppBarToggleButton.Icon>
|
|
<PathIcon Data="{StaticResource BoldPathIcon}" />
|
|
</AppBarToggleButton.Icon>
|
|
</AppBarToggleButton>
|
|
<AppBarToggleButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
IsChecked="{x:Bind WebViewEditor.IsEditorItalic, Mode=TwoWay}"
|
|
Label="{x:Bind domain:Translator.Composer_Italic}">
|
|
<AppBarToggleButton.Icon>
|
|
<PathIcon Data="{StaticResource ItalicPathIcon}" />
|
|
</AppBarToggleButton.Icon>
|
|
</AppBarToggleButton>
|
|
<AppBarToggleButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
IsChecked="{x:Bind WebViewEditor.IsEditorUnderline, Mode=TwoWay}"
|
|
Label="{x:Bind domain:Translator.Composer_Underline}">
|
|
<AppBarToggleButton.Icon>
|
|
<PathIcon Data="{StaticResource UnderlinePathIcon}" />
|
|
</AppBarToggleButton.Icon>
|
|
</AppBarToggleButton>
|
|
<AppBarToggleButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
IsChecked="{x:Bind WebViewEditor.IsEditorStrikethrough, Mode=TwoWay}"
|
|
Label="{x:Bind domain:Translator.Composer_Stroke}">
|
|
<AppBarToggleButton.Icon>
|
|
<PathIcon Data="{StaticResource StrikePathIcon}" />
|
|
</AppBarToggleButton.Icon>
|
|
</AppBarToggleButton>
|
|
|
|
<AppBarSeparator />
|
|
|
|
<AppBarToggleButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
IsChecked="{x:Bind WebViewEditor.IsEditorUl, Mode=TwoWay}"
|
|
Label="{x:Bind domain:Translator.Composer_BulletList}">
|
|
<AppBarToggleButton.Icon>
|
|
<PathIcon Data="{StaticResource BulletedListPathIcon}" />
|
|
</AppBarToggleButton.Icon>
|
|
</AppBarToggleButton>
|
|
|
|
<AppBarToggleButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
IsChecked="{x:Bind WebViewEditor.IsEditorOl, Mode=TwoWay}"
|
|
Label="{x:Bind domain:Translator.Composer_OrderedList}">
|
|
<AppBarToggleButton.Icon>
|
|
<PathIcon Data="{StaticResource OrderedListPathIcon}" />
|
|
</AppBarToggleButton.Icon>
|
|
</AppBarToggleButton>
|
|
|
|
<AppBarSeparator />
|
|
|
|
<AppBarButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
Click="{x:Bind WebViewEditor.EditorOutdentAsync}"
|
|
IsEnabled="{x:Bind WebViewEditor.IsEditorOutdentEnabled, Mode=OneWay}"
|
|
Label="{x:Bind domain:Translator.Composer_Outdent}">
|
|
<AppBarButton.Content>
|
|
<Viewbox Width="16">
|
|
<PathIcon Data="{StaticResource DecreaseIndentPathIcon}" />
|
|
</Viewbox>
|
|
</AppBarButton.Content>
|
|
</AppBarButton>
|
|
|
|
<AppBarButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
Click="{x:Bind WebViewEditor.EditorIndentAsync}"
|
|
IsEnabled="{x:Bind WebViewEditor.IsEditorIndentEnabled, Mode=OneWay}"
|
|
Label="{x:Bind domain:Translator.Composer_Indent}">
|
|
<AppBarButton.Content>
|
|
<Viewbox Width="16">
|
|
<PathIcon Data="{StaticResource IncreaseIndentPathIcon}" />
|
|
</Viewbox>
|
|
</AppBarButton.Content>
|
|
</AppBarButton>
|
|
|
|
<AppBarElementContainer
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<ComboBox
|
|
x:Name="AlignmentListView"
|
|
VerticalAlignment="Center"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
SelectedIndex="{x:Bind WebViewEditor.EditorAlignmentSelectedIndex, Mode=TwoWay}">
|
|
<ComboBoxItem IsSelected="True" Tag="left">
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<Viewbox Width="16">
|
|
<PathIcon Data="{StaticResource AlignLeftPathIcon}" />
|
|
</Viewbox>
|
|
<TextBlock VerticalAlignment="Center" Text="{x:Bind domain:Translator.Left}" />
|
|
</StackPanel>
|
|
</ComboBoxItem>
|
|
|
|
<ComboBoxItem Tag="center">
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<Viewbox Width="16">
|
|
<PathIcon Data="{StaticResource AlignCenterPathIcon}" />
|
|
</Viewbox>
|
|
<TextBlock VerticalAlignment="Center" Text="{x:Bind domain:Translator.Center}" />
|
|
</StackPanel>
|
|
</ComboBoxItem>
|
|
|
|
<ComboBoxItem Tag="right">
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<Viewbox Width="16">
|
|
<PathIcon Data="{StaticResource AlignRightPathIcon}" />
|
|
</Viewbox>
|
|
<TextBlock VerticalAlignment="Center" Text="{x:Bind domain:Translator.Right}" />
|
|
</StackPanel>
|
|
</ComboBoxItem>
|
|
|
|
<ComboBoxItem Tag="justify">
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<Viewbox Width="16">
|
|
<PathIcon Data="{StaticResource AlignJustifyPathIcon}" />
|
|
</Viewbox>
|
|
<TextBlock VerticalAlignment="Center" Text="{x:Bind domain:Translator.Justify}" />
|
|
</StackPanel>
|
|
</ComboBoxItem>
|
|
</ComboBox>
|
|
</AppBarElementContainer>
|
|
|
|
<AppBarSeparator />
|
|
|
|
<AppBarToggleButton
|
|
Width="Auto"
|
|
MinWidth="40"
|
|
IsChecked="{x:Bind WebViewEditor.IsEditorWebViewEditor, Mode=TwoWay}"
|
|
Label="{x:Bind domain:Translator.EditorTooltip_WebViewEditor}"
|
|
ToolTipService.ToolTip="{x:Bind domain:Translator.EditorTooltip_WebViewEditor}">
|
|
<AppBarToggleButton.Icon>
|
|
<PathIcon Data="{StaticResource WebviewToolBarPathIcon}" />
|
|
</AppBarToggleButton.Icon>
|
|
</AppBarToggleButton>
|
|
</toolkit:TabbedCommandBarItem>
|
|
|
|
<!-- Insert -->
|
|
<toolkit:TabbedCommandBarItem Header="{x:Bind domain:Translator.EditorToolbarOption_Insert}">
|
|
<AppBarButton
|
|
x:Name="FilesButton"
|
|
Command="{x:Bind ViewModel.AttachFilesCommand}"
|
|
Label="{x:Bind domain:Translator.Files}">
|
|
<AppBarButton.Icon>
|
|
<PathIcon Data="{StaticResource AttachPathIcon}" />
|
|
</AppBarButton.Icon>
|
|
</AppBarButton>
|
|
|
|
<AppBarButton Click="{x:Bind WebViewEditor.ShowImagePicker}" Label="{x:Bind domain:Translator.Photos}">
|
|
<AppBarButton.Icon>
|
|
<PathIcon Data="{StaticResource AddPhotoPathIcon}" />
|
|
</AppBarButton.Icon>
|
|
</AppBarButton>
|
|
|
|
<AppBarButton Click="{x:Bind WebViewEditor.ShowEmojiPicker}" Label="{x:Bind domain:Translator.Emoji}">
|
|
<AppBarButton.Icon>
|
|
<PathIcon Data="{StaticResource EmojiPathIcon}" />
|
|
</AppBarButton.Icon>
|
|
</AppBarButton>
|
|
</toolkit:TabbedCommandBarItem>
|
|
|
|
<!-- Options -->
|
|
<toolkit:TabbedCommandBarItem Header="{x:Bind domain:Translator.EditorToolbarOption_Options}">
|
|
<AppBarElementContainer>
|
|
<ToggleSplitButton x:Name="ImportanceSplitButton" IsChecked="{x:Bind ViewModel.IsImportanceSelected, Mode=TwoWay}">
|
|
<Viewbox Width="16" Height="16">
|
|
<SymbolIcon x:Name="ImportanceSplitButtonContent" Symbol="Important" />
|
|
</Viewbox>
|
|
<ToggleSplitButton.Flyout>
|
|
<Flyout x:Name="ImportanceFlyout" Placement="Bottom">
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel.Resources>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Padding" Value="4" />
|
|
<Setter Property="MinWidth" Value="0" />
|
|
<Setter Property="MinHeight" Value="0" />
|
|
<Setter Property="Margin" Value="6" />
|
|
<Setter Property="CornerRadius" Value="{StaticResource ControlCornerRadius}" />
|
|
</Style>
|
|
</StackPanel.Resources>
|
|
<Button Click="ImportanceClicked">
|
|
<Button.Tag>
|
|
<mailkit:MessageImportance>High</mailkit:MessageImportance>
|
|
</Button.Tag>
|
|
<SymbolIcon Symbol="Important" />
|
|
</Button>
|
|
<Button Click="ImportanceClicked">
|
|
<Button.Tag>
|
|
<mailkit:MessageImportance>Low</mailkit:MessageImportance>
|
|
</Button.Tag>
|
|
<SymbolIcon Symbol="Priority" />
|
|
</Button>
|
|
</StackPanel>
|
|
</Flyout>
|
|
</ToggleSplitButton.Flyout>
|
|
</ToggleSplitButton>
|
|
</AppBarElementContainer>
|
|
<AppBarElementContainer>
|
|
<muxc:ToggleSplitButton x:Name="SignatureToggleButton"
|
|
Margin="8,0,0,0"
|
|
IsChecked="{x:Bind ViewModel.IsSmimeSignatureEnabled, Mode=TwoWay}"
|
|
ToolTipService.ToolTip="{x:Bind domain:Translator.Composer_EnableSmimeSignature}"
|
|
IsEnabled="{x:Bind ViewModel.AreCertificatesAvailable, Mode=OneWay}">
|
|
<muxc:ToggleSplitButton.Content>
|
|
<Viewbox Width="16" Height="16" Margin="0,0,4,0">
|
|
<PathIcon
|
|
Data="M15 18c.835.629 1.875 1.001 3 1.001a4.978 4.978 0 0 0 3-.999v3.246a.75.75 0 0 1-1.09.67l-.09-.055L18 20.591l-1.82 1.272a.75.75 0 0 1-1.172-.51l-.007-.105L15 18.001Zm4.25-14.996a2.75 2.75 0 0 1 2.745 2.582l.005.168.001 5.246a5.027 5.027 0 0 0-1.5-1.331L20.5 5.754a1.25 1.25 0 0 0-1.122-1.244l-.128-.006H4.75a1.25 1.25 0 0 0-1.244 1.122l-.006.128v9.5c0 .647.492 1.18 1.122 1.243l.128.007h8.92c.1.172.21.338.33.496v1.004H4.75a2.75 2.75 0 0 1-2.745-2.583L2 15.254v-9.5a2.75 2.75 0 0 1 2.582-2.745l.168-.005h14.5ZM18 10A4 4 0 1 1 18 18 4 4 0 0 1 18 10Zm-6.75 2.5a.75.75 0 0 1 .102 1.493L11.25 14h-4.5a.75.75 0 0 1-.102-1.493l.102-.007h4.5Zm6-5.5a.75.75 0 0 1 .102 1.493l-.102.007H6.75a.75.75 0 0 1-.102-1.493L6.75 7h10.5Z" />
|
|
</Viewbox>
|
|
</muxc:ToggleSplitButton.Content>
|
|
<muxc:ToggleSplitButton.Flyout>
|
|
<Flyout Placement="Bottom">
|
|
<ListView
|
|
ItemsSource="{x:Bind ViewModel.AvailableCertificates, Mode=OneWay}"
|
|
SelectedItem="{x:Bind ViewModel.SelectedSigningCertificate, Mode=TwoWay}"
|
|
Width="320">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate x:DataType="x509:X509Certificate2" xmlns:x509="using:System.Security.Cryptography.X509Certificates">
|
|
<StackPanel Orientation="Vertical" Padding="8,4">
|
|
<TextBlock Text="{x:Bind Subject}" FontWeight="SemiBold" />
|
|
<TextBlock Text="{x:Bind Issuer}" FontSize="12" />
|
|
<TextBlock>
|
|
<Run Text="{x:Bind domain:Translator.Composer_CertificateExpires}"/>
|
|
<Run Text="{x:Bind NotAfter, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</Flyout>
|
|
</muxc:ToggleSplitButton.Flyout>
|
|
</muxc:ToggleSplitButton>
|
|
</AppBarElementContainer>
|
|
<AppBarElementContainer>
|
|
<ToggleButton x:Name="EncryptionToggleButton"
|
|
Margin="8,0,0,0"
|
|
IsChecked="{x:Bind ViewModel.IsSmimeEncryptionEnabled, Mode=TwoWay}"
|
|
ToolTipService.ToolTip="{x:Bind domain:Translator.Composer_EnableSmimeEncryption}">
|
|
<ToggleButton.Content>
|
|
<Viewbox Width="16" Height="16" Margin="0,0,4,0">
|
|
<PathIcon
|
|
Data="M12 2a4 4 0 0 1 4 4v2h1.75A2.25 2.25 0 0 1 20 10.25v9.5A2.25 2.25 0 0 1 17.75 22H6.25A2.25 2.25 0 0 1 4 19.75v-9.5A2.25 2.25 0 0 1 6.25 8H8V6a4 4 0 0 1 4-4Zm5.75 7.5H6.25a.75.75 0 0 0-.75.75v9.5c0 .414.336.75.75.75h11.5a.75.75 0 0 0 .75-.75v-9.5a.75.75 0 0 0-.75-.75Zm-5.75 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0-10A2.5 2.5 0 0 0 9.5 6v2h5V6A2.5 2.5 0 0 0 12 3.5Z" />
|
|
</Viewbox>
|
|
</ToggleButton.Content>
|
|
</ToggleButton>
|
|
</AppBarElementContainer>
|
|
</toolkit:TabbedCommandBarItem>
|
|
</toolkit:TabbedCommandBar.MenuItems>
|
|
</toolkit:TabbedCommandBar>
|
|
|
|
<!-- Mime Info -->
|
|
<Grid
|
|
Grid.Row="1"
|
|
Padding="16,0,16,4"
|
|
ColumnSpacing="12"
|
|
RowSpacing="3">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- From -->
|
|
<TextBlock
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind domain:Translator.ComposerFrom}" />
|
|
|
|
<ComboBox
|
|
x:Name="AccountsComboBox"
|
|
Grid.Column="1"
|
|
IsEditable="False"
|
|
ItemsSource="{x:Bind ViewModel.AvailableAliases, Mode=OneWay}"
|
|
SelectedItem="{x:Bind ViewModel.SelectedAlias, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate x:DataType="mail:MailAccountAlias">
|
|
<TextBlock Text="{x:Bind AliasAddress}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
|
|
<!-- To -->
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Margin="0,4,0,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind domain:Translator.ComposerTo}" />
|
|
|
|
<Grid
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<toolkit:TokenizingTextBox
|
|
x:Name="ToBox"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
BorderThickness="0"
|
|
ItemsSource="{x:Bind ViewModel.ToItems, Mode=OneTime}"
|
|
LostFocus="AddressBoxLostFocus"
|
|
PlaceholderText="{x:Bind domain:Translator.ComposerToPlaceholder}"
|
|
SuggestedItemTemplate="{StaticResource SuggestionBoxTemplate}"
|
|
Tag="ToBox"
|
|
TokenDelimiter=";"
|
|
TokenItemAdding="TokenItemAdding"
|
|
TokenItemTemplate="{StaticResource TokenBoxTemplate}" />
|
|
|
|
<Button
|
|
x:Name="CCBCCShowButton"
|
|
Grid.Column="1"
|
|
Margin="6,6,0,0"
|
|
VerticalAlignment="Center"
|
|
Click="ShowCCBCCClicked"
|
|
GotFocus="CCBBCGotFocus"
|
|
Visibility="{x:Bind helpers:XamlHelpers.ReverseBoolToVisibilityConverter(ViewModel.IsCCBCCVisible), Mode=OneWay}">
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
<PathIcon
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="F1 M 3.75 4.902344 C 3.75 4.225262 3.885091 3.588867 4.155273 2.993164 C 4.425456 2.397461 4.790039 1.878256 5.249023 1.435547 C 5.708008 0.99284 6.238606 0.642904 6.84082 0.385742 C 7.443034 0.128582 8.079427 0 8.75 0 C 9.420572 0 10.056966 0.128582 10.65918 0.385742 C 11.261393 0.642904 11.791992 0.99284 12.250977 1.435547 C 12.709961 1.878256 13.074544 2.397461 13.344727 2.993164 C 13.614908 3.588867 13.75 4.225262 13.75 4.902344 C 13.75 5.332031 13.707682 5.742188 13.623047 6.132812 C 13.538411 6.523438 13.395182 6.907553 13.193359 7.285156 C 12.307942 7.434896 11.484375 7.734375 10.722656 8.183594 C 11.295572 7.819012 11.735025 7.353517 12.041016 6.787109 C 12.347005 6.220704 12.5 5.598959 12.5 4.921875 C 12.5 4.414062 12.399088 3.937176 12.197266 3.491211 C 11.995442 3.045248 11.723633 2.65625 11.381836 2.324219 C 11.040039 1.992188 10.641275 1.730145 10.185547 1.538086 C 9.729817 1.346029 9.251302 1.25 8.75 1.25 C 8.229166 1.25 7.740885 1.347656 7.285156 1.542969 C 6.829427 1.738281 6.432292 2.005209 6.09375 2.34375 C 5.755208 2.682293 5.488281 3.079428 5.292969 3.535156 C 5.097656 3.990887 5 4.479167 5 5 C 5 5.501303 5.096028 5.979818 5.288086 6.435547 C 5.480143 6.891276 5.742188 7.290039 6.074219 7.631836 C 6.40625 7.973633 6.795247 8.245443 7.241211 8.447266 C 7.687174 8.649089 8.164062 8.75 8.671875 8.75 C 9.023438 8.75 9.360352 8.709311 9.682617 8.62793 C 10.004883 8.54655 10.322266 8.417969 10.634766 8.242188 C 9.873047 8.704428 9.222005 9.290365 8.681641 10 L 8.662109 10 C 8.011067 10 7.389323 9.868164 6.796875 9.604492 C 6.204427 9.34082 5.681966 8.984375 5.229492 8.535156 C 4.777018 8.085938 4.417317 7.565104 4.150391 6.972656 C 3.883463 6.380209 3.75 5.755209 3.75 5.097656 Z M 8.75 14.375 C 8.75 13.600261 8.898111 12.871094 9.194336 12.1875 C 9.49056 11.503906 9.892578 10.908203 10.400391 10.400391 C 10.908203 9.892578 11.503906 9.490561 12.1875 9.194336 C 12.871093 8.898112 13.60026 8.75 14.375 8.75 C 14.889322 8.75 15.385741 8.816732 15.864258 8.950195 C 16.342773 9.083659 16.790363 9.272461 17.207031 9.516602 C 17.623697 9.760742 18.004557 10.055339 18.349609 10.400391 C 18.69466 10.745443 18.989258 11.126303 19.233398 11.542969 C 19.477539 11.959636 19.66634 12.407227 19.799805 12.885742 C 19.933268 13.364258 20 13.860678 20 14.375 C 20 15.14974 19.851887 15.878906 19.555664 16.5625 C 19.259439 17.246094 18.857422 17.841797 18.349609 18.349609 C 17.841797 18.857422 17.246094 19.259439 16.5625 19.555664 C 15.878906 19.851889 15.149739 20 14.375 20 C 13.59375 20 12.861328 19.853516 12.177734 19.560547 C 11.494141 19.267578 10.898438 18.867188 10.390625 18.359375 C 9.882812 17.851562 9.482422 17.255859 9.189453 16.572266 C 8.896484 15.888672 8.75 15.15625 8.75 14.375 Z M 0 13.701172 C 0 13.375651 0.066732 13.064779 0.200195 12.768555 C 0.333659 12.472331 0.512695 12.211914 0.737305 11.987305 C 0.961914 11.762695 1.222331 11.583659 1.518555 11.450195 C 1.814779 11.316732 2.125651 11.25 2.451172 11.25 L 7.900391 11.25 C 7.809244 11.451823 7.722981 11.656901 7.641602 11.865234 C 7.560221 12.073568 7.490234 12.285156 7.431641 12.5 L 2.5 12.5 C 2.324219 12.5 2.161458 12.532553 2.011719 12.597656 C 1.861979 12.662761 1.730143 12.752279 1.616211 12.866211 C 1.502279 12.980144 1.41276 13.111979 1.347656 13.261719 C 1.282552 13.411459 1.25 13.574219 1.25 13.75 C 1.25 14.407553 1.359049 14.986979 1.577148 15.488281 C 1.795247 15.989584 2.091471 16.425781 2.46582 16.796875 C 2.840169 17.167969 3.273112 17.478842 3.764648 17.729492 C 4.256185 17.980143 4.777018 18.180338 5.327148 18.330078 C 5.877278 18.479818 6.438802 18.58724 7.011719 18.652344 C 7.584635 18.717447 8.138021 18.75 8.671875 18.75 C 8.847656 18.977865 9.033203 19.192709 9.228516 19.394531 C 9.423828 19.596354 9.635416 19.785156 9.863281 19.960938 C 9.674479 19.973959 9.488932 19.983725 9.306641 19.990234 C 9.124349 19.996744 8.938802 20 8.75 20 C 7.897135 20 7.042643 19.939779 6.186523 19.819336 C 5.330403 19.698893 4.511719 19.462891 3.730469 19.111328 C 3.157552 18.850912 2.641602 18.543295 2.182617 18.188477 C 1.723633 17.833658 1.333008 17.431641 1.010742 16.982422 C 0.688477 16.533203 0.439453 16.035156 0.263672 15.488281 C 0.087891 14.941406 0 14.345703 0 13.701172 Z M 15 15 L 16.875 15 C 17.04427 15 17.190754 14.938151 17.314453 14.814453 C 17.43815 14.690756 17.5 14.544271 17.5 14.375 C 17.5 14.205729 17.43815 14.059245 17.314453 13.935547 C 17.190754 13.81185 17.04427 13.75 16.875 13.75 L 15 13.75 L 15 11.875 C 14.999999 11.705729 14.93815 11.559245 14.814453 11.435547 C 14.690755 11.31185 14.544271 11.25 14.375 11.25 C 14.205729 11.25 14.059244 11.31185 13.935547 11.435547 C 13.811849 11.559245 13.75 11.705729 13.75 11.875 L 13.75 13.75 L 11.875 13.75 C 11.705729 13.75 11.559244 13.81185 11.435547 13.935547 C 11.311849 14.059245 11.25 14.205729 11.25 14.375 C 11.25 14.544271 11.311849 14.690756 11.435547 14.814453 C 11.559244 14.938151 11.705729 15 11.875 15 L 13.75 15 L 13.75 16.875 C 13.75 17.044271 13.811849 17.190756 13.935547 17.314453 C 14.059244 17.43815 14.205729 17.5 14.375 17.5 C 14.544271 17.5 14.690755 17.43815 14.814453 17.314453 C 14.93815 17.190756 14.999999 17.044271 15 16.875 Z " />
|
|
<TextBlock VerticalAlignment="Center" Text="{x:Bind domain:Translator.Composer_CcBcc}" />
|
|
</StackPanel>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<!-- CC BCC -->
|
|
<TextBlock
|
|
x:Name="CCTextBlock"
|
|
Grid.Row="2"
|
|
Margin="0,4,0,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="Cc: "
|
|
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}" />
|
|
|
|
<toolkit:TokenizingTextBox
|
|
x:Name="CCBox"
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
ItemsSource="{x:Bind ViewModel.CCItems, Mode=OneTime}"
|
|
LostFocus="AddressBoxLostFocus"
|
|
PlaceholderText="{x:Bind domain:Translator.ComposerToPlaceholder}"
|
|
SuggestedItemTemplate="{StaticResource SuggestionBoxTemplate}"
|
|
Tag="CCBox"
|
|
TokenDelimiter=";"
|
|
TokenItemAdding="TokenItemAdding"
|
|
TokenItemTemplate="{StaticResource TokenBoxTemplate}"
|
|
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}" />
|
|
|
|
<TextBlock
|
|
x:Name="BccTextBlock"
|
|
Grid.Row="3"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="Bcc: "
|
|
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}" />
|
|
|
|
<toolkit:TokenizingTextBox
|
|
x:Name="BccBox"
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
ItemsSource="{x:Bind ViewModel.BCCItems, Mode=OneTime}"
|
|
LostFocus="AddressBoxLostFocus"
|
|
PlaceholderText="{x:Bind domain:Translator.ComposerToPlaceholder}"
|
|
SuggestedItemTemplate="{StaticResource SuggestionBoxTemplate}"
|
|
Tag="BCCBox"
|
|
TokenDelimiter=";"
|
|
TokenItemAdding="TokenItemAdding"
|
|
TokenItemTemplate="{StaticResource TokenBoxTemplate}"
|
|
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}" />
|
|
|
|
<!-- Subject -->
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Margin="0,4,0,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind domain:Translator.ComposerSubject}" />
|
|
|
|
<TextBox
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
Margin="0,4,0,0"
|
|
BorderThickness="0"
|
|
Text="{x:Bind ViewModel.Subject, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
<!-- Attachments -->
|
|
<ListView
|
|
x:Name="AttachmentsListView"
|
|
Grid.Row="5"
|
|
Grid.ColumnSpan="2"
|
|
ui:ListViewExtensions.Command="{x:Bind ViewModel.OpenAttachmentCommand}"
|
|
x:Load="{x:Bind helpers:XamlHelpers.CountToBooleanConverter(ViewModel.IncludedAttachments.Count), Mode=OneWay}"
|
|
IsItemClickEnabled="True"
|
|
ItemTemplate="{StaticResource ComposerFileAttachmentTemplate}"
|
|
ItemsSource="{x:Bind ViewModel.IncludedAttachments, Mode=OneWay}"
|
|
SelectionMode="None">
|
|
<ListView.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<customcontrols:CustomWrapPanel />
|
|
</ItemsPanelTemplate>
|
|
</ListView.ItemsPanel>
|
|
</ListView>
|
|
</Grid>
|
|
|
|
<!-- Dropzone -->
|
|
<Grid
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
AllowDrop="True"
|
|
DragLeave="OnFileDropGridDragLeave"
|
|
DragOver="OnFileDropGridDragOver"
|
|
Drop="OnFileDropGridFileDropped"
|
|
Visibility="{x:Bind ViewModel.IsDraggingOverComposerGrid, Mode=OneWay}">
|
|
<Grid Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}" CornerRadius="9">
|
|
<Rectangle
|
|
x:Name="FilesDropZoneBorder"
|
|
Fill="Transparent"
|
|
Opacity="0.5"
|
|
RadiusX="9"
|
|
RadiusY="9"
|
|
Stroke="{ThemeResource TextFillColorPrimaryBrush}"
|
|
StrokeDashArray="3,4"
|
|
StrokeThickness="2" />
|
|
<TextBlock
|
|
x:Name="FilesDropZoneText"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontSize="20"
|
|
FontWeight="SemiBold"
|
|
Opacity="0.5"
|
|
Text="{x:Bind domain:Translator.ComposerAttachmentsDropZone_Message}" />
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
<Border
|
|
Grid.Row="1"
|
|
Background="{ThemeResource WinoContentZoneBackgroud}"
|
|
BorderBrush="{StaticResource CardStrokeColorDefaultBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="7">
|
|
<Grid Margin="1" CornerRadius="7">
|
|
<controls1:WebViewEditorControl x:Name="WebViewEditor" />
|
|
|
|
<!-- Dropzone for images -->
|
|
<Grid
|
|
AllowDrop="True"
|
|
DragEnter="OnImageDropGridDragEnter"
|
|
DragLeave="OnImageDropGridDragLeave"
|
|
Drop="OnImageDropGridImageDropped"
|
|
Visibility="{x:Bind ViewModel.IsDraggingOverComposerGrid, Mode=OneWay}">
|
|
<Grid Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}" CornerRadius="9">
|
|
<Rectangle
|
|
x:Name="ImagesDropZoneBorder"
|
|
Fill="Transparent"
|
|
Opacity="0.5"
|
|
RadiusX="9"
|
|
RadiusY="9"
|
|
Stroke="{ThemeResource TextFillColorPrimaryBrush}"
|
|
StrokeDashArray="3,4"
|
|
StrokeThickness="2" />
|
|
<TextBlock
|
|
x:Name="ImagesDropZoneText"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontSize="20"
|
|
FontWeight="SemiBold"
|
|
Opacity="0.5"
|
|
Text="{x:Bind domain:Translator.ComposerImagesDropZone_Message}" />
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="FilesDropZoneState">
|
|
<VisualState x:Name="FilesDropZoneHovered">
|
|
<VisualState.StateTriggers>
|
|
<StateTrigger IsActive="{x:Bind ViewModel.IsDraggingOverFilesDropZone, Mode=OneWay}" />
|
|
</VisualState.StateTriggers>
|
|
<VisualState.Setters>
|
|
<Setter Target="FilesDropZoneText.Opacity" Value="1" />
|
|
<Setter Target="FilesDropZoneBorder.Opacity" Value="1" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="FilesDropZoneNotHovered" />
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ImagesDropZoneState">
|
|
<VisualState x:Name="ImagesDropZoneHovered">
|
|
<VisualState.StateTriggers>
|
|
<StateTrigger IsActive="{x:Bind ViewModel.IsDraggingOverImagesDropZone, Mode=OneWay}" />
|
|
</VisualState.StateTriggers>
|
|
<VisualState.Setters>
|
|
<Setter Target="ImagesDropZoneText.Opacity" Value="1" />
|
|
<Setter Target="ImagesDropZoneBorder.Opacity" Value="1" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="ImagesDropZoneNotHovered" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
|
|
|
|
</abstract:ComposePageAbstract>
|