animation, dots, dropdown, popover and design fixes

This commit is contained in:
Thomas Demirdjian
2025-10-06 10:13:17 +02:00
parent 3d14e47770
commit bd1ce3d26c
7 changed files with 427 additions and 116 deletions
+44 -68
View File
@@ -9,6 +9,24 @@ import { Palette } from "../styles";
import { FONT_FAMILY } from "../styles/Fonts";
import { Portal } from "@gorhom/portal";
const MoreBtn = ({ onPress, children }) => (
<Pressable onPress={onPress}>
<BlurView
intensity={Platform.OS !== "ios" ? 70 : 30}
tint="dark"
style={{
paddingHorizontal: 12,
paddingVertical: 10,
backgroundColor: Palette.glass,
borderRadius: 12,
overflow: "hidden",
}}
>
{children}
</BlurView>
</Pressable>
);
const MoreMenu = ({
visible = false,
top = 0,
@@ -26,8 +44,8 @@ const MoreMenu = ({
typeof position?.top === "number"
? position.top
: typeof top === "number"
? top
: 0;
? top
: 0;
const resolvedRight =
typeof position?.right === "number" ? Math.max(position.right, 0) : null;
const resolvedLeft =
@@ -108,47 +126,7 @@ const MoreMenu = ({
>
<View style={{ gap: 2 }}>
{inPlaylist && (
<Pressable onPress={removeFromPlaylist}>
<BlurView
intensity={Platform.OS !== "ios" ? 10 : 20}
style={{
paddingHorizontal: 12,
paddingVertical: 10,
backgroundColor: Palette.glass,
borderRadius: 12,
overflow: "hidden",
}}
// experimentalBlurMethod={
// Platform.OS !== "ios" ? "dimezisBlurView" : "none"
// }
>
<Text
style={{
fontSize: 14,
color: Palette.white,
fontFamily: FONT_FAMILY.InterRegular,
}}
>
Supprimer de la playlist
</Text>
</BlurView>
</Pressable>
)}
<Pressable onPress={addToPlaylist}>
<BlurView
intensity={Platform.OS !== "ios" ? 10 : 20}
style={{
paddingHorizontal: 12,
paddingVertical: 10,
backgroundColor: Palette.glass,
borderRadius: 12,
overflow: "hidden",
}}
// experimentalBlurMethod={
// Platform.OS !== "ios" ? "dimezisBlurView" : "none"
// }
>
<MoreBtn onPress={removeFromPlaylist}>
<Text
style={{
fontSize: 14,
@@ -156,14 +134,26 @@ const MoreMenu = ({
fontFamily: FONT_FAMILY.InterRegular,
}}
>
Ajouter à une playlist
Supprimer de la playlist
</Text>
</BlurView>
</Pressable>
</MoreBtn>
)}
<MoreBtn onPress={addToPlaylist}>
<Text
style={{
fontSize: 14,
color: Palette.white,
fontFamily: FONT_FAMILY.InterRegular,
}}
>
Ajouter à une playlist
</Text>
</MoreBtn>
{Array.isArray(extraItems) &&
extraItems.map((item, idx) => (
<Pressable
<MoreBtn
key={idx}
onPress={() => {
try {
@@ -173,30 +163,16 @@ const MoreMenu = ({
}
}}
>
<BlurView
intensity={Platform.OS !== "ios" ? 10 : 20}
<Text
style={{
paddingHorizontal: 12,
paddingVertical: 10,
backgroundColor: Palette.glass,
borderRadius: 12,
overflow: "hidden",
fontSize: 14,
color: Palette.white,
fontFamily: FONT_FAMILY.InterRegular,
}}
// experimentalBlurMethod={
// Platform.OS !== "ios" ? "dimezisBlurView" : "none"
// }
>
<Text
style={{
fontSize: 14,
color: Palette.white,
fontFamily: FONT_FAMILY.InterRegular,
}}
>
{item?.label || "Action"}
</Text>
</BlurView>
</Pressable>
{item?.label || "Action"}
</Text>
</MoreBtn>
))}
</View>
</Animated.View>