Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(board): allow to set icon color of widgets #2228

Merged
merged 40 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
72ac015
feat: allow to set icon color of widgets, per board
Feb 3, 2025
0cebf38
fix: changed img tag to use mantine Image component
Feb 3, 2025
637d8e0
fix: lint issue with assigning variable of type any
Feb 3, 2025
e9aca0d
fix: make `iconColor` nullable when saving into Db
Feb 3, 2025
4f682b7
feat: add @homarr/types package to handle common `*.d.ts` types
Feb 4, 2025
1556dce
fix: no named exports found in module './src/theme.other'
Feb 4, 2025
00a6be7
fix: bug with hover effect of icon in app widget
Feb 4, 2025
cb2f574
feat: moved colored image logic into it's own component
Feb 5, 2025
157c13e
Merge branch 'dev' into dev
Aandree5 Feb 5, 2025
7bf5b7e
Merge branch 'dev' of https://github.com/homarr-labs/homarr into dev
Aandree5 Feb 5, 2025
0669cdd
Merge branch 'homarr-labs:dev' into dev
Aandree5 Feb 5, 2025
7b8871e
Merge branch 'dev' into dev
Aandree5 Feb 6, 2025
c8b6322
Merge branch 'dev' into dev
Aandree5 Feb 7, 2025
5ceca15
fix: renamed ImageColored styles property to style
Aandree5 Feb 8, 2025
f992c5f
fix: renamed ImageColored to MaskedImage
Aandree5 Feb 8, 2025
53193dc
fix: dropped unneeded db migrations
Aandree5 Feb 10, 2025
e05b6c0
fix: changed `hexColorNullableSchema` to depend from `hexColorSchema`…
Aandree5 Feb 10, 2025
e6ff2e7
fix: remvoed `@homarr/types` and moved theme.other to `@homarr/ui`
Aandree5 Feb 10, 2025
9412d79
feat: added MaskedOrNormalImage
Aandree5 Feb 11, 2025
f07e9f6
Merge branch 'dev' of https://github.com/homarr-labs/homarr into dev
Aandree5 Feb 11, 2025
5e8e219
fix: code quality issues
Aandree5 Feb 11, 2025
71fa2ea
fix: merge issue
Aandree5 Feb 11, 2025
746c6a3
fix: prettier foramting file after merge
Aandree5 Feb 11, 2025
1f8e613
Merge branch 'dev' of https://github.com/homarr-labs/homarr into dev
Aandree5 Feb 12, 2025
01d60a9
Merge branch 'dev' of https://github.com/homarr-labs/homarr into dev
Aandree5 Feb 12, 2025
d982611
Merge branch 'dev' into dev
Aandree5 Feb 13, 2025
5c75e73
Merge branch 'dev' into dev
Aandree5 Feb 13, 2025
6ca5589
Merge branch 'dev' into dev
Aandree5 Feb 14, 2025
ddef6d0
chore(lang): updated translations from crowdin
homarr-crowdin[bot] Feb 15, 2025
a58aa19
fix(deps): update dependency octokit to ^4.1.2 (#2333)
homarr-renovate[bot] Feb 15, 2025
cadbeed
Merge branch 'dev' into dev
Aandree5 Feb 15, 2025
947a996
Merge branch 'dev' into dev
Aandree5 Feb 16, 2025
fc887ae
fix: changed from using theme `hasIconColor` to checking the board co…
Aandree5 Feb 16, 2025
1969583
feat: added db migrations
Aandree5 Feb 16, 2025
c3d00b8
Merge branch 'dev' into dev
Aandree5 Feb 16, 2025
124f191
Merge branch 'dev' into dev
Aandree5 Feb 17, 2025
6a40b28
Merge branch 'dev' into dev
Aandree5 Feb 18, 2025
d918795
Merge branch 'dev' into dev
Aandree5 Feb 18, 2025
6c9dc00
Merge branch 'dev' into dev
Aandree5 Feb 18, 2025
fbbff6b
Merge branch 'dev' into dev
Meierschlumpf Feb 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/nextjs/src/app/[locale]/boards/(content)/_theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import type { PropsWithChildren } from "react";
import type { MantineColorsTuple } from "@mantine/core";
import { createTheme, darken, lighten, MantineProvider } from "@mantine/core";
import { colorsTuple, createTheme, darken, lighten, MantineProvider } from "@mantine/core";

import { useRequiredBoard } from "@homarr/boards/context";
import type { ColorScheme } from "@homarr/definitions";
Expand All @@ -20,6 +20,7 @@ export const BoardMantineProvider = ({
colors: {
primaryColor: generateColors(board.primaryColor),
secondaryColor: generateColors(board.secondaryColor),
iconColor: board.iconColor ? generateColors(board.iconColor) : colorsTuple("#000000"),
},
primaryColor: "primaryColor",
autoContrast: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const ColorSettingsContent = ({ board }: Props) => {
primaryColor: board.primaryColor,
secondaryColor: board.secondaryColor,
opacity: board.opacity,
iconColor: board.iconColor ?? "",
itemRadius: board.itemRadius,
},
});
Expand Down Expand Up @@ -101,6 +102,12 @@ export const ColorSettingsContent = ({ board }: Props) => {
</InputWrapper>
</Grid.Col>
<Grid.Col span={{ sm: 12, md: 6 }}>
<ColorInput
label={t("board.field.iconColor.label")}
format="hex"
swatches={Object.values(theme.colors).map((color) => color[6])}
{...form.getInputProps("iconColor")}
/>
<Select
label={t("board.field.itemRadius.label")}
description={t("board.field.itemRadius.description")}
Expand Down
1 change: 1 addition & 0 deletions packages/api/src/router/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ export const boardRouter = createTRPCRouter({
primaryColor: input.primaryColor,
secondaryColor: input.secondaryColor,
opacity: input.opacity,
iconColor: input.iconColor,

// custom css
customCss: input.customCss,
Expand Down
1 change: 1 addition & 0 deletions packages/db/migrations/mysql/0027_acoustic_karma.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `board` ADD `icon_color` text;
Loading
Loading