mirror of
https://github.com/KoalaSat/nostros.git
synced 2024-09-29 06:30:47 +00:00
New UI Logo (#143)
This commit is contained in:
commit
3bfcd2a048
@ -11,16 +11,19 @@ interface LogoProps {
|
||||
|
||||
export const Logo: React.FC<LogoProps> = ({ onlyIcon = false, size = 'small' }) => {
|
||||
const logoHeight = {
|
||||
small: 60,
|
||||
small: 30,
|
||||
medium: 90,
|
||||
large: 120,
|
||||
big: 280,
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<SvgXml height={logoHeight[size]} xml={nostrosLogoSvg} style={styles.logo} />
|
||||
<SvgXml height={logoHeight[size]} xml={nostrosLogoSvg} />
|
||||
{!onlyIcon && (
|
||||
<Text style={styles.text} variant={size === 'small' ? 'headlineSmall' : 'displayMedium'}>
|
||||
<Text
|
||||
style={[styles.text, { paddingLeft: size === 'small' ? 0 : 16 }]}
|
||||
variant={size === 'small' ? 'headlineSmall' : 'displayMedium'}
|
||||
>
|
||||
NOSTROS
|
||||
</Text>
|
||||
)}
|
||||
@ -29,17 +32,12 @@ export const Logo: React.FC<LogoProps> = ({ onlyIcon = false, size = 'small' })
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
logo: {
|
||||
flex: 1,
|
||||
},
|
||||
container: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Iceland-Regular',
|
||||
flex: 2,
|
||||
height: 60,
|
||||
textAlignVertical: 'center',
|
||||
},
|
||||
|
@ -55,7 +55,7 @@ export const MenuItems: React.FC = () => {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Drawer.Section showDivider={false}>
|
||||
<Drawer.Section showDivider={false} style={styles.logo}>
|
||||
<Logo />
|
||||
</Drawer.Section>
|
||||
{nPub && (
|
||||
@ -165,6 +165,10 @@ export const MenuItems: React.FC = () => {
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
logo: {
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'row',
|
||||
},
|
||||
drawerContent: {
|
||||
flex: 1,
|
||||
borderTopRightRadius: 28,
|
||||
|
@ -189,6 +189,7 @@ export const NoteCard: React.FC<NoteCardProps> = ({
|
||||
note && (
|
||||
<Card>
|
||||
<Card.Content style={styles.title}>
|
||||
<TouchableRipple onPress={onPressOptions}>
|
||||
<View style={styles.titleUser}>
|
||||
<View>
|
||||
<NostrosAvatar
|
||||
@ -204,13 +205,19 @@ export const NoteCard: React.FC<NoteCardProps> = ({
|
||||
<Text>{timestamp}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableRipple>
|
||||
<View>
|
||||
<IconButton icon='dots-vertical' size={25} onPress={onPressOptions} />
|
||||
</View>
|
||||
</Card.Content>
|
||||
{getNoteContent()}
|
||||
<Card.Content style={[styles.actions, { borderColor: theme.colors.onSecondary }]}>
|
||||
<Button icon={() => <MaterialCommunityIcons name='message-outline' size={25} />}>
|
||||
<Button
|
||||
icon={() => <MaterialCommunityIcons name='message-outline' size={25} />}
|
||||
onPress={() =>
|
||||
note.kind !== EventKind.recommendServer && push('Note', { noteId: note.id })
|
||||
}
|
||||
>
|
||||
{repliesCount}
|
||||
</Button>
|
||||
<Button
|
||||
|
File diff suppressed because one or more lines are too long
@ -183,6 +183,7 @@ export const NotePage: React.FC<NotePageProps> = ({ route }) => {
|
||||
>
|
||||
<Surface elevation={1}>
|
||||
<View style={styles.title}>
|
||||
<TouchableRipple onPress={openProfileDrawer}>
|
||||
<View style={styles.titleUser}>
|
||||
<View>
|
||||
<NostrosAvatar
|
||||
@ -198,6 +199,7 @@ export const NotePage: React.FC<NotePageProps> = ({ route }) => {
|
||||
<Text>{timestamp}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableRipple>
|
||||
<View>
|
||||
<IconButton icon='dots-vertical' size={25} onPress={openProfileDrawer} />
|
||||
</View>
|
||||
|
@ -321,9 +321,10 @@ export const ProfileConfigPage: React.FC = () => {
|
||||
label={t('profileConfigPage.npub') ?? ''}
|
||||
value={nPub}
|
||||
selectTextOnFocus={true}
|
||||
editable={false}
|
||||
right={
|
||||
<TextInput.Icon
|
||||
icon='content-paste'
|
||||
icon='content-copy'
|
||||
onPress={() => {
|
||||
setShowNotification('npubCopied')
|
||||
Clipboard.setString(nPub ?? '')
|
||||
@ -337,10 +338,11 @@ export const ProfileConfigPage: React.FC = () => {
|
||||
label={t('profileConfigPage.nsec') ?? ''}
|
||||
value={nSec}
|
||||
secureTextEntry={true}
|
||||
editable={false}
|
||||
selectTextOnFocus={true}
|
||||
right={
|
||||
<TextInput.Icon
|
||||
icon='content-paste'
|
||||
icon='content-copy'
|
||||
onPress={() => {
|
||||
setShowNotification('nsecCopied')
|
||||
Clipboard.setString(nSec ?? '')
|
||||
|
@ -58,7 +58,9 @@ export const ProfileConnectPage: React.FC = () => {
|
||||
return (
|
||||
<>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.logo}>
|
||||
<Logo size='medium' />
|
||||
</View>
|
||||
<View style={styles.loginMain}>
|
||||
<TextInput
|
||||
mode='outlined'
|
||||
@ -101,6 +103,11 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
padding: 16,
|
||||
},
|
||||
logo: {
|
||||
justifyContent: 'center',
|
||||
alignContent: 'center',
|
||||
flexDirection: 'row',
|
||||
},
|
||||
loginMain: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
|
@ -39,7 +39,10 @@ export const ProfileLoadPage: React.FC = () => {
|
||||
}, [publicKey])
|
||||
|
||||
useEffect(() => {
|
||||
if (user) setProfileFound(true)
|
||||
if (user) {
|
||||
setProfileFound(true)
|
||||
loadPets()
|
||||
}
|
||||
}, [user])
|
||||
|
||||
const loadMeta: () => void = () => {
|
||||
@ -80,7 +83,9 @@ export const ProfileLoadPage: React.FC = () => {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.info}>
|
||||
<View style={styles.logo}>
|
||||
<Logo onlyIcon size='medium' />
|
||||
</View>
|
||||
<Text variant='titleMedium' style={styles.center}>
|
||||
{profileFound ? t('profileLoadPage.foundProfile') : t('profileLoadPage.searchingProfile')}
|
||||
</Text>
|
||||
@ -120,6 +125,11 @@ const styles = StyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
flex: 1,
|
||||
},
|
||||
logo: {
|
||||
justifyContent: 'center',
|
||||
alignContent: 'center',
|
||||
flexDirection: 'row',
|
||||
},
|
||||
center: {
|
||||
alignContent: 'center',
|
||||
textAlign: 'center',
|
||||
|
Loading…
Reference in New Issue
Block a user