Finish wrapping pages
This commit is contained in:
parent
00414df2a3
commit
f889540ba5
|
@ -1,5 +1,6 @@
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import {
|
import {
|
||||||
|
ScrollView,
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
|
@ -142,7 +143,7 @@ const Direct = ({ navigation }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{ state.loaded
|
{ state.loaded
|
||||||
? <>
|
? <ScrollView>
|
||||||
<View style = { [ styles.row, styles.form.container ] }>
|
<View style = { [ styles.row, styles.form.container ] }>
|
||||||
<TextInput
|
<TextInput
|
||||||
placeholder = "Search..."
|
placeholder = "Search..."
|
||||||
|
@ -182,7 +183,7 @@ const Direct = ({ navigation }) => {
|
||||||
: <></>
|
: <></>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
</>
|
</ScrollView>
|
||||||
: <></>
|
: <></>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -110,7 +110,7 @@ const Compose = ({ navigation }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const Conversation = ({ navigation }) => {
|
const Conversation = ({ navigation }) => {
|
||||||
const conversation = navigation.getParam("conversation", {});
|
const conversation = route.params.conversation
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
loaded: false,
|
loaded: false,
|
||||||
newMessage: "",
|
newMessage: "",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
|
import { ScrollView } from "react-native";
|
||||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||||
|
|
||||||
import * as requests from "src/requests";
|
import * as requests from "src/requests";
|
||||||
|
@ -56,7 +57,7 @@ const OlderPosts = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<ScrollView>
|
||||||
{ state.loaded
|
{ state.loaded
|
||||||
? <>
|
? <>
|
||||||
<PagedGrid
|
<PagedGrid
|
||||||
|
@ -66,7 +67,7 @@ const OlderPosts = (props) => {
|
||||||
</>
|
</>
|
||||||
: <></>
|
: <></>
|
||||||
}
|
}
|
||||||
</>
|
</ScrollView>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import {
|
import {
|
||||||
|
ScrollView,
|
||||||
Dimensions,
|
Dimensions,
|
||||||
View,
|
View,
|
||||||
Image,
|
Image,
|
||||||
|
@ -126,62 +127,57 @@ const Publish = ({ navigation }) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return state.loaded
|
||||||
<>
|
? <ScrollView>
|
||||||
{ state.loaded
|
<View style = { styles.preview.container }>
|
||||||
? <>
|
<Image
|
||||||
<View style = { styles.preview.container }>
|
style = {[
|
||||||
<Image
|
styles.preview.image,
|
||||||
style = {[
|
{
|
||||||
styles.preview.image,
|
width: state.image.width,
|
||||||
{
|
height: state.image.height,
|
||||||
width: state.image.width,
|
},
|
||||||
height: state.image.height,
|
]}
|
||||||
},
|
source = { { uri: state.image.data.uri } } />
|
||||||
]}
|
</View>
|
||||||
source = { { uri: state.image.data.uri } } />
|
<View style = { styles.form.container }>
|
||||||
</View>
|
<TextInput
|
||||||
<View style = { styles.form.container }>
|
placeholder = "Caption this post..."
|
||||||
<TextInput
|
value = { state.caption }
|
||||||
placeholder = "Caption this post..."
|
multiline
|
||||||
value = { state.caption }
|
autoFocus
|
||||||
multiline
|
onChangeText = {
|
||||||
autoFocus
|
caption => setState({ ...state, caption })
|
||||||
onChangeText = {
|
}
|
||||||
caption => setState({ ...state, caption })
|
style = { [ styles.form.input, { height: 100, } ] } />
|
||||||
}
|
|
||||||
style = { [ styles.form.input, { height: 100, } ] } />
|
|
||||||
|
|
||||||
<Text style = { styles.form.label }>Visibility</Text>
|
<Text style = { styles.form.label }>Visibility</Text>
|
||||||
<Selector
|
<Selector
|
||||||
visibility = "public"
|
visibility = "public"
|
||||||
active = { state.visibility }
|
active = { state.visibility }
|
||||||
icon = "globe-outline"
|
icon = "globe-outline"
|
||||||
message = "Anyone can see this post" />
|
message = "Anyone can see this post" />
|
||||||
<Selector
|
<Selector
|
||||||
visibility = "unlisted"
|
visibility = "unlisted"
|
||||||
active = { state.visibility }
|
active = { state.visibility }
|
||||||
icon = "lock-open-outline"
|
icon = "lock-open-outline"
|
||||||
message = "Keep this post off public timelines" />
|
message = "Keep this post off public timelines" />
|
||||||
<Selector
|
<Selector
|
||||||
visibility = "private"
|
visibility = "private"
|
||||||
active = { state.visibility }
|
active = { state.visibility }
|
||||||
icon = "lock-closed-outline"
|
icon = "lock-closed-outline"
|
||||||
message = "Only share this with my followers" />
|
message = "Only share this with my followers" />
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress = { _handlePublish }
|
onPress = { _handlePublish }
|
||||||
style = { styles.form.button.container }>
|
style = { styles.form.button.container }>
|
||||||
<Text style = { styles.form.button.label }>
|
<Text style = { styles.form.button.label }>
|
||||||
Publish
|
Publish
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
</>
|
</ScrollView>
|
||||||
: <></>
|
: <></>;
|
||||||
}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {
|
import {
|
||||||
|
ScrollView,
|
||||||
SafeAreaView,
|
SafeAreaView,
|
||||||
View,
|
View,
|
||||||
Image,
|
Image,
|
||||||
|
@ -10,12 +11,12 @@ import {
|
||||||
|
|
||||||
import ModerateMenu from "src/components/moderate-menu.js";
|
import ModerateMenu from "src/components/moderate-menu.js";
|
||||||
|
|
||||||
const UserList = ({navigation}) => {
|
const UserList = ({ navigation, route}) => {
|
||||||
const data = navigation.getParam("data", [])
|
const data = route.params.data;
|
||||||
const context = navigation.getParam("context", "");
|
const context = route.params.context;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<ScrollView>
|
||||||
{
|
{
|
||||||
context ?
|
context ?
|
||||||
<Text style = { styles.context }>
|
<Text style = { styles.context }>
|
||||||
|
@ -55,7 +56,7 @@ const UserList = ({navigation}) => {
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</>
|
</ScrollView>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue