Switch to one default avi
parent
5909509bea
commit
e6627183e1
Binary file not shown.
Before Width: | Height: | Size: 70 KiB |
Binary file not shown.
Before Width: | Height: | Size: 42 KiB |
Binary file not shown.
Before Width: | Height: | Size: 61 KiB |
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -6,7 +6,7 @@ import {FontAwesomeIcon, Props} from '@fortawesome/react-native-fontawesome'
|
||||||
import {NotificationsViewItemModel} from '../../../state/models/notifications-view'
|
import {NotificationsViewItemModel} from '../../../state/models/notifications-view'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {ago} from '../../lib/strings'
|
import {ago} from '../../lib/strings'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
import {PostText} from '../post/PostText'
|
import {PostText} from '../post/PostText'
|
||||||
import {Post} from '../post/Post'
|
import {Post} from '../post/Post'
|
||||||
import {Link} from '../util/Link'
|
import {Link} from '../util/Link'
|
||||||
|
@ -62,10 +62,7 @@ export const FeedItem = observer(function FeedItem({
|
||||||
<Link style={styles.outer} href={itemHref} title={itemTitle}>
|
<Link style={styles.outer} href={itemHref} title={itemTitle}>
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<Link style={styles.layoutAvi} href={authorHref} title={authorTitle}>
|
<Link style={styles.layoutAvi} href={authorHref} title={authorTitle}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.author.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</Link>
|
</Link>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<View style={styles.meta}>
|
<View style={styles.meta}>
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
import {Link} from '../util/Link'
|
import {Link} from '../util/Link'
|
||||||
import {useStores} from '../../../state'
|
import {useStores} from '../../../state'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
|
|
||||||
export const PostLikedBy = observer(function PostLikedBy({uri}: {uri: string}) {
|
export const PostLikedBy = observer(function PostLikedBy({uri}: {uri: string}) {
|
||||||
const store = useStores()
|
const store = useStores()
|
||||||
|
@ -78,10 +78,7 @@ const LikedByItem = ({item}: {item: LikedByViewItemModel}) => {
|
||||||
<Link style={styles.outer} href={`/profile/${item.name}`} title={item.name}>
|
<Link style={styles.outer} href={`/profile/${item.name}`} title={item.name}>
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<View style={styles.layoutAvi}>
|
<View style={styles.layoutAvi}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<Text style={[s.f15, s.bold]}>{item.displayName}</Text>
|
<Text style={[s.f15, s.bold]}>{item.displayName}</Text>
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
Image,
|
Image,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
TouchableOpacity,
|
|
||||||
View,
|
View,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {
|
import {
|
||||||
|
@ -16,7 +15,7 @@ import {
|
||||||
import {Link} from '../util/Link'
|
import {Link} from '../util/Link'
|
||||||
import {useStores} from '../../../state'
|
import {useStores} from '../../../state'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
|
|
||||||
export const PostRepostedBy = observer(function PostRepostedBy({
|
export const PostRepostedBy = observer(function PostRepostedBy({
|
||||||
uri,
|
uri,
|
||||||
|
@ -84,10 +83,7 @@ const RepostedByItem = ({item}: {item: RepostedByViewItemModel}) => {
|
||||||
<Link style={styles.outer} href={`/profile/${item.name}`} title={item.name}>
|
<Link style={styles.outer} href={`/profile/${item.name}`} title={item.name}>
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<View style={styles.layoutAvi}>
|
<View style={styles.layoutAvi}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<Text style={[s.f15, s.bold]}>{item.displayName}</Text>
|
<Text style={[s.f15, s.bold]}>{item.displayName}</Text>
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {Link} from '../util/Link'
|
||||||
import {PostDropdownBtn} from '../util/DropdownBtn'
|
import {PostDropdownBtn} from '../util/DropdownBtn'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {ago, pluralize} from '../../lib/strings'
|
import {ago, pluralize} from '../../lib/strings'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
import {useStores} from '../../../state'
|
import {useStores} from '../../../state'
|
||||||
|
|
||||||
export const PostThreadItem = observer(function PostThreadItem({
|
export const PostThreadItem = observer(function PostThreadItem({
|
||||||
|
@ -105,10 +105,7 @@ export const PostThreadItem = observer(function PostThreadItem({
|
||||||
<View style={styles.outer}>
|
<View style={styles.outer}>
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<Link style={styles.layoutAvi} href={authorHref} title={authorTitle}>
|
<Link style={styles.layoutAvi} href={authorHref} title={authorTitle}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.author.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</Link>
|
</Link>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<View style={[styles.meta, s.mt5]}>
|
<View style={[styles.meta, s.mt5]}>
|
||||||
|
@ -190,10 +187,7 @@ export const PostThreadItem = observer(function PostThreadItem({
|
||||||
<Link style={styles.outer} href={itemHref} title={itemTitle}>
|
<Link style={styles.outer} href={itemHref} title={itemTitle}>
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<Link style={styles.layoutAvi} href={authorHref} title={authorTitle}>
|
<Link style={styles.layoutAvi} href={authorHref} title={authorTitle}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.author.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</Link>
|
</Link>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<View style={styles.meta}>
|
<View style={styles.meta}>
|
||||||
|
|
|
@ -17,7 +17,7 @@ import {Link} from '../util/Link'
|
||||||
import {useStores} from '../../../state'
|
import {useStores} from '../../../state'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {ago} from '../../lib/strings'
|
import {ago} from '../../lib/strings'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
|
|
||||||
export const Post = observer(function Post({uri}: {uri: string}) {
|
export const Post = observer(function Post({uri}: {uri: string}) {
|
||||||
const store = useStores()
|
const store = useStores()
|
||||||
|
@ -82,10 +82,7 @@ export const Post = observer(function Post({uri}: {uri: string}) {
|
||||||
<Link style={styles.outer} href={itemHref} title={itemTitle}>
|
<Link style={styles.outer} href={itemHref} title={itemTitle}>
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<Link style={styles.layoutAvi} href={authorHref} title={authorTitle}>
|
<Link style={styles.layoutAvi} href={authorHref} title={authorTitle}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.author.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</Link>
|
</Link>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<View style={styles.meta}>
|
<View style={styles.meta}>
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {Link} from '../util/Link'
|
||||||
import {PostDropdownBtn} from '../util/DropdownBtn'
|
import {PostDropdownBtn} from '../util/DropdownBtn'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {ago} from '../../lib/strings'
|
import {ago} from '../../lib/strings'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
import {useStores} from '../../../state'
|
import {useStores} from '../../../state'
|
||||||
|
|
||||||
export const FeedItem = observer(function FeedItem({
|
export const FeedItem = observer(function FeedItem({
|
||||||
|
@ -59,10 +59,7 @@ export const FeedItem = observer(function FeedItem({
|
||||||
style={styles.layoutAvi}
|
style={styles.layoutAvi}
|
||||||
href={authorHref}
|
href={authorHref}
|
||||||
title={item.author.name}>
|
title={item.author.name}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.author.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</Link>
|
</Link>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<View style={styles.meta}>
|
<View style={styles.meta}>
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
import {Link} from '../util/Link'
|
import {Link} from '../util/Link'
|
||||||
import {useStores} from '../../../state'
|
import {useStores} from '../../../state'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
|
|
||||||
export const ProfileFollowers = observer(function ProfileFollowers({
|
export const ProfileFollowers = observer(function ProfileFollowers({
|
||||||
name,
|
name,
|
||||||
|
@ -81,10 +81,7 @@ const User = ({item}: {item: FollowerItem}) => {
|
||||||
<Link style={styles.outer} href={`/profile/${item.name}`} title={item.name}>
|
<Link style={styles.outer} href={`/profile/${item.name}`} title={item.name}>
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<View style={styles.layoutAvi}>
|
<View style={styles.layoutAvi}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<Text style={[s.f15, s.bold]}>{item.displayName}</Text>
|
<Text style={[s.f15, s.bold]}>{item.displayName}</Text>
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
Image,
|
Image,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
TouchableOpacity,
|
|
||||||
View,
|
View,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {
|
import {
|
||||||
|
@ -16,7 +15,7 @@ import {
|
||||||
import {useStores} from '../../../state'
|
import {useStores} from '../../../state'
|
||||||
import {Link} from '../util/Link'
|
import {Link} from '../util/Link'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
|
|
||||||
export const ProfileFollows = observer(function ProfileFollows({
|
export const ProfileFollows = observer(function ProfileFollows({
|
||||||
name,
|
name,
|
||||||
|
@ -82,10 +81,7 @@ const User = ({item}: {item: FollowItem}) => {
|
||||||
<Link style={styles.outer} href={`/profile/${item.name}`} title={item.name}>
|
<Link style={styles.outer} href={`/profile/${item.name}`} title={item.name}>
|
||||||
<View style={styles.layout}>
|
<View style={styles.layout}>
|
||||||
<View style={styles.layoutAvi}>
|
<View style={styles.layoutAvi}>
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[item.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.layoutContent}>
|
<View style={styles.layoutContent}>
|
||||||
<Text style={[s.f15, s.bold]}>{item.displayName}</Text>
|
<Text style={[s.f15, s.bold]}>{item.displayName}</Text>
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {useStores} from '../../../state'
|
||||||
import {EditProfileModel} from '../../../state/models/shell'
|
import {EditProfileModel} from '../../../state/models/shell'
|
||||||
import {pluralize} from '../../lib/strings'
|
import {pluralize} from '../../lib/strings'
|
||||||
import {s, gradients, colors} from '../../lib/styles'
|
import {s, gradients, colors} from '../../lib/styles'
|
||||||
import {AVIS, BANNER} from '../../lib/assets'
|
import {DEF_AVATER, BANNER} from '../../lib/assets'
|
||||||
import Toast from '../util/Toast'
|
import Toast from '../util/Toast'
|
||||||
import {Link} from '../util/Link'
|
import {Link} from '../util/Link'
|
||||||
|
|
||||||
|
@ -81,10 +81,7 @@ export const ProfileHeader = observer(function ProfileHeader({
|
||||||
return (
|
return (
|
||||||
<View style={styles.outer}>
|
<View style={styles.outer}>
|
||||||
<Image style={styles.banner} source={BANNER} />
|
<Image style={styles.banner} source={BANNER} />
|
||||||
<Image
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
style={styles.avi}
|
|
||||||
source={AVIS[view.name] || AVIS['alice.test']}
|
|
||||||
/>
|
|
||||||
<View style={styles.content}>
|
<View style={styles.content}>
|
||||||
<View style={[styles.displayNameLine]}>
|
<View style={[styles.displayNameLine]}>
|
||||||
<Text style={styles.displayName}>{view.displayName}</Text>
|
<Text style={styles.displayName}>{view.displayName}</Text>
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
import {ImageSourcePropType} from 'react-native'
|
import {ImageSourcePropType} from 'react-native'
|
||||||
|
|
||||||
export const AVIS: Record<string, ImageSourcePropType> = {
|
export const DEF_AVATER: ImageSourcePropType = require('../../../public/img/default-avatar.jpg')
|
||||||
'alice.test': require('../../../public/img/alice.jpg'),
|
|
||||||
'bob.test': require('../../../public/img/bob.jpg'),
|
|
||||||
'carol.test': require('../../../public/img/carla.jpg'),
|
|
||||||
}
|
|
||||||
|
|
||||||
export const BANNER: ImageSourcePropType = require('../../../public/img/banner.jpg')
|
export const BANNER: ImageSourcePropType = require('../../../public/img/banner.jpg')
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
import {ImageSourcePropType} from 'react-native'
|
import {ImageSourcePropType} from 'react-native'
|
||||||
|
|
||||||
export const AVIS: Record<string, ImageSourcePropType> = {
|
export const DEF_AVATER: ImageSourcePropType = {uri: '/img/default-avatar.jpg'}
|
||||||
'alice.test': {uri: '/img/alice.jpg'},
|
|
||||||
'bob.test': {uri: '/img/bob.jpg'},
|
|
||||||
'carol.test': {uri: '/img/carla.jpg'},
|
|
||||||
}
|
|
||||||
|
|
||||||
export const BANNER: ImageSourcePropType = {uri: '/img/banner.jpg'}
|
export const BANNER: ImageSourcePropType = {uri: '/img/banner.jpg'}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import RootSiblings from 'react-native-root-siblings'
|
import RootSiblings from 'react-native-root-siblings'
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
|
|
||||||
export function createAccountsMenu({
|
export function createAccountsMenu({
|
||||||
|
@ -34,7 +34,7 @@ export function createAccountsMenu({
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[styles.menuItem]}
|
style={[styles.menuItem]}
|
||||||
onPress={() => onPressItem(0)}>
|
onPress={() => onPressItem(0)}>
|
||||||
<Image style={styles.avi} source={AVIS['alice.test']} />
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
<Text style={[styles.label, s.bold]}>Alice</Text>
|
<Text style={[styles.label, s.bold]}>Alice</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
|
|
|
@ -33,7 +33,7 @@ import {createBackMenu, createForwardMenu} from './history-menu'
|
||||||
import {createAccountsMenu} from './accounts-menu'
|
import {createAccountsMenu} from './accounts-menu'
|
||||||
import {createLocationMenu} from './location-menu'
|
import {createLocationMenu} from './location-menu'
|
||||||
import {s, colors} from '../../lib/styles'
|
import {s, colors} from '../../lib/styles'
|
||||||
import {AVIS} from '../../lib/assets'
|
import {DEF_AVATER} from '../../lib/assets'
|
||||||
|
|
||||||
const locationIconNeedsNudgeUp = (icon: IconProp) => icon === 'house'
|
const locationIconNeedsNudgeUp = (icon: IconProp) => icon === 'house'
|
||||||
const SWIPE_GESTURE_DIST_TRIGGER = 0.5
|
const SWIPE_GESTURE_DIST_TRIGGER = 0.5
|
||||||
|
@ -186,7 +186,7 @@ export const MobileShell: React.FC = observer(() => {
|
||||||
<View style={styles.outerContainer}>
|
<View style={styles.outerContainer}>
|
||||||
<View style={styles.topBar}>
|
<View style={styles.topBar}>
|
||||||
<TouchableOpacity onPress={onPressAvi}>
|
<TouchableOpacity onPress={onPressAvi}>
|
||||||
<Image style={styles.avi} source={AVIS['alice.test']} />
|
<Image style={styles.avi} source={DEF_AVATER} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<Location
|
<Location
|
||||||
icon={screenRenderDesc.icon}
|
icon={screenRenderDesc.icon}
|
||||||
|
|
Loading…
Reference in New Issue