fix(native/blocker): thinner filter overview banner + count badge in header
Match the existing DomainSection visual pattern. One row at the top: title "Eigene Filter", inline Web/Mail legend dots, the X/Y count pill and a small + button — all on the same line. The bar drops below at 5px height (same as DomainSection). The 48×48 floating add button is gone in favour of a 28×28 inline button next to the count pill so the overview reads as a single horizontal strip rather than a tall card.
This commit is contained in:
parent
8a6ab6fe64
commit
26de3dade9
@ -480,79 +480,82 @@ function CustomFilterOverview({
|
|||||||
borderRadius: 16,
|
borderRadius: 16,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: colors.border,
|
borderColor: colors.border,
|
||||||
padding: 14,
|
paddingHorizontal: 14,
|
||||||
flexDirection: 'row',
|
paddingVertical: 10,
|
||||||
alignItems: 'center',
|
gap: 8,
|
||||||
gap: 12,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Left: title + counter + bar */}
|
{/* Top row: title + legend on left, count badge + add button on right */}
|
||||||
<View style={{ flex: 1, gap: 6 }}>
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
||||||
<Text style={{ fontSize: 14, fontFamily: 'Nunito_700Bold', color: colors.text }}>
|
<Text style={{ fontSize: 14, fontFamily: 'Nunito_700Bold', color: colors.text }}>
|
||||||
{t('blocker.custom_filter_overview_title')}
|
{t('blocker.custom_filter_overview_title')}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={{ fontSize: 12, fontFamily: 'Nunito_400Regular', color: colors.textMuted }}>
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
||||||
{t('blocker.custom_filter_overview_count', { count: total, max })}
|
<View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: colors.brandOrange }} />
|
||||||
</Text>
|
<Text style={{ fontSize: 11, fontFamily: 'Nunito_400Regular', color: colors.textMuted }}>
|
||||||
|
{webCount} Web
|
||||||
{/* Split progress bar */}
|
</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
||||||
|
<View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: colors.success }} />
|
||||||
|
<Text style={{ fontSize: 11, fontFamily: 'Nunito_400Regular', color: colors.textMuted }}>
|
||||||
|
{mailCount} Mail
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
height: 7,
|
paddingHorizontal: 8,
|
||||||
|
paddingVertical: 3,
|
||||||
borderRadius: 999,
|
borderRadius: 999,
|
||||||
backgroundColor: colors.surfaceElevated,
|
backgroundColor: colors.surfaceElevated,
|
||||||
flexDirection: 'row',
|
|
||||||
overflow: 'hidden',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Animated.View
|
<Text style={{ fontSize: 11, fontFamily: 'Nunito_600SemiBold', color: colors.textMuted }}>
|
||||||
style={{
|
{t('blocker.custom_filter_overview_count', { count: total, max })}
|
||||||
height: '100%',
|
</Text>
|
||||||
backgroundColor: colors.brandOrange,
|
|
||||||
width: webFillAnim.interpolate({ inputRange: [0, 1], outputRange: ['0%', '100%'] }),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Animated.View
|
|
||||||
style={{
|
|
||||||
height: '100%',
|
|
||||||
backgroundColor: colors.success,
|
|
||||||
width: mailFillAnim.interpolate({ inputRange: [0, 1], outputRange: ['0%', '100%'] }),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* Legend dots */}
|
|
||||||
<View style={{ flexDirection: 'row', gap: 10 }}>
|
|
||||||
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
||||||
<View style={{ width: 8, height: 8, borderRadius: 4, backgroundColor: colors.brandOrange }} />
|
|
||||||
<Text style={{ fontSize: 11, fontFamily: 'Nunito_400Regular', color: colors.textMuted }}>
|
|
||||||
{webCount} Web
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
||||||
<View style={{ width: 8, height: 8, borderRadius: 4, backgroundColor: colors.success }} />
|
|
||||||
<Text style={{ fontSize: 11, fontFamily: 'Nunito_400Regular', color: colors.textMuted }}>
|
|
||||||
{mailCount} Mail
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
</View>
|
</View>
|
||||||
|
<TouchableOpacity
|
||||||
|
onPress={onAddPress}
|
||||||
|
activeOpacity={0.85}
|
||||||
|
style={{
|
||||||
|
width: 28,
|
||||||
|
height: 28,
|
||||||
|
borderRadius: 14,
|
||||||
|
backgroundColor: colors.brandOrange,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Ionicons name="add" size={18} color="#fff" />
|
||||||
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Right: add button */}
|
{/* Split progress bar — same height/pattern as DomainSection */}
|
||||||
<TouchableOpacity
|
<View
|
||||||
onPress={onAddPress}
|
|
||||||
activeOpacity={0.85}
|
|
||||||
style={{
|
style={{
|
||||||
width: 48,
|
height: 5,
|
||||||
height: 48,
|
borderRadius: 3,
|
||||||
borderRadius: 24,
|
backgroundColor: colors.surfaceElevated,
|
||||||
backgroundColor: colors.brandOrange,
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
overflow: 'hidden',
|
||||||
justifyContent: 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Ionicons name="add" size={26} color="#fff" />
|
<Animated.View
|
||||||
</TouchableOpacity>
|
style={{
|
||||||
|
height: '100%',
|
||||||
|
backgroundColor: colors.brandOrange,
|
||||||
|
width: webFillAnim.interpolate({ inputRange: [0, 1], outputRange: ['0%', '100%'] }),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Animated.View
|
||||||
|
style={{
|
||||||
|
height: '100%',
|
||||||
|
backgroundColor: colors.success,
|
||||||
|
width: mailFillAnim.interpolate({ inputRange: [0, 1], outputRange: ['0%', '100%'] }),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user