Clean up local config (#6804)

This commit is contained in:
Elias Nahum 2022-11-30 18:20:29 +02:00 committed by GitHub
parent 0f8798ca55
commit 7a478ec11d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 37 deletions

View file

@ -118,15 +118,11 @@ const About = ({config, license}: AboutProps) => {
}, []);
const handleAboutTeam = useCallback(preventDoubleTap(() => {
return openURL(Config.AboutTeamURL);
}), []);
const handleAboutEnterprise = useCallback(preventDoubleTap(() => {
return openURL(Config.AboutEnterpriseURL);
return openURL(Config.WebsiteURL);
}), []);
const handlePlatformNotice = useCallback(preventDoubleTap(() => {
return openURL(Config.PlatformNoticeURL);
return openURL(Config.ServerNoticeURL);
}), []);
const handleMobileNotice = useCallback(preventDoubleTap(() => {
@ -256,8 +252,7 @@ const About = ({config, license}: AboutProps) => {
)}
<LearnMore
config={config}
onHandleAboutEnterprise={handleAboutEnterprise}
onHandleAboutTeam={handleAboutTeam}
onPress={handleAboutTeam}
/>
{!MATTERMOST_BUNDLE_IDS.includes(DeviceInfo.getBundleId()) &&
<FormattedText

View file

@ -31,24 +31,20 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
type LearnMoreProps = {
config: ClientConfig;
onHandleAboutEnterprise: () => void;
onHandleAboutTeam: () => void;
onPress: () => void;
};
const LearnMore = ({config, onHandleAboutEnterprise, onHandleAboutTeam}: LearnMoreProps) => {
const LearnMore = ({config, onPress}: LearnMoreProps) => {
const theme = useTheme();
const style = getStyleSheet(theme);
let id = t('about.teamEditionLearn');
let defaultMessage = 'Join the Mattermost community at ';
let onPress = onHandleAboutTeam;
let url = Config.TeamEditionLearnURL;
const url = Config.WebsiteURL;
if (config.BuildEnterpriseReady === 'true') {
id = t('about.enterpriseEditionLearn');
defaultMessage = 'Learn more about Enterprise Edition at ';
onPress = onHandleAboutEnterprise;
url = Config.EELearnURL;
}
return (

View file

@ -2,14 +2,12 @@
"DefaultServerUrl": "",
"DefaultServerName": "",
"TestServerUrl": "http://localhost:8065",
"DefaultTheme": "default",
"ShowErrorsList": false,
"EELearnURL": "about.mattermost.com",
"TeamEditionLearnURL": "mattermost.org",
"AboutTeamURL": "http://www.mattermost.org/",
"AboutEnterpriseURL": "http://about.mattermost.com/",
"PlatformNoticeURL": "https://about.mattermost.com/platform-notice-txt/",
"MobileNoticeURL": "https://about.mattermost.com/mobile-notice-txt/",
"AutoSelectServerUrl": false,
"WebsiteURL": "https://mattermost.com",
"ServerNoticeURL": "https://github.com/mattermost/mattermost-server/blob/master/NOTICE.txt",
"MobileNoticeURL": "https://github.com/mattermost/mattermost-mobile/blob/master/NOTICE.txt",
"RudderApiKey": "",
"SentryEnabled": false,
@ -23,19 +21,9 @@
}
},
"ExperimentalNormalizeMarkdownLinks": false,
"AutoSelectServerUrl": false,
"EnableMobileClientUpgrade": false,
"EnableMobileClientUpgradeUserSetting": false,
"EnableForceMobileClientUpgrade": false,
"MobileClientUpgradeAndroidApkLink": "https://about.mattermost.com/mattermost-android-app/",
"MobileClientUpgradeIosIpaLink": "https://about.mattermost.com/mattermost-ios-app/",
"ShowSentryDebugOptions": false,
"CustomRequestHeaders": {},
"ShowReview": false,
"ShowOnboarding": false
"ShowOnboarding": false,
"ExperimentalNormalizeMarkdownLinks": false,
"CustomRequestHeaders": {}
}