forked from Archives/Athou_commafeed
add theme color picker (#1598)
This commit is contained in:
@@ -89,6 +89,9 @@ public class UserSettings extends AbstractModel {
|
||||
@Column(nullable = false)
|
||||
private IconDisplayMode externalLinkIconDisplayMode;
|
||||
|
||||
@Column(name = "primary_color", length = 32)
|
||||
private String primaryColor;
|
||||
|
||||
private boolean markAllAsReadConfirmation;
|
||||
private boolean customContextMenu;
|
||||
private boolean mobileFooter;
|
||||
|
||||
@@ -79,6 +79,9 @@ public class Settings implements Serializable {
|
||||
@Schema(description = "show unread count in the favicon", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean unreadCountFavicon;
|
||||
|
||||
@Schema(description = "primary theme color to use in the UI")
|
||||
private String primaryColor;
|
||||
|
||||
@Schema(description = "sharing settings", requiredMode = RequiredMode.REQUIRED)
|
||||
private SharingSettings sharingSettings = new SharingSettings();
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ public class UserREST {
|
||||
s.setMobileFooter(settings.isMobileFooter());
|
||||
s.setUnreadCountTitle(settings.isUnreadCountTitle());
|
||||
s.setUnreadCountFavicon(settings.isUnreadCountFavicon());
|
||||
s.setPrimaryColor(settings.getPrimaryColor());
|
||||
} else {
|
||||
s.setReadingMode(ReadingMode.unread.name());
|
||||
s.setReadingOrder(ReadingOrder.desc.name());
|
||||
@@ -183,6 +184,7 @@ public class UserREST {
|
||||
s.setMobileFooter(settings.isMobileFooter());
|
||||
s.setUnreadCountTitle(settings.isUnreadCountTitle());
|
||||
s.setUnreadCountFavicon(settings.isUnreadCountFavicon());
|
||||
s.setPrimaryColor(settings.getPrimaryColor());
|
||||
|
||||
s.setEmail(settings.getSharingSettings().isEmail());
|
||||
s.setGmail(settings.getSharingSettings().isGmail());
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
|
||||
|
||||
<changeSet id="primary-color-setting" author="athou">
|
||||
<addColumn tableName="USERSETTINGS">
|
||||
<column name="primary_color" type="varchar(32)" />
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -34,5 +34,6 @@
|
||||
<include file="changelogs/db.changelog-5.1.xml" />
|
||||
<include file="changelogs/db.changelog-5.2.xml" />
|
||||
<include file="changelogs/db.changelog-5.3.xml" />
|
||||
<include file="changelogs/db.changelog-5.8.xml" />
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user