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

MAUII Finished #16

Merged
merged 29 commits into from
May 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2953c38
Minimal design
DevElkami Apr 22, 2023
91eb8c4
Url ui
DevElkami Apr 22, 2023
2c4ba7e
Add new fonction: download password from url
DevElkami Apr 22, 2023
d813e3b
Chang ui for error page
DevElkami Apr 22, 2023
6b4d9d5
Merge branch 'Dev' of https://github.com/DevElkami/PasswordVault into…
DevElkami Apr 22, 2023
a066e5e
Display raw
DevElkami Apr 22, 2023
9359fb3
Enhancing viewcell template
DevElkami Apr 26, 2023
1bc096c
Refresh and data loading
DevElkami Apr 26, 2023
e91ffbe
Update command work with async
DevElkami Apr 29, 2023
3c6b8e3
Loading and binding failed...
DevElkami Apr 29, 2023
c92343d
Search command
DevElkami Apr 29, 2023
ddcda96
Add lock multhread protection
DevElkami Apr 29, 2023
fd4f9cd
Change splash screen
DevElkami Apr 29, 2023
3665846
Fix splah screen color
DevElkami Apr 29, 2023
e91b30f
Optimize layout
DevElkami Apr 29, 2023
1d13e43
Finished design
DevElkami Apr 29, 2023
030553d
Empty if can't search
DevElkami Apr 30, 2023
cd521cb
Full translation for CheckPage
DevElkami May 2, 2023
7982dd1
Full translation for InitPage and ErrorPage
DevElkami May 2, 2023
7d13e1e
Translate search page
DevElkami May 2, 2023
219853c
Fix problem with dependency injection and static ressource
DevElkami May 2, 2023
17e237f
Fix translation, rotation
DevElkami May 4, 2023
bb5cd59
Add log with dependency injection
DevElkami May 7, 2023
cc41fe2
V++
DevElkami May 7, 2023
edce72f
Fix screen navigation (unlock one more time after initialisation)
DevElkami May 7, 2023
c232f8c
Fix height problème
DevElkami May 7, 2023
f5e613b
Test style
DevElkami May 7, 2023
af5a8cd
maui scrren shot
DevElkami May 7, 2023
3823b71
Update Readme
DevElkami May 7, 2023
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
13 changes: 12 additions & 1 deletion MauiPasswordVault/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using MauiPasswordVault.View;
using Microsoft.Maui.Hosting;
using System.Globalization;
using System.Text.RegularExpressions;

namespace MauiPasswordVault
{
Expand All @@ -8,9 +11,17 @@ public App(SearchPage searchPage)
{
if (Application.Current != null)
Application.Current.UserAppTheme = AppTheme.Dark;

InitializeComponent();

#if DEBUG
Resources.MergedDictionaries.Add(new MauiPasswordVault.Resources.Lang.en());
#else
if (Thread.CurrentThread.CurrentUICulture.IetfLanguageTag == "fr-FR")
Resources.MergedDictionaries.Add(new MauiPasswordVault.Resources.Lang.fr());
else
Resources.MergedDictionaries.Add(new MauiPasswordVault.Resources.Lang.en());
#endif

MainPage = new NavigationPage(searchPage);
}
}
Expand Down
29 changes: 19 additions & 10 deletions MauiPasswordVault/MauiPasswordVault.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
<ApplicationTitle>Password Vault</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.mauipasswordvault</ApplicationId>
<ApplicationId>com.github.vault</ApplicationId>
<ApplicationIdGuid>8409360f-6d94-4dc3-a09f-38b31006a68d</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>3.0.0.0</ApplicationDisplayVersion>
<ApplicationDisplayVersion>3.3.0.0</ApplicationDisplayVersion>
<ApplicationVersion>3</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<Version>3.0.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<Version>3.3.0.0</Version>
<AssemblyVersion>3.3.0.0</AssemblyVersion>
<FileVersion>3.3.0.0</FileVersion>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
Expand All @@ -42,8 +42,8 @@
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.png" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- App Splash -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#A265BE" Resize="false" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
Expand All @@ -57,12 +57,15 @@
</ItemGroup>

<ItemGroup>
<None Remove="Resources\Images\home.svg" />
<None Remove="Resources\Images\information.svg" />
</ItemGroup>
<None Remove="Platforms\Android\Resources\style.xml" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="5.1.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="NLog" Version="5.1.4" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.3" />
</ItemGroup>

<ItemGroup>
Expand All @@ -76,6 +79,12 @@
</ItemGroup>

<ItemGroup>
<MauiXaml Update="Resources\Lang\en.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Resources\Lang\fr.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\AboutPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
Expand Down
31 changes: 27 additions & 4 deletions MauiPasswordVault/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
using MauiPasswordVault.Service;
using CommunityToolkit.Maui;
using MauiPasswordVault.Service;
using MauiPasswordVault.View;
using MauiPasswordVault.ViewModel;
using Microsoft.Extensions.Logging;
using NLog.Extensions.Logging;
using NLog;
using VaultCore;
using NLog.Config;
using NLog.Targets;

namespace MauiPasswordVault;

Expand All @@ -13,6 +18,7 @@ public static MauiApp CreateMauiApp()
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
Expand All @@ -22,6 +28,26 @@ public static MauiApp CreateMauiApp()
fonts.AddFont("AwesomeSolid.otf", "AwesomeSolid");
});

#region Logger
LoggingConfiguration logConfig = new();

FileTarget fileTarget = new()
{
FileName = typeof(MauiProgram).FullName + ".log",
Layout = @"${longdate} [${uppercase:${level}}] ${logger} - ${message} ${exception:format=tostring}"
};

LoggingRule fileRule = new("*", NLog.LogLevel.Info, fileTarget);
logConfig.LoggingRules.Add(fileRule);
logConfig.AddTarget("logfile", fileTarget);

builder.Logging.ClearProviders();
builder.Logging.AddNLog(logConfig);
#if DEBUG
builder.Logging.AddDebug();
#endif
#endregion

builder.Services.AddSingleton<MyVault>();
builder.Services.AddSingleton<NavigationService>();
builder.Services.AddSingleton<ErrorService>();
Expand All @@ -37,9 +63,6 @@ public static MauiApp CreateMauiApp()

builder.Services.AddTransient<ErrorPage>();
builder.Services.AddTransient<ErrorViewModel>();
#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
Expand Down
2 changes: 1 addition & 1 deletion MauiPasswordVault/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace MauiPasswordVault
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
[Activity(Theme = "@style/MyAppTheme", MainLauncher = true, ScreenOrientation = ScreenOrientation.Sensor, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimary">#A265BE</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
<color name="colorAccent">#A265BE</color>
<color name="ListViewSelected">#000000</color>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MyAppTheme" parent="Maui.SplashTheme">
<item name="android:colorPressedHighlight">@color/ListViewSelected</item>
<item name="android:colorFocusedHighlight">@color/ListViewSelected</item>
<item name="android:colorActivatedHighlight">@color/ListViewSelected</item>
<item name="android:activatedBackgroundIndicator">@color/ListViewSelected</item>
</style>
</resources>
Binary file added MauiPasswordVault/Resources/Images/dimport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 0 additions & 93 deletions MauiPasswordVault/Resources/Images/dotnet_bot.svg

This file was deleted.

1 change: 0 additions & 1 deletion MauiPasswordVault/Resources/Images/home.svg

This file was deleted.

Loading