Tune up custom feed uis on web
parent
216d301191
commit
651f3abc1f
|
@ -92,7 +92,7 @@ export function TabBar({
|
||||||
hoverStyle={pal.viewLight}
|
hoverStyle={pal.viewLight}
|
||||||
onPress={() => onPressItem(i)}>
|
onPress={() => onPressItem(i)}>
|
||||||
<Text
|
<Text
|
||||||
type="lg-bold"
|
type={isDesktopWeb ? 'xl-bold' : 'lg-bold'}
|
||||||
testID={testID ? `${testID}-${item}` : undefined}
|
testID={testID ? `${testID}-${item}` : undefined}
|
||||||
style={selected ? pal.text : pal.textLight}>
|
style={selected ? pal.text : pal.textLight}>
|
||||||
{item}
|
{item}
|
||||||
|
@ -112,7 +112,7 @@ const styles = isDesktopWeb
|
||||||
width: 598,
|
width: 598,
|
||||||
},
|
},
|
||||||
contentContainer: {
|
contentContainer: {
|
||||||
columnGap: 14,
|
columnGap: 8,
|
||||||
marginLeft: 14,
|
marginLeft: 14,
|
||||||
paddingRight: 14,
|
paddingRight: 14,
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
|
@ -120,6 +120,7 @@ const styles = isDesktopWeb
|
||||||
item: {
|
item: {
|
||||||
paddingTop: 14,
|
paddingTop: 14,
|
||||||
paddingBottom: 12,
|
paddingBottom: 12,
|
||||||
|
paddingHorizontal: 10,
|
||||||
borderBottomWidth: 3,
|
borderBottomWidth: 3,
|
||||||
borderBottomColor: 'transparent',
|
borderBottomColor: 'transparent',
|
||||||
},
|
},
|
||||||
|
|
|
@ -22,6 +22,8 @@ import {s} from 'lib/styles'
|
||||||
import {useAnalytics} from 'lib/analytics'
|
import {useAnalytics} from 'lib/analytics'
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {usePalette} from 'lib/hooks/usePalette'
|
||||||
import {useTheme} from 'lib/ThemeContext'
|
import {useTheme} from 'lib/ThemeContext'
|
||||||
|
import {isDesktopWeb} from 'platform/detection'
|
||||||
|
import {CogIcon} from 'lib/icons'
|
||||||
|
|
||||||
export const MultiFeed = observer(function Feed({
|
export const MultiFeed = observer(function Feed({
|
||||||
multifeed,
|
multifeed,
|
||||||
|
@ -81,6 +83,18 @@ export const MultiFeed = observer(function Feed({
|
||||||
const renderItem = React.useCallback(
|
const renderItem = React.useCallback(
|
||||||
({item}: {item: MultiFeedItem}) => {
|
({item}: {item: MultiFeedItem}) => {
|
||||||
if (item.type === 'header') {
|
if (item.type === 'header') {
|
||||||
|
if (isDesktopWeb) {
|
||||||
|
return (
|
||||||
|
<View style={[pal.view, pal.border, styles.headerDesktop]}>
|
||||||
|
<Text type="2xl-bold" style={pal.text}>
|
||||||
|
My Feeds
|
||||||
|
</Text>
|
||||||
|
<Link href="/settings/saved-feeds">
|
||||||
|
<CogIcon strokeWidth={1.5} style={pal.icon} size={28} />
|
||||||
|
</Link>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
return <View style={[styles.header, pal.border]} />
|
return <View style={[styles.header, pal.border]} />
|
||||||
} else if (item.type === 'feed-header') {
|
} else if (item.type === 'feed-header') {
|
||||||
return (
|
return (
|
||||||
|
@ -167,7 +181,11 @@ export const MultiFeed = observer(function Feed({
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
contentContainerStyle={s.contentContainer}
|
contentContainerStyle={s.contentContainer}
|
||||||
style={[{paddingTop: headerOffset}, pal.viewLight, styles.container]}
|
style={[
|
||||||
|
{paddingTop: headerOffset},
|
||||||
|
isDesktopWeb ? pal.view : pal.viewLight,
|
||||||
|
styles.container,
|
||||||
|
]}
|
||||||
onScroll={onScroll}
|
onScroll={onScroll}
|
||||||
scrollEventThrottle={scrollEventThrottle}
|
scrollEventThrottle={scrollEventThrottle}
|
||||||
indicatorStyle={theme.colorScheme === 'dark' ? 'white' : 'black'}
|
indicatorStyle={theme.colorScheme === 'dark' ? 'white' : 'black'}
|
||||||
|
@ -192,6 +210,15 @@ const styles = StyleSheet.create({
|
||||||
borderTopWidth: 1,
|
borderTopWidth: 1,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
|
headerDesktop: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
borderBottomWidth: 1,
|
||||||
|
marginBottom: 4,
|
||||||
|
paddingHorizontal: 16,
|
||||||
|
paddingVertical: 8,
|
||||||
|
},
|
||||||
feedHeader: {
|
feedHeader: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
gap: 8,
|
gap: 8,
|
||||||
|
|
|
@ -197,15 +197,6 @@ export const DesktopLeftNav = observer(function DesktopLeftNav() {
|
||||||
}
|
}
|
||||||
label="Search"
|
label="Search"
|
||||||
/>
|
/>
|
||||||
<NavItem
|
|
||||||
href="/notifications"
|
|
||||||
count={store.me.notifications.unreadCountLabel}
|
|
||||||
icon={<BellIcon strokeWidth={2} size={24} style={pal.text} />}
|
|
||||||
iconFilled={
|
|
||||||
<BellIconSolid strokeWidth={1.5} size={24} style={pal.text} />
|
|
||||||
}
|
|
||||||
label="Notifications"
|
|
||||||
/>
|
|
||||||
<NavItem
|
<NavItem
|
||||||
href="/feeds"
|
href="/feeds"
|
||||||
icon={
|
icon={
|
||||||
|
@ -224,6 +215,15 @@ export const DesktopLeftNav = observer(function DesktopLeftNav() {
|
||||||
}
|
}
|
||||||
label="My Feeds"
|
label="My Feeds"
|
||||||
/>
|
/>
|
||||||
|
<NavItem
|
||||||
|
href="/notifications"
|
||||||
|
count={store.me.notifications.unreadCountLabel}
|
||||||
|
icon={<BellIcon strokeWidth={2} size={24} style={pal.text} />}
|
||||||
|
iconFilled={
|
||||||
|
<BellIconSolid strokeWidth={1.5} size={24} style={pal.text} />
|
||||||
|
}
|
||||||
|
label="Notifications"
|
||||||
|
/>
|
||||||
<NavItem
|
<NavItem
|
||||||
href="/moderation"
|
href="/moderation"
|
||||||
icon={
|
icon={
|
||||||
|
|
Loading…
Reference in New Issue