Merged main.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Launch;
|
||||
using Wino.Messaging.Client.Authorization;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
|
||||
@@ -37,11 +37,7 @@ namespace Wino.Activation
|
||||
else if (protocolString.StartsWith(MailtoProtocolTag))
|
||||
{
|
||||
// mailto activation. Try to parse params.
|
||||
|
||||
var replaced = protocolString.Replace(MailtoProtocolTag, "mailto=");
|
||||
replaced = Wino.Core.Extensions.StringExtensions.ReplaceFirst(replaced, "?", "&");
|
||||
|
||||
_launchProtocolService.MailtoParameters = HttpUtility.ParseQueryString(replaced);
|
||||
_launchProtocolService.MailToUri = new MailToUri(protocolString);
|
||||
|
||||
if (_nativeAppService.IsAppRunning())
|
||||
{
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
using System.Collections.Specialized;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Core.UWP.Services
|
||||
{
|
||||
public class LaunchProtocolService : ILaunchProtocolService
|
||||
{
|
||||
public object LaunchParameter { get; set; }
|
||||
public NameValueCollection MailtoParameters { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -493,7 +493,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Click="ShowCCBCCClicked"
|
||||
GotFocus="CCBBCGotFocus"
|
||||
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}">
|
||||
Visibility="{x:Bind helpers:XamlHelpers.ReverseBoolToVisibilityConverter(ViewModel.IsCCBCCVisible), Mode=OneWay}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<PathIcon
|
||||
HorizontalAlignment="Center"
|
||||
@@ -512,13 +512,14 @@
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="Cc: "
|
||||
Visibility="{x:Bind helpers:XamlHelpers.ReverseVisibilityConverter(CCBCCShowButton.Visibility), Mode=OneWay}" />
|
||||
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}" />
|
||||
|
||||
<controls1: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}"
|
||||
@@ -526,7 +527,7 @@
|
||||
TokenDelimiter=";"
|
||||
TokenItemAdding="TokenItemAdding"
|
||||
TokenItemTemplate="{StaticResource TokenBoxTemplate}"
|
||||
Visibility="{x:Bind helpers:XamlHelpers.ReverseVisibilityConverter(CCBCCShowButton.Visibility), Mode=OneWay}" />
|
||||
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}" />
|
||||
|
||||
<TextBlock
|
||||
x:Name="BccTextBlock"
|
||||
@@ -534,13 +535,14 @@
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="Bcc: "
|
||||
Visibility="{x:Bind helpers:XamlHelpers.ReverseVisibilityConverter(CCBCCShowButton.Visibility), Mode=OneWay}" />
|
||||
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}" />
|
||||
|
||||
<controls1: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}"
|
||||
@@ -548,7 +550,7 @@
|
||||
TokenDelimiter=";"
|
||||
TokenItemAdding="TokenItemAdding"
|
||||
TokenItemTemplate="{StaticResource TokenBoxTemplate}"
|
||||
Visibility="{x:Bind helpers:XamlHelpers.ReverseVisibilityConverter(CCBCCShowButton.Visibility), Mode=OneWay}" />
|
||||
Visibility="{x:Bind ViewModel.IsCCBCCVisible, Mode=OneWay}" />
|
||||
|
||||
<!-- Subject -->
|
||||
<TextBlock
|
||||
|
||||
@@ -562,12 +562,7 @@ namespace Wino.Views
|
||||
|
||||
private void ShowCCBCCClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CCBCCShowButton.Visibility = Visibility.Collapsed;
|
||||
|
||||
CCTextBlock.Visibility = Visibility.Visible;
|
||||
CCBox.Visibility = Visibility.Visible;
|
||||
BccTextBlock.Visibility = Visibility.Visible;
|
||||
BccBox.Visibility = Visibility.Visible;
|
||||
ViewModel.IsCCBCCVisible = true;
|
||||
}
|
||||
|
||||
private async void TokenItemAdding(TokenizingTextBox sender, TokenItemAddingEventArgs args)
|
||||
@@ -591,7 +586,7 @@ namespace Wino.Views
|
||||
if (boxTag == "ToBox")
|
||||
addedItem = await ViewModel.GetAddressInformationAsync(args.TokenText, ViewModel.ToItems);
|
||||
else if (boxTag == "CCBox")
|
||||
addedItem = await ViewModel.GetAddressInformationAsync(args.TokenText, ViewModel.CCItemsItems);
|
||||
addedItem = await ViewModel.GetAddressInformationAsync(args.TokenText, ViewModel.CCItems);
|
||||
else if (boxTag == "BCCBox")
|
||||
addedItem = await ViewModel.GetAddressInformationAsync(args.TokenText, ViewModel.BCCItems);
|
||||
|
||||
@@ -660,7 +655,7 @@ namespace Wino.Views
|
||||
if (boxTag == "ToBox")
|
||||
addressCollection = ViewModel.ToItems;
|
||||
else if (boxTag == "CCBox")
|
||||
addressCollection = ViewModel.CCItemsItems;
|
||||
addressCollection = ViewModel.CCItems;
|
||||
else if (boxTag == "BCCBox")
|
||||
addressCollection = ViewModel.BCCItems;
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace Wino.Views
|
||||
// We don't have shell initialized here. It's only standalone EML viewing.
|
||||
// Shift command bar from top to adjust the design.
|
||||
|
||||
if (ViewModel.StatePersistanceService.ShouldShiftMailRenderingDesign)
|
||||
if (ViewModel.StatePersistenceService.ShouldShiftMailRenderingDesign)
|
||||
RendererGridFrame.Margin = new Thickness(0, 24, 0, 0);
|
||||
else
|
||||
RendererGridFrame.Margin = new Thickness(0, 0, 0, 0);
|
||||
|
||||
@@ -335,7 +335,6 @@
|
||||
<Compile Include="Selectors\RendererCommandBarItemTemplateSelector.cs" />
|
||||
<Compile Include="Services\ApplicationResourceManager.cs" />
|
||||
<Compile Include="Services\DialogService.cs" />
|
||||
<Compile Include="Services\LaunchProtocolService.cs" />
|
||||
<Compile Include="Services\WinoNavigationService.cs" />
|
||||
<Compile Include="Styles\CommandBarItems.xaml.cs">
|
||||
<DependentUpon>CommandBarItems.xaml</DependentUpon>
|
||||
@@ -892,4 +891,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user