mirror of
https://github.com/remvze/moodist.git
synced 2025-09-29 15:30:49 -04:00
Merge branch 'main' into develop
This commit is contained in:
commit
908fe01c5e
@ -1,11 +1,11 @@
|
|||||||
FROM node:20-alpine3.18 AS build
|
FROM docker.io/node:20-alpine3.18 AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:alpine AS runtime
|
FROM docker.io/nginx:alpine AS runtime
|
||||||
COPY ./docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
COPY ./docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
@ -86,5 +86,9 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--color-neutral-100);
|
background-color: var(--color-neutral-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 1px solid white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,4 +27,8 @@
|
|||||||
& span {
|
& span {
|
||||||
font-size: var(--font-lg);
|
font-size: var(--font-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 1px solid white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,10 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--color-neutral-200);
|
background-color: var(--color-neutral-200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 1px solid white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip {
|
.tooltip {
|
||||||
|
@ -24,4 +24,8 @@
|
|||||||
&.isFavorite {
|
&.isFavorite {
|
||||||
color: var(--color-foreground);
|
color: var(--color-foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 1px solid white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,20 +65,34 @@ export function Sound({
|
|||||||
}, [unselect, setVolume, id]);
|
}, [unselect, setVolume, id]);
|
||||||
|
|
||||||
const toggle = useCallback(() => {
|
const toggle = useCallback(() => {
|
||||||
if (isSelected) return _unselect();
|
if (isSelected) _unselect();
|
||||||
|
else _select();
|
||||||
|
}, [isSelected, _select, _unselect]);
|
||||||
|
|
||||||
_select();
|
const handleClick = useCallback(() => {
|
||||||
}, [isSelected, _unselect, _select]);
|
toggle();
|
||||||
|
}, [toggle]);
|
||||||
|
|
||||||
|
const handleKeyDown = useCallback(
|
||||||
|
(event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||||
|
if (event.key === 'Enter') {
|
||||||
|
toggle();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[toggle],
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
className={cn(
|
className={cn(
|
||||||
styles.sound,
|
styles.sound,
|
||||||
isSelected && styles.selected,
|
isSelected && styles.selected,
|
||||||
hidden && styles.hidden,
|
hidden && styles.hidden,
|
||||||
)}
|
)}
|
||||||
onClick={toggle}
|
onClick={handleClick}
|
||||||
onKeyDown={toggle}
|
onKeyDown={handleKeyDown}
|
||||||
>
|
>
|
||||||
<Favorite id={id} />
|
<Favorite id={id} />
|
||||||
<div className={styles.icon}>
|
<div className={styles.icon}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user