-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/threads-list-does-not-show-channel-link
- Loading branch information
Showing
74 changed files
with
2,258 additions
and
2,015 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
|
||
import {Button} from '@rneui/base'; | ||
import React from 'react'; | ||
import {Text, View} from 'react-native'; | ||
|
||
import FormattedText from '@components/formatted_text'; | ||
import {buttonBackgroundStyle, buttonTextStyle} from '@utils/buttonStyles'; | ||
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme'; | ||
import {typography} from '@utils/typography'; | ||
|
||
interface AuthErrorProps { | ||
error: string; | ||
retry: () => void; | ||
theme: Theme; | ||
} | ||
|
||
const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => { | ||
return { | ||
button: { | ||
marginTop: 25, | ||
}, | ||
errorText: { | ||
color: changeOpacity(theme.centerChannelColor, 0.72), | ||
textAlign: 'center', | ||
...typography('Body', 200, 'Regular'), | ||
}, | ||
infoContainer: { | ||
alignItems: 'center', | ||
flex: 1, | ||
justifyContent: 'center', | ||
}, | ||
infoText: { | ||
color: changeOpacity(theme.centerChannelColor, 0.72), | ||
...typography('Body', 100, 'Regular'), | ||
}, | ||
infoTitle: { | ||
color: theme.centerChannelColor, | ||
marginBottom: 4, | ||
...typography('Heading', 700), | ||
}, | ||
}; | ||
}); | ||
|
||
const AuthError = ({error, retry, theme}: AuthErrorProps) => { | ||
const style = getStyleSheet(theme); | ||
|
||
return ( | ||
<View style={style.infoContainer}> | ||
<FormattedText | ||
id='mobile.oauth.switch_to_browser.error_title' | ||
testID='mobile.oauth.switch_to_browser.error_title' | ||
defaultMessage='Sign in error' | ||
style={style.infoTitle} | ||
/> | ||
<Text style={style.errorText}> | ||
{`${error}.`} | ||
</Text> | ||
<Button | ||
buttonStyle={[style.button, buttonBackgroundStyle(theme, 'lg', 'primary', 'default')]} | ||
testID='mobile.oauth.try_again' | ||
onPress={retry} | ||
> | ||
<FormattedText | ||
id='mobile.oauth.try_again' | ||
defaultMessage='Try again' | ||
style={buttonTextStyle(theme, 'lg', 'primary', 'default')} | ||
/> | ||
</Button> | ||
</View> | ||
); | ||
}; | ||
|
||
export default AuthError; |
Oops, something went wrong.