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>
<style name="BlackTheme.Base" parent="DarkTheme.Base"> <style name="BlackTheme.Base" parent="DarkTheme.Base">
<item name="android:windowBackground">@android:color/black</item>
</style> </style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog"> <style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">

View file

@ -9,7 +9,8 @@ namespace Bit.App.Pages
public HomePage() public HomePage()
{ {
InitializeComponent(); 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) private void LogIn_Clicked(object sender, EventArgs e)

View file

@ -1,5 +1,6 @@
using Bit.App.Resources; using Bit.App.Resources;
using System; using System;
using System.Collections.Generic;
using Xamarin.Forms; using Xamarin.Forms;
namespace Bit.App.Pages 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>("light", AppResources.Light),
new KeyValuePair<string, string>("dark", AppResources.Dark), 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>> UriMatchOptions = new List<KeyValuePair<UriMatchType?, string>>
{ {
new KeyValuePair<UriMatchType?, string>(UriMatchType.Domain, AppResources.BaseDomain), 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> /// <summary>
/// Looks up a localized string similar to Brand. /// Looks up a localized string similar to Brand.
/// </summary> /// </summary>

View file

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