fix wrong color

This commit is contained in:
GleidsonDaniel 2024-04-01 15:32:42 -03:00
parent b509aac148
commit cfa461ab1d
38 changed files with 51 additions and 51 deletions

View File

@ -126,7 +126,7 @@ const ActionSheetContentWithInputAndSubmit = ({
/>
) : null}
<FooterButtons
confirmBackgroundColor={confirmBackgroundColor || colors.strokeHighlight}
confirmBackgroundColor={confirmBackgroundColor || colors.fontHint}
cancelAction={onCancel || hideActionSheet}
confirmAction={() => onSubmit(inputValue)}
cancelTitle={i18n.t('Cancel')}

View File

@ -36,8 +36,8 @@ const BackgroundContainer = ({ text, loading }: IBackgroundContainer): React.Rea
return (
<View style={styles.container}>
<ImageBackground source={{ uri: `message_empty_${theme}` }} style={styles.image} />
{text && !loading ? <Text style={[styles.text, { color: themes[theme].strokeHighlight }]}>{text}</Text> : null}
{loading ? <ActivityIndicator style={styles.text} color={themes[theme].strokeHighlight} /> : null}
{text && !loading ? <Text style={[styles.text, { color: themes[theme].fontHint }]}>{text}</Text> : null}
{loading ? <ActivityIndicator style={styles.text} color={themes[theme].fontHint} /> : null}
</View>
);
};

View File

@ -42,7 +42,7 @@ const CollapsibleText = ({ msg, style = [], linesToTruncate = 1 }: ICollapsibleT
<Text accessibilityLabel={truncatedText} style={[styles.text, { color: colors.fontDefault }, ...style]}>
{`${truncatedText}... `}
</Text>
<Text onPress={() => setShowTruncated(false)} style={[styles.textInfo, { color: colors.strokeHighlight }]}>
<Text onPress={() => setShowTruncated(false)} style={[styles.textInfo, { color: colors.fontHint }]}>
{I18n.t('Show_more')}
</Text>
</Text>
@ -74,7 +74,7 @@ const CollapsibleText = ({ msg, style = [], linesToTruncate = 1 }: ICollapsibleT
<Text
testID='collapsible-text-show-less'
onPress={() => setShowTruncated(true)}
style={[styles.textInfo, { color: colors.strokeHighlight }]}
style={[styles.textInfo, { color: colors.fontHint }]}
>
{` ${I18n.t('Show_less')}`}
</Text>

View File

@ -20,7 +20,7 @@ const ServicesSeparator = ({ services, separator, collapsed, onPress }: IService
type='secondary'
onPress={onPress}
style={styles.options}
color={colors.strokeHighlight}
color={colors.fontHint}
/>
<OrSeparator theme={theme} />
</>

View File

@ -37,7 +37,7 @@ const TabBarItem = ({ tab, index, goToPage, getCustomEmoji }: ITabBarItem) => {
>
<View style={styles.tabBarItem}>
{tab._id === 'All' ? (
<Text style={[styles.allTabItem, { color: colors.strokeHighlight }]}>{I18n.t('All')}</Text>
<Text style={[styles.allTabItem, { color: colors.fontHint }]}>{I18n.t('All')}</Text>
) : (
<>
<Emoji
@ -46,7 +46,7 @@ const TabBarItem = ({ tab, index, goToPage, getCustomEmoji }: ITabBarItem) => {
customEmojiStyle={styles.customEmojiStyle}
getCustomEmoji={getCustomEmoji}
/>
<Text style={[styles.reactionCount, { color: colors.strokeHighlight }]}>{tab.usernames.length}</Text>
<Text style={[styles.reactionCount, { color: colors.fontHint }]}>{tab.usernames.length}</Text>
</>
)}
</View>

View File

@ -91,7 +91,7 @@ const ThreadDetails = ({ item, user, badgeColor, toggleFollowThread, style }: IT
<CustomIcon
size={24}
name={isFollowing ? 'notification' : 'notification-disabled'}
color={themes[theme].strokeHighlight}
color={themes[theme].fontHint}
/>
</Touchable>
</View>

View File

@ -12,7 +12,7 @@ export default function useStyle() {
fontSize: 12,
marginLeft: 8,
...sharedStyles.textBold,
color: colors.strokeHighlight
color: colors.fontHint
},
iconContainer: {
width: 28,

View File

@ -67,7 +67,7 @@ const UserItem = ({ name, username, onPress, testID, onLongPress, style, icon, i
{name}
</Text>
</View>
{icon ? <CustomIcon name={icon} size={22} color={iconColor || colors.strokeHighlight} style={styles.icon} /> : null}
{icon ? <CustomIcon name={icon} size={22} color={iconColor || colors.fontHint} style={styles.icon} /> : null}
</View>
</Pressable>
);

View File

@ -37,7 +37,7 @@ const Link = React.memo(({ children, link, theme, onLinkPress }: ILink) => {
// if you have a [](https://rocket.chat) render https://rocket.chat
return (
<Text onPress={handlePress} onLongPress={onLongPress} style={{ ...styles.link, color: themes[theme].strokeHighlight }}>
<Text onPress={handlePress} onLongPress={onLongPress} style={{ ...styles.link, color: themes[theme].fontHint }}>
{childLength !== 0 ? children : link}
</Text>
);

View File

@ -26,7 +26,7 @@ const MessageImage = ({ img, theme }: TMessageImage) => (
resizeMode={FastImage.resizeMode.cover}
indicator={Progress.Pie}
indicatorProps={{
color: themes[theme].strokeHighlight
color: themes[theme].fontHint
}}
/>
);

View File

@ -39,7 +39,7 @@ const Link = ({ value }: ILinkProps) => {
};
return (
<Text onPress={handlePress} onLongPress={onLongPress} style={[styles.link, { color: themes[theme].strokeHighlight }]}>
<Text onPress={handlePress} onLongPress={onLongPress} style={[styles.link, { color: themes[theme].fontHint }]}>
{(block => {
const blockArray = Array.isArray(block) ? block : [block];
return blockArray.map(blockInArray => {

View File

@ -10,7 +10,7 @@ const ReadReceipt = React.memo(({ isReadReceiptEnabled, unread }: { isReadReceip
return (
<CustomIcon
name='check'
color={!unread && unread !== null ? colors.badgeBackgroundLevel2 : colors.strokeHighlight}
color={!unread && unread !== null ? colors.badgeBackgroundLevel2 : colors.fontHint}
size={16}
style={styles.rightIcons}
/>

View File

@ -101,7 +101,7 @@ const Title = React.memo(
return (
<View style={styles.authorContainer}>
{attachment.author_name ? (
<Text numberOfLines={1} style={[styles.author, { color: themes[theme].strokeHighlight }]}>
<Text numberOfLines={1} style={[styles.author, { color: themes[theme].fontHint }]}>
{attachment.author_name}
</Text>
) : null}
@ -132,7 +132,7 @@ const Description = React.memo(
return (
<Markdown
msg={text}
style={[{ color: themes[theme].strokeHighlight, fontSize: 14 }]}
style={[{ color: themes[theme].fontHint, fontSize: 14 }]}
username={user.username}
getCustomEmoji={getCustomEmoji}
theme={theme}
@ -253,7 +253,7 @@ const Reply = React.memo(
attachments={attachment.attachments}
getCustomEmoji={getCustomEmoji}
timeFormat={timeFormat}
style={[{ color: themes[theme].strokeHighlight, fontSize: 14, marginBottom: 8 }]}
style={[{ color: themes[theme].fontHint, fontSize: 14, marginBottom: 8 }]}
isReply
showAttachment={showAttachment}
/>

View File

@ -21,7 +21,7 @@ const OmnichannelQueue = ({ queueSize, onPress }: IOmnichannelQueue) => {
<List.Item
title='Omnichannel_queue'
heightContainer={50}
left={() => <List.Icon name='queue' size={24} color={themes[theme].strokeHighlight} />}
left={() => <List.Icon name='queue' size={24} color={themes[theme].fontHint} />}
color={themes[theme].fontDefault}
onPress={queueSize ? onPress : undefined}
styleTitle={styles.titleOmnichannelQueue}
@ -33,7 +33,7 @@ const OmnichannelQueue = ({ queueSize, onPress }: IOmnichannelQueue) => {
<CustomIcon name='chevron-right' style={styles.actionIndicator} color={themes[theme].fontDefault} size={24} />
</>
) : (
<Text style={[styles.emptyText, { color: themes[theme].strokeHighlight }]}>{i18n.t('Empty')}</Text>
<Text style={[styles.emptyText, { color: themes[theme].fontHint }]}>{i18n.t('Empty')}</Text>
)}
</View>
)}

View File

@ -74,7 +74,7 @@ export default function StartACallActionSheet({
)}
</View>
<Button
backgroundColor={calling ? colors.buttonBackgroundSecondaryDisabled : colors.strokeHighlight}
backgroundColor={calling ? colors.buttonBackgroundSecondaryDisabled : colors.fontHint}
color={calling ? colors.strokeDark : colors.surfaceLight}
onPress={() => {
if (calling) {

View File

@ -162,7 +162,7 @@ const AddExistingChannelView = () => {
onPress={() => toggleChannel(item.rid)}
testID={`add-existing-channel-view-item-${item.name}`}
left={() => <List.Icon name={icon} />}
right={() => (isChecked(item.rid) ? <List.Icon name='check' color={colors.strokeHighlight} /> : null)}
right={() => (isChecked(item.rid) ? <List.Icon name='check' color={colors.fontHint} /> : null)}
/>
);
}}

View File

@ -125,11 +125,11 @@ const CannedResponseDetail = ({ navigation, route }: ICannedResponseDetailProps)
{cannedResponse?.tags?.length > 0 ? (
cannedResponse.tags.map(t => (
<View style={[styles.cannedTagWrap, { backgroundColor: themes[theme].strokeExtraLight }]}>
<Text style={[styles.cannedTag, { color: themes[theme].strokeHighlight }]}>{t}</Text>
<Text style={[styles.cannedTag, { color: themes[theme].fontHint }]}>{t}</Text>
</View>
))
) : (
<Text style={[styles.cannedText, { color: themes[theme].strokeHighlight }]}>-</Text>
<Text style={[styles.cannedText, { color: themes[theme].fontHint }]}>-</Text>
)}
</View>
</View>

View File

@ -32,7 +32,7 @@ const CannedResponseItem = ({
<View style={styles.cannedRow}>
<View style={styles.cannedWrapShortcutScope}>
<Text style={[styles.cannedShortcut, { color: themes[theme].fontTitlesLabels }]}>!{shortcut}</Text>
<Text style={[styles.cannedScope, { color: themes[theme].strokeHighlight }]}>{scope}</Text>
<Text style={[styles.cannedScope, { color: themes[theme].fontHint }]}>{scope}</Text>
</View>
<Button
@ -44,14 +44,14 @@ const CannedResponseItem = ({
/>
</View>
<Text ellipsizeMode='tail' numberOfLines={2} style={[styles.cannedText, { color: themes[theme].strokeHighlight }]}>
<Text ellipsizeMode='tail' numberOfLines={2} style={[styles.cannedText, { color: themes[theme].fontHint }]}>
{text}
</Text>
<View style={styles.cannedTagContainer}>
{tags?.length > 0
? tags.map(t => (
<View style={[styles.cannedTagWrap, { backgroundColor: themes[theme].strokeExtraLight }]}>
<Text style={[styles.cannedTag, { color: themes[theme].strokeHighlight }]}>{t}</Text>
<Text style={[styles.cannedTag, { color: themes[theme].fontHint }]}>{t}</Text>
</View>
))
: null}

View File

@ -97,7 +97,7 @@ const DirectoryOptions = ({
style={[styles.dropdownItemIcon, styles.inverted]}
size={22}
name='chevron-down'
color={colors.strokeHighlight}
color={colors.fontHint}
/>
</View>
</Touch>

View File

@ -227,7 +227,7 @@ class DirectoryView extends React.Component<IDirectoryViewProps, IDirectoryViewS
<CustomIcon
name='chevron-down'
size={20}
color={themes[theme].strokeHighlight}
color={themes[theme].fontHint}
style={styles.toggleDropdownArrow}
/>
</View>

View File

@ -95,7 +95,7 @@ const DisplayPrefsView = (): React.ReactElement => {
);
const renderRadio = (value: boolean) => (
<RadioButton selected={!!value} color={value ? colors.strokeHighlight : colors.fontSecondaryInfo} size={ICON_SIZE} />
<RadioButton selected={!!value} color={value ? colors.fontHint : colors.fontSecondaryInfo} size={ICON_SIZE} />
);
return (

View File

@ -46,7 +46,7 @@ const ForwardMessageView = () => {
<HeaderButton.Container>
<HeaderButton.Item
title={I18n.t('Send')}
color={isSendButtonEnabled ? colors.strokeHighlight : colors.fontSecondaryInfo}
color={isSendButtonEnabled ? colors.fontHint : colors.fontSecondaryInfo}
disabled={!isSendButtonEnabled}
onPress={handlePostMessage}
testID='forward-message-view-send'

View File

@ -70,7 +70,7 @@ const Picker = ({ param, first }: { param: 'days' | 'maxUses'; first: string }):
dispatch(inviteLinksSetParams(params));
};
const textInputStyle: TextInputProps = { style: { ...styles.pickerText, color: colors.strokeHighlight } };
const textInputStyle: TextInputProps = { style: { ...styles.pickerText, color: colors.fontHint } };
const firstEl = [
{
label: I18n.t(first),

View File

@ -152,7 +152,7 @@ const UserForm = () => {
<View style={styles.bottomContainer}>
<Text style={[styles.bottomContainerText, { color: colors.fontSecondaryInfo }]}>{I18n.t('Dont_Have_An_Account')}</Text>
<Text
style={[styles.bottomContainerTextBold, { color: colors.strokeHighlight }]}
style={[styles.bottomContainerTextBold, { color: colors.fontHint }]}
onPress={register}
testID='login-view-register'
>

View File

@ -61,7 +61,7 @@ const ListPicker = ({
title={title}
onPress={() => showActionSheet({ options: getOptions() })}
right={() => (
<Text style={[styles.title, { color: colors.strokeHighlight }]}>
<Text style={[styles.title, { color: colors.fontHint }]}>
{/* when picking an option the label should be Never
but when showing among the other settings the label should be Off */}
{option.label === 'Never' ? I18n.t('Off') : I18n.t(option.label)}

View File

@ -66,7 +66,7 @@ const RenderListPicker = ({
testID={testID}
onPress={() => showActionSheet({ options })}
right={() => (
<Text style={[{ ...sharedStyles.textRegular, fontSize: 16 }, { color: colors.strokeHighlight }]}>
<Text style={[{ ...sharedStyles.textRegular, fontSize: 16 }, { color: colors.fontHint }]}>
{option?.label ? I18n.t(option?.label, { defaultValue: option?.label, second: option?.second }) : option?.label}
</Text>
)}

View File

@ -109,7 +109,7 @@ class ReadReceiptView extends React.Component<IReadReceiptViewProps, IReadReceip
style={[styles.listEmptyContainer, { backgroundColor: themes[theme].surfaceTint }]}
testID='read-receipt-view'
>
<Text style={[styles.emptyText, { color: themes[theme].strokeHighlight }]}>{I18n.t('No_Read_Receipts')}</Text>
<Text style={[styles.emptyText, { color: themes[theme].fontHint }]}>{I18n.t('No_Read_Receipts')}</Text>
</View>
);
};

View File

@ -313,7 +313,7 @@ class RegisterView extends React.Component<IProps, any> {
<Text style={[styles.bottomContainerText, { color: themes[theme].fontSecondaryInfo }]}>
{I18n.t('Do_you_have_an_account')}
</Text>
<Text style={[styles.bottomContainerTextBold, { color: themes[theme].strokeHighlight }]} onPress={this.login}>
<Text style={[styles.bottomContainerTextBold, { color: themes[theme].fontHint }]} onPress={this.login}>
{I18n.t('Login')}
</Text>
</View>

View File

@ -26,7 +26,7 @@ function BaseButton({
enabled?: boolean;
}): React.ReactElement | null {
const { colors } = useTheme();
const color = danger ? colors.buttonBackgroundDangerDefault : colors.strokeHighlight;
const color = danger ? colors.buttonBackgroundDangerDefault : colors.fontHint;
if (showIcon)
return (

View File

@ -62,7 +62,7 @@ const RightIcon = ({ check, label }: { check: boolean; label: string }) => {
testID={check ? `action-sheet-set-${label}-checked` : `action-sheet-set-${label}-unchecked`}
name={check ? 'checkbox-checked' : 'checkbox-unchecked'}
size={20}
color={check ? colors.strokeHighlight : undefined}
color={check ? colors.fontHint : undefined}
/>
);
};

View File

@ -38,7 +38,7 @@ const NavBottomFAB = memo(
<View style={[styles.container, positionStyle]} testID='nav-jump-to-bottom'>
<Touch onPress={() => onPress()} style={[styles.button, { backgroundColor: colors.surfaceRoom }]}>
<View style={[styles.content, { borderColor: colors.strokeLight }]}>
<CustomIcon name='chevron-down' color={colors.strokeHighlight} size={36} />
<CustomIcon name='chevron-down' color={colors.fontHint} size={36} />
</View>
</Touch>
</View>

View File

@ -1370,7 +1370,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
<Text style={[styles.previewMode, { color: themes[theme].fontTitlesLabels }]}>{I18n.t('Chat_is_on_hold')}</Text>
<Touch
onPress={this.resumeRoom}
style={[styles.joinRoomButton, { backgroundColor: themes[theme].strokeHighlight }]}
style={[styles.joinRoomButton, { backgroundColor: themes[theme].fontHint }]}
enabled={!loading}
>
<Text style={[styles.joinRoomText, { color: themes[theme].fontWhite }]} testID='room-view-chat-on-hold-button'>
@ -1386,7 +1386,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
<Text style={[styles.previewMode, { color: themes[theme].fontTitlesLabels }]}>{I18n.t('You_are_in_preview_mode')}</Text>
<Touch
onPress={this.joinRoom}
style={[styles.joinRoomButton, { backgroundColor: themes[theme].strokeHighlight }]}
style={[styles.joinRoomButton, { backgroundColor: themes[theme].fontHint }]}
enabled={!loading}
>
<Text style={[styles.joinRoomText, { color: themes[theme].fontWhite }]} testID='room-view-join-button'>

View File

@ -153,7 +153,7 @@ class SelectListView extends React.Component<ISelectListViewProps, ISelectListVi
<RadioButton
testID={selected ? `radio-button-selected-${item.name}` : `radio-button-unselected-${item.name}`}
selected={selected.includes(item.rid)}
color={themes[theme].strokeHighlight}
color={themes[theme].fontHint}
size={ICON_SIZE}
/>
);
@ -162,7 +162,7 @@ class SelectListView extends React.Component<ISelectListViewProps, ISelectListVi
<List.Icon
testID={checked ? `${item.name}-checked` : `${item.name}-unchecked`}
name={checked}
color={themes[theme].strokeHighlight}
color={themes[theme].fontHint}
/>
) : null;

View File

@ -45,7 +45,7 @@ const Header = ({
<SearchBox onChangeText={(text: string) => onChangeText(text)} testID='select-users-view-search' />
{users.length === 0 ? null : (
<View>
<Text style={[styles.selectedText, { color: themes[theme].strokeHighlight }]}>
<Text style={[styles.selectedText, { color: themes[theme].fontHint }]}>
{I18n.t('N_Selected_members', { n: users.length })}
</Text>
<FlatList

View File

@ -165,7 +165,7 @@ const SelectedUsersView = () => {
onPress={() => _onPressItem(item)}
testID={`select-users-view-item-${item.name}`}
icon={isChecked(username) ? 'checkbox-checked' : 'checkbox-unchecked'}
iconColor={isChecked(username) ? colors.strokeHighlight : colors.strokeLight}
iconColor={isChecked(username) ? colors.fontHint : colors.strokeLight}
/>
);
}}

View File

@ -436,7 +436,7 @@ class TeamChannelsView extends React.Component<ITeamChannelsViewProps, ITeamChan
} = this.props;
const isAutoJoinChecked = item.teamDefault;
const autoJoinIcon = isAutoJoinChecked ? 'checkbox-checked' : 'checkbox-unchecked';
const autoJoinIconColor = isAutoJoinChecked ? themes[theme].strokeHighlight : themes[theme].fontDefault;
const autoJoinIconColor = isAutoJoinChecked ? themes[theme].fontHint : themes[theme].fontDefault;
const options: TActionSheetOptionsItem[] = [];

View File

@ -45,7 +45,7 @@ const ListPicker = ({
hideActionSheet();
onChangeValue({ [preference]: i.value.toString() });
},
right: option?.value === i.value ? () => <CustomIcon name={'check'} size={20} color={colors.strokeHighlight} /> : undefined
right: option?.value === i.value ? () => <CustomIcon name={'check'} size={20} color={colors.fontHint} /> : undefined
}));
return (
@ -54,7 +54,7 @@ const ListPicker = ({
testID={testID}
onPress={() => showActionSheet({ options: getOptions() })}
right={() => (
<Text style={[styles.pickerText, { color: colors.strokeHighlight }]}>
<Text style={[styles.pickerText, { color: colors.fontHint }]}>
{option?.label ? I18n.t(option?.label, { defaultValue: option?.label }) : option?.label}
</Text>
)}

View File

@ -61,7 +61,7 @@ const ListPicker = ({
onChangeValue({ [preference]: i.value.toString() }, () => setOption(option));
setOption(i);
},
right: option?.value === i.value ? () => <CustomIcon name={'check'} size={20} color={colors.strokeHighlight} /> : undefined
right: option?.value === i.value ? () => <CustomIcon name={'check'} size={20} color={colors.fontHint} /> : undefined
}));
return (
@ -70,7 +70,7 @@ const ListPicker = ({
testID={testID}
onPress={() => showActionSheet({ options: getOptions() })}
right={() => (
<Text style={[styles.title, { color: colors.strokeHighlight }]}>
<Text style={[styles.title, { color: colors.fontHint }]}>
{option?.label ? I18n.t(option?.label, { defaultValue: option?.label }) : option?.label}
</Text>
)}