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
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
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 --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
|
@ -86,5 +86,9 @@
|
||||
&:hover {
|
||||
background-color: var(--color-neutral-100);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 1px solid white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,4 +27,8 @@
|
||||
& span {
|
||||
font-size: var(--font-lg);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 1px solid white;
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,10 @@
|
||||
&:hover {
|
||||
background-color: var(--color-neutral-200);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 1px solid white;
|
||||
}
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
|
@ -24,4 +24,8 @@
|
||||
&.isFavorite {
|
||||
color: var(--color-foreground);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 1px solid white;
|
||||
}
|
||||
}
|
||||
|
@ -65,20 +65,34 @@ export function Sound({
|
||||
}, [unselect, setVolume, id]);
|
||||
|
||||
const toggle = useCallback(() => {
|
||||
if (isSelected) return _unselect();
|
||||
if (isSelected) _unselect();
|
||||
else _select();
|
||||
}, [isSelected, _select, _unselect]);
|
||||
|
||||
_select();
|
||||
}, [isSelected, _unselect, _select]);
|
||||
const handleClick = useCallback(() => {
|
||||
toggle();
|
||||
}, [toggle]);
|
||||
|
||||
const handleKeyDown = useCallback(
|
||||
(event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||
if (event.key === 'Enter') {
|
||||
toggle();
|
||||
}
|
||||
},
|
||||
[toggle],
|
||||
);
|
||||
|
||||
return (
|
||||
<div
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
className={cn(
|
||||
styles.sound,
|
||||
isSelected && styles.selected,
|
||||
hidden && styles.hidden,
|
||||
)}
|
||||
onClick={toggle}
|
||||
onKeyDown={toggle}
|
||||
onClick={handleClick}
|
||||
onKeyDown={handleKeyDown}
|
||||
>
|
||||
<Favorite id={id} />
|
||||
<div className={styles.icon}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user