You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Desktop, Mobile: Display a message when Joplin Cloud user don't have access to email to note feature (#10322)
This commit is contained in:
@@ -345,6 +345,7 @@ class ConfigScreenComponent extends BaseScreenComponent<ConfigScreenProps, Confi
|
||||
description={options?.description}
|
||||
statusComponent={options?.statusComp}
|
||||
styles={this.styles()}
|
||||
disabled={options?.disabled}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -513,18 +514,27 @@ class ConfigScreenComponent extends BaseScreenComponent<ConfigScreenProps, Confi
|
||||
if (section.name === 'joplinCloud') {
|
||||
const label = _('Email to note');
|
||||
const description = _('Any email sent to this address will be converted into a note and added to your collection. The note will be saved into the Inbox notebook');
|
||||
const isEmailToNoteAvailableInAccount = this.props.settings['sync.10.accountType'] !== 1;
|
||||
const inboxEmailValue = isEmailToNoteAvailableInAccount ? this.props.settings['sync.10.inboxEmail'] : '-';
|
||||
addSettingComponent(
|
||||
<View key="joplinCloud">
|
||||
<View style={this.styles().styleSheet.settingContainerNoBottomBorder}>
|
||||
<Text style={this.styles().styleSheet.settingText}>{label}</Text>
|
||||
<Text style={this.styles().styleSheet.settingTextEmphasis}>{this.props.settings['sync.10.inboxEmail']}</Text>
|
||||
<Text style={this.styles().styleSheet.settingTextEmphasis}>{inboxEmailValue}</Text>
|
||||
</View>
|
||||
{
|
||||
!isEmailToNoteAvailableInAccount && (
|
||||
<View style={this.styles().styleSheet.settingContainerNoBottomBorder}>
|
||||
<Text style={this.styles().styleSheet.descriptionAlert}>{_('Your account doesn\'t have access to this feature')}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
{
|
||||
this.renderButton(
|
||||
'sync.10.inboxEmail',
|
||||
_('Copy to clipboard'),
|
||||
() => Clipboard.setString(this.props.settings['sync.10.inboxEmail']),
|
||||
{ description },
|
||||
() => isEmailToNoteAvailableInAccount && Clipboard.setString(this.props.settings['sync.10.inboxEmail']),
|
||||
{ description, disabled: !isEmailToNoteAvailableInAccount },
|
||||
)
|
||||
}
|
||||
</View>,
|
||||
|
||||
Reference in New Issue
Block a user