mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-30 11:10:04 +00:00
feat(color): make project overview color work for new model
This commit is contained in:
parent
a51baba477
commit
fbb29e7b18
2 changed files with 5 additions and 3 deletions
|
|
@ -46,7 +46,9 @@ const _updateThemeModel = (project: Project): Project => {
|
|||
...project,
|
||||
theme: {
|
||||
...DEFAULT_PROJECT_THEME,
|
||||
primary: THEME_COLOR_MAP[project.themeColor],
|
||||
primary: (project.themeColor)
|
||||
? THEME_COLOR_MAP[project.themeColor]
|
||||
: DEFAULT_PROJECT_THEME.primary,
|
||||
isDarkTheme: project.isDarkTheme,
|
||||
isReducedTheme: project.isReducedTheme,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
dragula="PROJECTS">
|
||||
<mat-card *ngFor="let project of (projectService.list$|async); trackBy:trackById;"
|
||||
class="project">
|
||||
<div [ngStyle]="getThemeColor(project.themeColor)"
|
||||
<div [ngStyle]="getThemeColor(project.theme?.primary || project.themeColor)"
|
||||
class="project-color drag-handle">
|
||||
<mat-icon class="color-contrast"
|
||||
svgIcon="drag_handle">
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
<mat-card *ngFor="let project of (projectService.archived$|async); trackBy:trackById;"
|
||||
class="project">
|
||||
<div [ngStyle]="getThemeColor(project.themeColor)"
|
||||
<div [ngStyle]="getThemeColor(project.theme?.primary || project.themeColor)"
|
||||
class="project-color">
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue