1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-16 16:23:29 +00:00

PM-3349 PM-3350 MAUI Migration Initial

This commit is contained in:
Federico Maccaroni
2023-09-29 11:02:19 -03:00
parent bbef0f8c93
commit 8ef9443b1e
717 changed files with 5367 additions and 4702 deletions

View File

@@ -0,0 +1,35 @@
using Bit.iOS.Core.Utilities;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Platform;
using UIKit;
namespace Bit.iOS.Core.Handlers
{
public class EntryHandlerMappings
{
public static void Setup()
{
EntryHandler.Mapper.AppendToMapping("CustomEntryHandler", (handler, editor) =>
{
handler.PlatformView.ClearButtonMode = UITextFieldViewMode.WhileEditing;
UpdateTintColor(handler, editor);
iOSHelpers.SetBottomBorder(handler.PlatformView);
// TODO: [Maui-Migration] Check if needed given that MAUI should be automatically change the font size based on OS accessbiility
//UpdateFontSize();
if (!ThemeHelpers.LightTheme)
{
handler.PlatformView.KeyboardAppearance = UIKeyboardAppearance.Dark;
}
});
EntryHandler.Mapper.AppendToMapping(nameof(IEntry.TextColor), UpdateTintColor);
}
private static void UpdateTintColor(IEntryHandler handler, IEntry editor)
{
handler.PlatformView.TintColor = editor.TextColor.ToPlatform();
}
}
}