-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#708 - Add logic to send back frontend configuration and customizations.
- Loading branch information
Martin Käser
committed
Mar 21, 2024
1 parent
58bc117
commit 689e990
Showing
14 changed files
with
112 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 33 additions & 5 deletions
38
backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,46 @@ | ||
package ch.puzzle.okr.service.clientconfig; | ||
|
||
import ch.puzzle.okr.dto.ClientConfigDto; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.HashMap; | ||
|
||
|
||
@ConfigurationProperties("okr.clientconfig") | ||
public class ClientConfigProperties { | ||
private String favicon; | ||
|
||
private String logo; | ||
private String title; | ||
private HashMap<String, String> customStyles = new HashMap<>(); | ||
|
||
public void setCustomStyles(HashMap<String, String> customStyles) { | ||
this.customStyles = customStyles; | ||
} | ||
|
||
public String getFavicon() { | ||
return favicon; | ||
} | ||
|
||
public void setFavicon(String favicon) { | ||
this.favicon = favicon; | ||
} | ||
|
||
public String getLogo() { | ||
return logo; | ||
} | ||
|
||
public void setLogo(String logo) { | ||
this.logo = logo; | ||
} | ||
|
||
public HashMap<String, String> getCustomStyles() { | ||
return customStyles; | ||
} | ||
|
||
private HashMap<String, String> customStyles; | ||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
frontend/src/app/application-top-bar/application-top-bar.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
|
||
export interface AuthConfig { | ||
activeProfile: string; | ||
issuer: string; | ||
clientId: string; | ||
} | ||
|
||
export interface CustomStyles { | ||
[key: string]: string; | ||
} | ||
|
||
export interface CustomizationConfig { | ||
title: string; | ||
favicon: string; | ||
logo: string; | ||
customStyles: Map<string, string>; | ||
} | ||
export interface ClientConfig extends AuthConfig, CustomizationConfig { | ||
customStyles: CustomStyles; | ||
} | ||
export interface ClientConfig extends AuthConfig, CustomizationConfig {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters