Added message box
This commit is contained in:
parent
65dc65df47
commit
cd3ff8be76
3 changed files with 25 additions and 7 deletions
|
|
@ -2,10 +2,10 @@
|
|||
// See LICENSE.txt for license information.
|
||||
|
||||
import React from 'react';
|
||||
import {useIntl} from 'react-intl';
|
||||
|
||||
import OptionItem from '@app/components/option_item';
|
||||
import {Screens} from '@app/constants';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import {dismissBottomSheet, goToScreen} from '@app/screens/navigation';
|
||||
import {preventDoubleTap} from '@app/utils/tap';
|
||||
|
||||
|
|
@ -17,12 +17,14 @@ const ConvertToChannelLabel = () => {
|
|||
goToScreen(Screens.CONVERT_GM_TO_CHANNEL, title, {});
|
||||
});
|
||||
|
||||
// LOL: localize this
|
||||
const {formatMessage} = useIntl();
|
||||
const label = formatMessage({id: 'channel_info.convert_gm_to_channel', defaultMessage: 'Convert to a Private Channel'});
|
||||
|
||||
return (
|
||||
<OptionItem
|
||||
action={goToConvertToPrivateChannl}
|
||||
icon='lock-outline'
|
||||
label='Convert to a Private Channel'
|
||||
label={label}
|
||||
type='default'
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,16 +1,31 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import React from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
|
||||
import {ConvertGMToChannelForm} from './convert_gm_to_channel_form';
|
||||
import {Loader} from './loader';
|
||||
|
||||
type Props = {
|
||||
|
||||
}
|
||||
|
||||
const loadingIndicatorTimeout = 1200;
|
||||
|
||||
const ConvertGMToChannel = (props: Props) => {
|
||||
const [loadingAnimationTimeout, setLoadingAnimationTimeout] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => setLoadingAnimationTimeout(true), loadingIndicatorTimeout);
|
||||
}, []);
|
||||
|
||||
const showLoader = !loadingAnimationTimeout;
|
||||
if (showLoader) {
|
||||
return (<Loader/>);
|
||||
}
|
||||
|
||||
return (
|
||||
<Text>{'ConvertGMToChannel component'}</Text>
|
||||
<ConvertGMToChannelForm/>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1074,5 +1074,6 @@
|
|||
"video.download": "Download video",
|
||||
"video.download_description": "This video must be downloaded to play it.",
|
||||
"video.failed_description": "An error occurred while trying to play the video.",
|
||||
"your.servers": "Your servers"
|
||||
"your.servers": "Your servers",
|
||||
"channel_info.convert_gm_to_channel": "Convert to a Private Channel"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue