1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Mobile: Share screen: Update headings and labels for consistency with desktop (#10395)

This commit is contained in:
Henry Heino 2024-05-07 02:54:31 -07:00 committed by GitHub
parent 4862c2e8ea
commit f764e76f01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ const AcceptedShareItem: React.FC<Props> = props => {
} catch (error) { } catch (error) {
logger.error('Failed to leave share', error); logger.error('Failed to leave share', error);
await shim.showMessageBox( await shim.showMessageBox(
_('Failed to leave share. Please verify that Joplin is connected to the internet and able to sync.\nError: %s', error), _('Error: %s', error),
{ buttons: [_('OK')] }, { buttons: [_('OK')] },
); );
} finally { } finally {
@ -87,7 +87,7 @@ const AcceptedShareItem: React.FC<Props> = props => {
onPress={onLeaveShare} onPress={onLeaveShare}
disabled={props.processing || leaving || hasLeft} disabled={props.processing || leaving || hasLeft}
loading={leaving || !folderTitle} loading={leaving || !folderTitle}
>{_('Leave share')}</Button> >{_('Leave notebook')}</Button>
</Card.Actions> </Card.Actions>
</Card>; </Card>;
}; };

View File

@ -110,6 +110,6 @@ describe('ShareManager', () => {
render(<ShareManagerWrapper shareInvitations={shares} store={store}/>); render(<ShareManagerWrapper shareInvitations={shares} store={store}/>);
// Should now allow leaving // Should now allow leaving
expect(await screen.findByRole('button', { name: 'Leave share' })).toBeVisible(); expect(await screen.findByRole('button', { name: 'Leave notebook' })).toBeVisible();
}); });
}); });

View File

@ -89,13 +89,13 @@ export const ShareManagerComponent: React.FC<Props> = props => {
const renderNoIncomingShares = () => { const renderNoIncomingShares = () => {
if (incomingShareComponents.length > 0) return null; if (incomingShareComponents.length > 0) return null;
return <Text key='no-shares' style={styles.noSharesText}>{_('No incoming shares')}</Text>; return <Text key='no-shares' style={styles.noSharesText}>{_('No new invitations')}</Text>;
}; };
const renderAcceptedShares = () => { const renderAcceptedShares = () => {
if (acceptedShareComponents.length === 0) return null; if (acceptedShareComponents.length === 0) return null;
return <> return <>
<Text style={styles.header}>{_('Accepted shares')}</Text> <Text style={styles.header}>{_('Accepted invitations')}</Text>
<View style={styles.shareListContainer}> <View style={styles.shareListContainer}>
{acceptedShareComponents} {acceptedShareComponents}
</View> </View>
@ -117,7 +117,7 @@ export const ShareManagerComponent: React.FC<Props> = props => {
} }
testID='refreshControl' testID='refreshControl'
> >
<Text style={styles.header}>{_('Incoming shares')}</Text> <Text style={styles.header}>{_('New invitations')}</Text>
<View style={styles.shareListContainer}> <View style={styles.shareListContainer}>
{renderNoIncomingShares()} {renderNoIncomingShares()}
{incomingShareComponents} {incomingShareComponents}