* Add app review * Use overlay instead of modal * Add fixes for ios * i18n-extract * Add to milliseconds function * Address review feedback * Add try to queryGlobalValue * added app review illustration * add feedback illustration * Add animations and feedback bot message * Restrict reviews to build environment variable * Fix bug with "dont ask anymore" * Add check for only supported servers * Add missing change * Use for await Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local> Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
73 lines
2.3 KiB
TypeScript
73 lines
2.3 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {IntlShape} from 'react-intl';
|
|
import {Alert} from 'react-native';
|
|
import {Navigation, Options} from 'react-native-navigation';
|
|
|
|
import {Screens} from '@constants';
|
|
|
|
export const appearanceControlledScreens = new Set([
|
|
Screens.SERVER,
|
|
Screens.LOGIN,
|
|
Screens.FORGOT_PASSWORD,
|
|
Screens.MFA,
|
|
Screens.SSO,
|
|
Screens.REVIEW_APP,
|
|
Screens.SHARE_FEEDBACK,
|
|
]);
|
|
|
|
export function mergeNavigationOptions(componentId: string, options: Options) {
|
|
Navigation.mergeOptions(componentId, options);
|
|
}
|
|
|
|
export function alertTeamRemove(displayName: string, intl: IntlShape) {
|
|
Alert.alert(
|
|
intl.formatMessage({
|
|
id: 'alert.removed_from_team.title',
|
|
defaultMessage: 'Removed from team',
|
|
}),
|
|
intl.formatMessage({
|
|
id: 'alert.removed_from_team.description',
|
|
defaultMessage: 'You have been removed from team {displayName}.',
|
|
}, {displayName}),
|
|
[{
|
|
style: 'cancel',
|
|
text: intl.formatMessage({id: 'mobile.oauth.something_wrong.okButton', defaultMessage: 'OK'}),
|
|
}],
|
|
);
|
|
}
|
|
|
|
export function alertChannelRemove(displayName: string, intl: IntlShape) {
|
|
Alert.alert(
|
|
intl.formatMessage({
|
|
id: 'alert.removed_from_channel.title',
|
|
defaultMessage: 'Removed from channel',
|
|
}),
|
|
intl.formatMessage({
|
|
id: 'alert.removed_from_channel.description',
|
|
defaultMessage: 'You have been removed from channel {displayName}.',
|
|
}, {displayName}),
|
|
[{
|
|
style: 'cancel',
|
|
text: intl.formatMessage({id: 'mobile.oauth.something_wrong.okButton', defaultMessage: 'OK'}),
|
|
}],
|
|
);
|
|
}
|
|
|
|
export function alertChannelArchived(displayName: string, intl: IntlShape) {
|
|
Alert.alert(
|
|
intl.formatMessage({
|
|
id: 'alert.channel_deleted.title',
|
|
defaultMessage: 'Archived channel',
|
|
}),
|
|
intl.formatMessage({
|
|
id: 'alert.channel_deleted.description',
|
|
defaultMessage: 'The channel {displayName} has been archived.',
|
|
}, {displayName}),
|
|
[{
|
|
style: 'cancel',
|
|
text: intl.formatMessage({id: 'mobile.oauth.something_wrong.okButton', defaultMessage: 'OK'}),
|
|
}],
|
|
);
|
|
}
|