mattermost-mobile-upstream/app/screens/server/header.tsx
Matthew Birtch 8f4c71add2
MM-69550: Update welcome and server onboarding copy for DISC audience (#10046)
* updated welcome screen and server screen language and ui

* Update onboarding welcome and integrations slide copy.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove unused server welcome i18n string.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop 'securely' from server connect headline.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Restore original server screen subtitle copy.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update app/screens/onboarding/slides_data.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Matthew Birtch <2040554+matthewbirtch@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-08-17 17:05:42 -04:00

80 lines
2.3 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {View} from 'react-native';
import FormattedText from '@components/formatted_text';
import {useIsTablet} from '@hooks/device';
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
import {typography} from '@utils/typography';
type Props = {
additionalServer: boolean;
theme: Theme;
};
const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({
textContainer: {
marginBottom: 32,
maxWidth: 600,
width: '100%',
paddingHorizontal: 24,
},
connect: {
letterSpacing: -1,
color: theme.centerChannelColor,
marginTop: 12,
marginBottom: 12,
...typography('Heading', 1000, 'SemiBold'),
lineHeight: 48,
},
connectTablet: {
width: undefined,
},
description: {
color: changeOpacity(theme.centerChannelColor, 0.64),
...typography('Body', 200, 'Regular'),
},
}));
const ServerHeader = ({additionalServer, theme}: Props) => {
const isTablet = useIsTablet();
const styles = getStyleSheet(theme);
let title;
if (additionalServer) {
title = (
<FormattedText
defaultMessage='Add a server'
id='servers.create_button'
style={[styles.connect, isTablet ? styles.connectTablet : undefined]}
testID='server_header.title.add_server'
/>
);
} else {
title = (
<FormattedText
defaultMessage='Connect to your server'
id='mobile.components.select_server_view.msg_connect'
style={[styles.connect, isTablet ? styles.connectTablet : undefined]}
testID='server_header.title.connect_to_server'
/>
);
}
return (
<View style={styles.textContainer}>
{title}
<FormattedText
defaultMessage="A server is your team's communication hub accessed using a unique URL"
id='mobile.components.select_server_view.msg_description'
style={styles.description}
testID='server_header.description'
/>
</View>
);
};
export default ServerHeader;