feat: Themes feature redesign - #52
Conversation
|
The theme is too specific and hard-coded. I am sorry, but I can’t endorse this pull request yet. |
There was a problem hiding this comment.
We don't recommend adding AI-related files yet.
| <ion-back-button slot="start" defaultHref="/home"></ion-back-button> | ||
| <ion-title> | ||
| <span [ngStyle]="{'background-color': colorByFolderName(year)}">{{ year || 'Loading'}}</span> | ||
| <span [ngStyle]="{'background-color': getYearColor()}">{{ year || 'Loading'}}</span> |
There was a problem hiding this comment.
Is there any reason for the name changes?
| year: string; | ||
| list$: Observable<{ name: string, is_remote: boolean, id: number, link: string[] }[]>; | ||
|
|
||
| constructor() { |
There was a problem hiding this comment.
I am not sure what this line do.
| protected readonly colorByFolderNamePink = colorByFolderNamePink; | ||
|
|
||
| getCardColor(folder: string): string { | ||
| return this.themeService.isPinkMode ? colorByFolderNamePink(folder) : colorByFolderName(folder); |
There was a problem hiding this comment.
We should not use "Pink" as a variable name.
| } | ||
|
|
||
| protected readonly colorByFolderName = colorByFolderName; | ||
| protected readonly colorByFolderNamePink = colorByFolderNamePink; |
There was a problem hiding this comment.
We should not use "Pink" as a variable name.
There was a problem hiding this comment.
The component should be separate by 3 files, i.e. html, scss, and ts.
| return this.resolveEffective(this.themeMode.value) === 'dark'; | ||
| } | ||
|
|
||
| get isPinkMode(): boolean { |
There was a problem hiding this comment.
This is hard-coding pink color. It should support any color.
| return colorMap[name] || 'gray'; | ||
| } | ||
|
|
||
| export function colorByFolderNamePink(name: string) { |
There was a problem hiding this comment.
This is a fixed function name for pink color.
No description provided.