black theme option

This commit is contained in:
Kyle Spearrin 2019-06-02 00:08:20 -04:00
parent dd976b5b86
commit 479ad31325
6 changed files with 21 additions and 1 deletions

View File

@ -49,6 +49,7 @@
</style>
<style name="BlackTheme.Base" parent="DarkTheme.Base">
<item name="android:windowBackground">@android:color/black</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">

View File

@ -9,7 +9,8 @@ namespace Bit.App.Pages
public HomePage()
{
InitializeComponent();
_logo.Source = ThemeManager.GetTheme() == "dark" ? "logo_white.png" : "logo.png";
var theme = ThemeManager.GetTheme();
_logo.Source = theme == "dark" || theme == "black" ? "logo_white.png" : "logo.png";
}
private void LogIn_Clicked(object sender, EventArgs e)

View File

@ -1,5 +1,6 @@
using Bit.App.Resources;
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace Bit.App.Pages

View File

@ -59,6 +59,10 @@ namespace Bit.App.Pages
new KeyValuePair<string, string>("light", AppResources.Light),
new KeyValuePair<string, string>("dark", AppResources.Dark),
};
if(Device.RuntimePlatform == Device.Android)
{
ThemeOptions.Add(new KeyValuePair<string, string>("black", AppResources.Black));
}
UriMatchOptions = new List<KeyValuePair<UriMatchType?, string>>
{
new KeyValuePair<UriMatchType?, string>(UriMatchType.Domain, AppResources.BaseDomain),

View File

@ -726,6 +726,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Black.
/// </summary>
public static string Black {
get {
return ResourceManager.GetString("Black", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Brand.
/// </summary>

View File

@ -1576,4 +1576,8 @@
<data name="PINRequireMasterPasswordRestart" xml:space="preserve">
<value>You you want to require unlocking with your master password when the application is restarted?</value>
</data>
<data name="Black" xml:space="preserve">
<value>Black</value>
<comment>The color black</comment>
</data>
</root>