Replace changelog css colors

This commit is contained in:
Michael Schättgen 2019-12-26 23:25:05 +01:00
parent 08b80d2e72
commit fc96e7919a
2 changed files with 91 additions and 86 deletions

View file

@ -1,85 +1,86 @@
<html> <html>
<head> <head>
<style type="text/css"> <style type="text/css">
* { * {
word-wrap: break-word; word-wrap: break-word;
} }
body { body {
background-color: #%1$s; background-color: %1$s;
color: #%2$s; color: %2$s;
} }
ul { ul {
list-style-position: inside; list-style-position: inside;
padding: 0; padding: 0;
padding-left: 5px; padding-left: 5px;
margin-bottom: 5px; margin-bottom: 5px;
} }
li { li {
padding-bottom: 8px; padding-bottom: 8px;
list-style-position: outside; list-style-position: outside;
margin-left: 1em; margin-left: 1em;
} }
h4 { h4 {
margin-top: 0px; margin-top: 0px;
margin-bottom: 0px; margin-bottom: 0px;
} }
h3 { h3 {
margin-bottom: 7px; margin-bottom: 7px;
padding-top: 7px; padding-top: 7px;
} }
</style> </style>
</head> </head>
<body> <body>
<div></div> <div></div>
<h3>Version 1.1</h3> <h3>Version 1.1</h3>
<h4>New</h4> <h4>New</h4>
<ul> <ul>
<li>Support for other types of biometric authentication (i.e. Pixel 4 face unlock)</li> <li>Support for other types of biometric authentication (i.e. Pixel 4 face unlock)</li>
<li>Support for importing from WinAuth</li> <li>Support for importing from WinAuth</li>
<li>Support for Chromebooks</li> <li>Support for Chromebooks</li>
<li>Option to highlight entries when tapped</li> <li>Option to highlight entries when tapped</li>
<li>Filter for ungrouped tokens</li> <li>Filter for ungrouped tokens</li>
<li>Ability to search for token account names</li> <li>Ability to search for token account names</li>
<li>Simplified Chinese translation (thanks RunningMelos!)</li> <li>Simplified Chinese translation (thanks RunningMelos!)</li>
</ul> </ul>
<h4>Fixes</h4> <h4>Fixes</h4>
<ul> <ul>
<li>The behavior of highlighting and revealing entries was inconsistent</li> <li>The behavior of highlighting and revealing entries was inconsistent</li>
</ul> </ul>
<h3>Version 1.0.3</h3> <h3>Version 1.0.3</h3>
<h4>New</h4> <h4>New</h4>
<ul> <ul>
<li>Support for andOTP's new backup file format</li> <li>Support for andOTP's new backup file format</li>
</ul> </ul>
<h3>Version 1.0.2</h3> <h3>Version 1.0.2</h3>
<h4>Fixes</h4> <h4>Fixes</h4>
<ul> <ul>
<li>Search feature on Huawei devices</li> <li>Search feature on Huawei devices</li>
</ul> </ul>
<h4>Notes</h4> <h4>Notes</h4>
<ul> <ul>
<li>Disabled automatic backups through the Google Play Store</li> <li>Disabled automatic backups through the Google Play Store</li>
</ul> </ul>
<h3>Version 1.0.1</h3> <h3>Version 1.0.1</h3>
<h4>Notes</h4> <h4>Notes</h4>
<ul> <ul>
<li>Temporarily disabled search feature on Huawei devices</li> <li>Temporarily disabled search feature on Huawei devices</li>
</ul> </ul>
<h3>Version 1.0</h3> <h3>Version 1.0</h3>
<h4>New</h4> <h4>New</h4>
<ul> <ul>
<li>New icon</li> <li>New icon</li>
<li>Overhaul of interaction with the entry list</li> <li>Overhaul of interaction with the entry list</li>
<li>Persistent notification while the vault is unlocked</li> <li>Persistent notification while the vault is unlocked</li>
<li>Language override option</li> <li>Language override option</li>
<li>Support for importing from FreeOTP+</li> <li>Support for importing from FreeOTP+</li>
<li>Ability to toggle password visibility during unlock</li> <li>Ability to toggle password visibility during unlock</li>
<li>Support for deeplinking otpauth URIs</li> <li>Support for deeplinking otpauth URIs</li>
</ul> </ul>
<h4>Fixes</h4> <h4>Fixes</h4>
<ul> <ul>
<li>Bad overall performance and high battery usage</li> <li>Bad overall performance and high battery usage</li>
<li>Codes with an uneven number of digits are displayed incorrectly</li> <li>Codes with an uneven number of digits are displayed incorrectly</li>
<li>Crash when entering a large value for OTP period</li> <li>Crash when entering a large value for OTP period</li>
</ul> </ul>
</body> </body>
</html>

View file

@ -75,12 +75,16 @@ public class ChangelogDialog extends DialogFragment {
private String replaceStylesheet(String changelog) { private String replaceStylesheet(String changelog) {
int backgroundColorResource = _themeStyle == Theme.AMOLED ? R.attr.cardBackgroundFocused : R.attr.cardBackground; int backgroundColorResource = _themeStyle == Theme.AMOLED ? R.attr.cardBackgroundFocused : R.attr.cardBackground;
String backgroundColor = String.format("%06X", (0xFFFFFF & ThemeHelper.getThemeColor(backgroundColorResource, getContext().getTheme()))); String backgroundColor = colorToCSS(ThemeHelper.getThemeColor(backgroundColorResource, getContext().getTheme()));
String textColor = String.format("%06X", (0xFFFFFF & ThemeHelper.getThemeColor(R.attr.primaryText, getContext().getTheme()))); String textColor = colorToCSS(0xFFFFFF & ThemeHelper.getThemeColor(R.attr.primaryText, getContext().getTheme()));
return String.format(changelog, backgroundColor, textColor); return String.format(changelog, backgroundColor, textColor);
} }
private static String colorToCSS(int color) {
return String.format("rgb(%d, %d, %d)", Color.red(color), Color.green(color), Color.blue(color));
}
public ChangelogDialog setTheme(Theme theme) { public ChangelogDialog setTheme(Theme theme) {
_themeStyle = theme; _themeStyle = theme;