Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 #1

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

1 #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Wino.Core.Domain/Interfaces/INativeAppService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface INativeAppService

string GetFullAppVersion();

Task PinAppToTaskbarAsync();
//Task PinAppToTaskbarAsync();

/// <summary>
/// Some cryptographic shit is needed for requesting Google authentication in UWP.
Expand Down
6 changes: 3 additions & 3 deletions Wino.Core/Authenticators/OutlookAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class OutlookAuthenticator : BaseAuthenticator, IAuthenticator
// Outlook
private const string Authority = "https://login.microsoftonline.com/common";

public string ClientId { get; } = "b19c2035-d740-49ff-b297-de6ec561b208";
public string ClientId { get; } = "d26be8d1-9975-4654-aa42-35b398759196";

private readonly string[] MailScope = new string[] { "email", "mail.readwrite", "offline_access", "mail.send" };

Expand All @@ -27,11 +27,11 @@ public class OutlookAuthenticator : BaseAuthenticator, IAuthenticator

public OutlookAuthenticator(ITokenService tokenService, INativeAppService nativeAppService) : base(tokenService)
{
var authenticationRedirectUri = nativeAppService.GetWebAuthenticationBrokerUri();
// var authenticationRedirectUri = nativeAppService.GetWebAuthenticationBrokerUri();

_publicClientApplication = PublicClientApplicationBuilder.Create(ClientId)
.WithAuthority(Authority)
.WithRedirectUri(authenticationRedirectUri)
.WithRedirectUri("https://login.microsoftonline.com/common/oauth2/nativeclient")
.Build();
}

Expand Down
20 changes: 12 additions & 8 deletions Wino.Core/Services/FolderService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ public async Task<AccountFolderTree> GetFolderStructureForAccountAsync(Guid acco

if (nonStickyFolders.Any())
{
var virtualMoreFolder = new MailItemFolder()
{
FolderName = Translator.More,
SpecialFolderType = SpecialFolderType.More
};
//var virtualMoreFolder = new MailItemFolder()
//{
// FolderName = Translator.More,
// SpecialFolderType = SpecialFolderType.More
//};

var moreFolders = new List<MailItemFolder>();

foreach (var unstickyItem in nonStickyFolders)
{
Expand All @@ -156,12 +158,14 @@ public async Task<AccountFolderTree> GetFolderStructureForAccountAsync(Guid acco

var structure = await GetChildFolderItemsRecursiveAsync(unstickyItem.Id, accountId);

virtualMoreFolder.ChildFolders.Add(structure);
moreFolders.Add(structure);
}

// Only add more if there are any.
if (virtualMoreFolder.ChildFolders.Count > 0)
accountTree.Folders.Add(virtualMoreFolder);
if (moreFolders.Count > 0)
{
accountTree.Folders.AddRange(moreFolders);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Wino.Mail.ViewModels/AppShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ protected override async void OnAccountCreated(MailAccount createdAccount)

Messenger.Send(new NewSynchronizationRequested(options));

await _nativeAppService.PinAppToTaskbarAsync();
//await _nativeAppService.PinAppToTaskbarAsync();
}

/// <summary>
Expand Down
21 changes: 17 additions & 4 deletions Wino.Mail/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@
<!-- Inbox or any other folders. -->
<DataTemplate x:Key="FolderMenuTemplate" x:DataType="menu:FolderMenuItem">
<controls:WinoNavigationViewItem
MinHeight="30"
MinHeight="32"

AllowDrop="True"
ContextRequested="MenuItemContextRequested"
DragEnter="ItemDragEnterOnFolder"
Expand Down Expand Up @@ -299,6 +300,7 @@
x:Name="CustomColorTitle"
Margin="4,0,0,0"
VerticalAlignment="Center"

FontWeight="{x:Bind helpers:XamlHelpers.GetFontWeightBySyncState(IsSelected), Mode=OneWay}"
Foreground="{x:Bind helpers:XamlHelpers.GetSolidColorBrushFromHex(Parameter.TextColorHex), Mode=OneWay}"
Style="{StaticResource BodyTextBlockStyle}"
Expand Down Expand Up @@ -490,7 +492,8 @@
x:Name="RootGrid"
Padding="0"
ColumnSpacing="0"
RowSpacing="0">
RowSpacing="0"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48" />
<ColumnDefinition Width="*" />
Expand Down Expand Up @@ -528,7 +531,16 @@
PaneOpening="NavigationPaneOpening"
ScrollViewer.VerticalScrollBarVisibility="Hidden"
SelectedItem="{x:Bind ViewModel.SelectedMenuItem, Mode=TwoWay}"
SelectionChanged="MenuSelectionChanged">
SelectionChanged="MenuSelectionChanged"
Background="#08FFFFFF"
>
<muxc:NavigationView.Resources>
<!--<Thickness x:Key="NavigationViewContentMargin">0,50,0,0</Thickness>-->
<SolidColorBrush x:Key="NavigationViewContentBackground"
Color="Transparent" />
<SolidColorBrush x:Key="NavigationViewContentGridBorderBrush"
Color="Transparent" />
</muxc:NavigationView.Resources>
<muxc:NavigationView.ContentTransitions>
<TransitionCollection>
<AddDeleteThemeTransition />
Expand All @@ -542,7 +554,7 @@
<!--<muxc:NavigationView.PaneFooter>

</muxc:NavigationView.PaneFooter>-->
<Grid ColumnSpacing="0">
<Grid ColumnSpacing="0" Margin="-30 0 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
Expand Down Expand Up @@ -608,5 +620,6 @@
OpenPaneLength="{x:Bind ViewModel.StatePersistenceService.OpenPaneLength, Mode=OneWay}"
ReadingPaneLength="{x:Bind ViewModel.StatePersistenceService.MailListPaneLength, Mode=OneWay}"
SystemReserved="180" />

</Grid>
</abstract:AppShellAbstract>
Binary file modified Wino.Mail/Assets/BadgeLogo.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/BadgeLogo.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/BadgeLogo.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/BadgeLogo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/BadgeLogo.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/LargeTile.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/LargeTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/LargeTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/LargeTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/LargeTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Wino.Mail/Assets/Rectangle17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SmallTile.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SmallTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SmallTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SmallTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SmallTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SplashScreen.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SplashScreen.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SplashScreen.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SplashScreen.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/SplashScreen.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/Square150x150Logo.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/Square150x150Logo.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/Square150x150Logo.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/Square150x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Wino.Mail/Assets/Square150x150Logo.scale-400.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.scale-100.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.scale-125.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.scale-150.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.scale-200.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.scale-400.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.targetsize-16.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.targetsize-24.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.targetsize-256.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.targetsize-32.png
Binary file modified Wino.Mail/Assets/Square44x44Logo.targetsize-48.png
Binary file modified Wino.Mail/Assets/StoreLogo.scale-100.png
Binary file modified Wino.Mail/Assets/StoreLogo.scale-125.png
Binary file modified Wino.Mail/Assets/StoreLogo.scale-150.png
Binary file modified Wino.Mail/Assets/StoreLogo.scale-200.png
Binary file modified Wino.Mail/Assets/StoreLogo.scale-400.png
Binary file modified Wino.Mail/Assets/Wide310x150Logo.scale-100.png
Binary file modified Wino.Mail/Assets/Wide310x150Logo.scale-125.png
Binary file modified Wino.Mail/Assets/Wide310x150Logo.scale-150.png
Binary file modified Wino.Mail/Assets/Wide310x150Logo.scale-200.png
Binary file modified Wino.Mail/Assets/Wide310x150Logo.scale-400.png
4 changes: 3 additions & 1 deletion Wino.Mail/Controls/Advanced/WinoAppTitleBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@
<ContentPresenter
x:Name="ShellContentContainer"
Grid.Column="1"
Grid.ColumnSpan="1"
Canvas.ZIndex="2"
Content="{x:Bind ShellFrameContent, Mode=OneWay}">
HorizontalAlignment="Stretch"
Content="{x:Bind ShellFrameContent, Mode=OneWay}" RenderTransformOrigin="0.5,0.5">
<ContentPresenter.ContentTransitions>
<TransitionCollection>
<PaneThemeTransition Edge="Top" />
Expand Down
30 changes: 21 additions & 9 deletions Wino.Mail/Controls/Advanced/WinoAppTitleBar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ private void DrawTitleBar()
UpdateLayout();

CoreWindowTitleTextBlock.Visibility = Visibility.Collapsed;
ShellContentContainer.Width = double.NaN;
ShellContentContainer.Margin = new Thickness(0, 0, 0, 0);
ShellContentContainer.HorizontalAlignment = HorizontalAlignment.Stretch;
//ShellContentContainer.Width = double.NaN;
//ShellContentContainer.Margin = new Thickness(0, 0, 0, 0);
//ShellContentContainer.HorizontalAlignment = HorizontalAlignment.Stretch;

EmptySpaceWidth.Width = new GridLength(1, GridUnitType.Star);

Expand All @@ -118,8 +118,9 @@ private void DrawTitleBar()

if (!IsReaderNarrowed)
{
ShellContentContainer.HorizontalAlignment = HorizontalAlignment.Left;
ShellContentContainer.Width = ReadingPaneLength;
//ShellContentContainer.HorizontalAlignment = HorizontalAlignment.Left;
//ShellContentContainer.Width = ReadingPaneLength;
ShellContentContainer.Margin = new Thickness(10, 0, 0, 0);
}
}
else if (NavigationViewDisplayMode == Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Expanded)
Expand All @@ -129,19 +130,30 @@ private void DrawTitleBar()
CoreWindowTitleTextBlock.Visibility = Visibility.Visible;

// LMargin = OpenPaneLength - LeftMenuStackPanel
ShellContentContainer.Margin = new Thickness(OpenPaneLength - LeftMenuStackPanel.ActualSize.X, 0, 0, 0);
// ShellContentContainer.Margin = new Thickness(OpenPaneLength - LeftMenuStackPanel.ActualSize.X, 0, 0, 0);

if (!IsReaderNarrowed)
{
ShellContentContainer.HorizontalAlignment = HorizontalAlignment.Left;
ShellContentContainer.Width = ReadingPaneLength;
//ShellContentContainer.HorizontalAlignment = HorizontalAlignment.Left;
//ShellContentContainer.Width = ReadingPaneLength;
}
}
else
{
EmptySpaceWidth.Width = new GridLength(ReadingPaneLength, GridUnitType.Pixel);
//EmptySpaceWidth.Width = new GridLength(ReadingPaneLength, GridUnitType.Pixel);
}
}

if(this.ActualWidth >= 720)
{
ShellContentContainer.Margin = new Thickness(125, 0, 0, 0);
ShellContentContainer.MaxWidth = 400;
}
else
{
ShellContentContainer.Margin = new Thickness(60, 0, -40, 0);
ShellContentContainer.MaxWidth = double.PositiveInfinity;
}
}

public WinoAppTitleBar()
Expand Down
Loading