From 280d3e1d6b62bcc63ff595ded5bc521a2c29fecc Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 21 Sep 2021 14:27:12 -0600 Subject: [PATCH 1/3] mute privacy policy link --- src/pages/workspace/WorkspaceInvitePage.js | 37 +++++++++++++++++++--- src/styles/styles.js | 10 ++++++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 6dabe8a95b94..ab2d06f19fbd 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {View, ScrollView} from 'react-native'; +import {View, ScrollView, Pressable, Linking} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; import _ from 'underscore'; @@ -15,13 +15,17 @@ import Button from '../../components/Button'; import compose from '../../libs/compose'; import ONYXKEYS from '../../ONYXKEYS'; import {invite} from '../../libs/actions/Policy'; -import TextLink from '../../components/TextLink'; import Growl from '../../libs/Growl'; import ExpensiTextInput from '../../components/ExpensiTextInput'; import FixedFooter from '../../components/FixedFooter'; import KeyboardAvoidingView from '../../components/KeyboardAvoidingView'; import {isSystemUser} from '../../libs/userUtils'; import {addSMSDomainIfPhoneNumber} from '../../libs/OptionsListUtils'; +import Icon from '../../components/Icon'; +import {NewWindow} from '../../components/Icon/Expensicons'; +import variables from '../../styles/variables'; +import themeColors from '../../styles/themes/default'; +import CONST from '../../CONST'; const propTypes = { ...withLocalizePropTypes, @@ -147,9 +151,32 @@ class WorkspaceInvitePage extends React.Component { placeholder={this.getWelcomeNotePlaceholder()} onChangeText={text => this.setState({welcomeNote: text})} /> - - {this.props.translate('common.privacy')} - + + { + e.preventDefault(); + Linking.openURL(CONST.PRIVACY_URL); + }} + accessibilityRole="link" + href={CONST.PRIVACY_URL} + > + {({hovered, pressed}) => ( + + + {this.props.translate('common.privacyPolicy')} + + + + + + )} + + diff --git a/src/styles/styles.js b/src/styles/styles.js index 6c263bdbd6cd..7fb18a9dec8a 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -50,6 +50,16 @@ const styles = { color: themeColors.linkHover, }, + linkMuted: { + color: themeColors.textSupporting, + textDecorationColor: themeColors.textSupporting, + fontFamily: fontFamily.GTA, + }, + + linkMutedHovered: { + color: themeColors.textMutedReversed, + }, + h1: { color: themeColors.heading, fontFamily: fontFamily.GTA_BOLD, From 7c1c86031160c8705bd4895b5f0e0ea0cef5692f Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 21 Sep 2021 14:35:02 -0600 Subject: [PATCH 2/3] fix style --- src/pages/workspace/WorkspaceInvitePage.js | 54 +++++++++++----------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index ab2d06f19fbd..2770a3f2700a 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -1,6 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {View, ScrollView, Pressable, Linking} from 'react-native'; +import { + View, ScrollView, Pressable, Linking, +} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; import _ from 'underscore'; @@ -151,32 +153,32 @@ class WorkspaceInvitePage extends React.Component { placeholder={this.getWelcomeNotePlaceholder()} onChangeText={text => this.setState({welcomeNote: text})} /> - - { - e.preventDefault(); - Linking.openURL(CONST.PRIVACY_URL); - }} - accessibilityRole="link" - href={CONST.PRIVACY_URL} - > - {({hovered, pressed}) => ( - - - {this.props.translate('common.privacyPolicy')} - - - - + + { + e.preventDefault(); + Linking.openURL(CONST.PRIVACY_URL); + }} + accessibilityRole="link" + href={CONST.PRIVACY_URL} + > + {({hovered, pressed}) => ( + + + {this.props.translate('common.privacyPolicy')} + + + - )} - - + + )} + + From 22b8a0294206b696dd4425daa25b829d2932412f Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 21 Sep 2021 14:45:21 -0600 Subject: [PATCH 3/3] remove icon fill --- src/pages/workspace/WorkspaceInvitePage.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 2770a3f2700a..e0c3d972f485 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -26,7 +26,6 @@ import {addSMSDomainIfPhoneNumber} from '../../libs/OptionsListUtils'; import Icon from '../../components/Icon'; import {NewWindow} from '../../components/Icon/Expensicons'; import variables from '../../styles/variables'; -import themeColors from '../../styles/themes/default'; import CONST from '../../CONST'; const propTypes = { @@ -164,7 +163,13 @@ class WorkspaceInvitePage extends React.Component { > {({hovered, pressed}) => ( - + {this.props.translate('common.privacyPolicy')} @@ -172,7 +177,6 @@ class WorkspaceInvitePage extends React.Component { src={NewWindow} width={variables.iconSizeSmall} height={variables.iconSizeSmall} - fill={(hovered || pressed) ? themeColors.textMutedReversed : themeColors.icon} />