Even less intrusive status line for posts (#1496)
parent
8f8bed9a1c
commit
95e8a6bf41
|
@ -253,24 +253,34 @@ export const ComposePost = observer(function ComposePost({
|
||||||
<Text style={[pal.link, s.f18]}>Cancel</Text>
|
<Text style={[pal.link, s.f18]}>Cancel</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<View style={s.flex1} />
|
<View style={s.flex1} />
|
||||||
<LabelsBtn labels={labels} onChange={setLabels} hasMedia={hasMedia} />
|
|
||||||
{isProcessing ? (
|
{isProcessing ? (
|
||||||
|
<>
|
||||||
|
<Text style={pal.textLight}>{processingState}</Text>
|
||||||
<View style={styles.postBtn}>
|
<View style={styles.postBtn}>
|
||||||
<ActivityIndicator />
|
<ActivityIndicator />
|
||||||
</View>
|
</View>
|
||||||
) : canPost ? (
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<LabelsBtn
|
||||||
|
labels={labels}
|
||||||
|
onChange={setLabels}
|
||||||
|
hasMedia={hasMedia}
|
||||||
|
/>
|
||||||
|
{canPost ? (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
testID="composerPublishBtn"
|
testID="composerPublishBtn"
|
||||||
onPress={onPressPublish}
|
onPress={onPressPublish}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
accessibilityLabel={replyTo ? 'Publish reply' : 'Publish post'}
|
accessibilityLabel={
|
||||||
accessibilityHint={
|
replyTo ? 'Publish reply' : 'Publish post'
|
||||||
replyTo
|
}
|
||||||
? 'Double tap to publish your reply'
|
accessibilityHint="">
|
||||||
: 'Double tap to publish your post'
|
|
||||||
}>
|
|
||||||
<LinearGradient
|
<LinearGradient
|
||||||
colors={[gradients.blueLight.start, gradients.blueLight.end]}
|
colors={[
|
||||||
|
gradients.blueLight.start,
|
||||||
|
gradients.blueLight.end,
|
||||||
|
]}
|
||||||
start={{x: 0, y: 0}}
|
start={{x: 0, y: 0}}
|
||||||
end={{x: 1, y: 1}}
|
end={{x: 1, y: 1}}
|
||||||
style={styles.postBtn}>
|
style={styles.postBtn}>
|
||||||
|
@ -284,6 +294,8 @@ export const ComposePost = observer(function ComposePost({
|
||||||
<Text style={[pal.textLight, s.f16, s.bold]}>Post</Text>
|
<Text style={[pal.textLight, s.f16, s.bold]}>Post</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
{store.preferences.requireAltTextEnabled && gallery.needsAltText && (
|
{store.preferences.requireAltTextEnabled && gallery.needsAltText && (
|
||||||
<View style={[styles.reminderLine, pal.viewLight]}>
|
<View style={[styles.reminderLine, pal.viewLight]}>
|
||||||
|
@ -369,12 +381,6 @@ export const ComposePost = observer(function ComposePost({
|
||||||
</View>
|
</View>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
{isProcessing ? (
|
|
||||||
<View style={[pal.viewLight, styles.processingLine]}>
|
|
||||||
<ActivityIndicator />
|
|
||||||
<Text style={pal.textLight}>{processingState}</Text>
|
|
||||||
</View>
|
|
||||||
) : undefined}
|
|
||||||
{!extLink && suggestedLinks.size > 0 ? (
|
{!extLink && suggestedLinks.size > 0 ? (
|
||||||
<View style={s.mb5}>
|
<View style={s.mb5}>
|
||||||
{Array.from(suggestedLinks)
|
{Array.from(suggestedLinks)
|
||||||
|
@ -435,13 +441,6 @@ const styles = StyleSheet.create({
|
||||||
paddingHorizontal: 20,
|
paddingHorizontal: 20,
|
||||||
paddingVertical: 6,
|
paddingVertical: 6,
|
||||||
},
|
},
|
||||||
processingLine: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: 8,
|
|
||||||
paddingHorizontal: 26,
|
|
||||||
paddingVertical: 12,
|
|
||||||
},
|
|
||||||
errorLine: {
|
errorLine: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
backgroundColor: colors.red1,
|
backgroundColor: colors.red1,
|
||||||
|
|
Loading…
Reference in New Issue