diff --git a/CHANGELOG.md b/CHANGELOG.md
index b34d38f..b628e57 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,5 +3,12 @@
## Features
- Allow loading environment variables from files using the _FILE suffix (#20)
+## Enhancements
+
## Fixes
-- Sub-second precision is stripped from incoming listens to ensure they can be deleted reliably
\ No newline at end of file
+- Sub-second precision is stripped from incoming listens to ensure they can be deleted reliably
+
+## Updates
+- Adjusted colors for the "Yuu" theme
+- Themes now have a single source of truth in themes.css.ts
+- Basline support for custom themes added
\ No newline at end of file
diff --git a/client/app/components/ActivityGrid.tsx b/client/app/components/ActivityGrid.tsx
index 818d6e3..c1778d3 100644
--- a/client/app/components/ActivityGrid.tsx
+++ b/client/app/components/ActivityGrid.tsx
@@ -45,12 +45,16 @@ export default function ActivityGrid({
albumId = 0,
trackId = 0,
configurable = false,
- autoAdjust = false,
}: Props) {
const [color, setColor] = useState(getPrimaryColor())
const [stepState, setStep] = useState(step)
const [rangeState, setRange] = useState(range)
+
+ // sometimes, a little bit of a lie for the sake of better design is necessary
+ if (rangeState === 365) {
+ setRange(rangeState - 1)
+ }
const { isPending, isError, data, error } = useQuery({
queryKey: [
@@ -111,24 +115,26 @@ export default function ActivityGrid({
const getDarkenAmount = (v: number, t: number): number => {
- if (autoAdjust) {
- // automatically adjust the target value based on step
- // the smartest way to do this would be to have the api return the
- // highest value in the range. too bad im not smart
- switch (stepState) {
- case 'day':
- t = 10
- break;
- case 'week':
- t = 20
- break;
- case 'month':
- t = 50
- break;
- case 'year':
- t = 100
- break;
- }
+ // really ugly way to just check if this is for all items and not a specific item.
+ // is it jsut better to just pass the target in as a var? probably.
+ const adjustment = artistId == albumId && albumId == trackId && trackId == 0 ? 10 : 1
+
+ // automatically adjust the target value based on step
+ // the smartest way to do this would be to have the api return the
+ // highest value in the range. too bad im not smart
+ switch (stepState) {
+ case 'day':
+ t = 10 * adjustment
+ break;
+ case 'week':
+ t = 20 * adjustment
+ break;
+ case 'month':
+ t = 50 * adjustment
+ break;
+ case 'year':
+ t = 100 * adjustment
+ break;
}
v = Math.min(v, t)
@@ -142,45 +148,58 @@ export default function ActivityGrid({
}
}
- return (
-
Activity
- {configurable ? (
-
- ) : (
- ''
- )}
-
- {data.map((item) => (
+ const CHUNK_SIZE = 26 * 7;
+ const chunks = [];
+
+ for (let i = 0; i < data.length; i += CHUNK_SIZE) {
+ chunks.push(data.slice(i, i + CHUNK_SIZE));
+ }
+
+ return (
+