Skip to content

Commit

Permalink
update tweets to X posts
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Jan 11, 2024
1 parent 1a74b02 commit ac7ea5f
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ const MediaLinksConfig: FunctionComponent<Props> = ({ disabled }) => {
>
<Localized id="configure-general-embedLinks-desc">
<FormFieldDescription>
Allow commenters to add a YouTube video, Tweet or GIF from GIPHY's
Allow commenters to add a YouTube video, X post or GIF from GIPHY's
library to the end of their comment
</FormFieldDescription>
</Localized>
<FormField>
<Localized id="configure-general-embedLinks-enableTwitterEmbeds">
<Label component="legend">Allow Twitter media</Label>
<Label component="legend">Allow X post embeds</Label>
</Localized>
<OnOffField
name="media.twitter.enabled"
Expand All @@ -90,7 +90,7 @@ const MediaLinksConfig: FunctionComponent<Props> = ({ disabled }) => {

<FormField>
<Localized id="configure-general-embedLinks-enableYouTubeEmbeds">
<Label component="legend">Enable YouTube media</Label>
<Label component="legend">Allow YouTube embeds</Label>
</Localized>
<OnOffField
name="media.youtube.enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const MediaConfirmPrompt: FunctionComponent<Props> = ({
{media.type === "twitter" && (
<Localized id="comments-postComment-confirmMedia-twitter">
<p className={styles.prompt}>
Add this tweet to the end of your comment?
Add this post to the end of your comment?
</p>
</Localized>
)}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import React, { FunctionComponent } from "react";
import { MediaLink } from "coral-common/common/lib/helpers/findMediaLinks";
import {
ImageFileLandscapeIcon,
SocialMediaTwitterIcon,
SvgIcon,
VideoPlayerIcon,
XLogoTwitterIcon,
} from "coral-ui/components/icons";
import styles from "./MediaConfirmationIcon.css";

interface Props {
media: MediaLink;
Expand All @@ -19,11 +18,7 @@ const MediaConfirmationIcon: FunctionComponent<Props> = ({ media }) => {
{media.type === "external" && <SvgIcon Icon={ImageFileLandscapeIcon} />}
{media.type === "youtube" && <SvgIcon Icon={VideoPlayerIcon} />}
{media.type === "twitter" && (
<SvgIcon
className={styles.twitterIcon}
filled="currentColor"
Icon={SocialMediaTwitterIcon}
/>
<SvgIcon size="xs" filled="currentColor" Icon={XLogoTwitterIcon} />
)}
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ const MediaSectionContainer: FunctionComponent<Props> = ({
>
<ButtonSvgIcon Icon={AddIcon} size="xxs" className={styles.icon} />
{media.__typename === "TwitterMedia" && (
<Localized id="comments-embedLinks-show-twitter">
Show Tweet
</Localized>
<Localized id="comments-embedLinks-show-twitter">Show post</Localized>
)}
{media.__typename === "YouTubeMedia" && (
<Localized id="comments-embedLinks-show-youtube">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const MediaSettingsContainer: FunctionComponent<Props> = ({
variant="streamBlue"
>
<Localized id="profile-preferences-mediaPreferences-alwaysShow">
<div>Always show GIFs, Tweets, YouTube, etc.</div>
<div>Always show GIFs, X posts, YouTube, etc.</div>
</Localized>
</CheckBox>
)}
Expand Down

This file was deleted.

29 changes: 29 additions & 0 deletions client/src/core/client/ui/components/icons/XLogoTwitterIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React, { FunctionComponent } from "react";

const XLogoTwitterIcon: FunctionComponent = () => {
// https://www.streamlinehq.com/icons/streamline-regular/logos/social-medias/x-logo-twitter
return (
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<path
stroke="currentcolor"
strokeLinecap="round"
strokeLinejoin="round"
d="M17.647 23.173 0.75 0.75l5.60304 0L23.25 23.173h-5.603Z"
></path>
<path
stroke="currentcolor"
strokeLinecap="round"
strokeLinejoin="round"
d="m22.4548 0.75 -8.9068 9.5514"
></path>
<path
stroke="currentcolor"
strokeLinecap="round"
strokeLinejoin="round"
d="m1.54507 23.173 8.90013 -9.5442"
></path>
</svg>
);
};

export default XLogoTwitterIcon;
2 changes: 1 addition & 1 deletion client/src/core/client/ui/components/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export { default as SingleNeutralActionsAddIcon } from "./SingleNeutralActionsAd
export { default as SingleNeutralActionsBlockIcon } from "./SingleNeutralActionsBlockIcon";
export { default as SingleNeutralCircleIcon } from "./SingleNeutralCircleIcon";
export { default as SingleNeutralProfilePictureIcon } from "./SingleNeutralProfilePictureIcon";
export { default as SocialMediaTwitterIcon } from "./SocialMediaTwitterIcon";
export { default as StopwatchIcon } from "./StopwatchIcon";
export { default as SvgIcon } from "./SvgIcon";
export { default as TextBoldIcon } from "./TextBoldIcon";
Expand All @@ -88,3 +87,4 @@ export { default as TradingConversationIcon } from "./TradingConversationIcon";
export { default as VideoPlayerIcon } from "./VideoPlayerIcon";
export { default as ViewIcon } from "./ViewIcon";
export { default as ViewOffIcon } from "./ViewOffIcon";
export { default as XLogoTwitterIcon } from "./XLogoTwitterIcon";
4 changes: 2 additions & 2 deletions locales/en-US/admin.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ configure-general-sitewideCommenting-messageExplanation =
#### Embed Links
configure-general-embedLinks-title = Embedded media
configure-general-embedLinks-desc = Allow commenters to add a YouTube video, Tweet or GIF from GIPHY's library to the end of their comment
configure-general-embedLinks-enableTwitterEmbeds = Allow Twitter embeds
configure-general-embedLinks-desc = Allow commenters to add a YouTube video, X post or GIF from GIPHY's library to the end of their comment
configure-general-embedLinks-enableTwitterEmbeds = Allow X post embeds
configure-general-embedLinks-enableYouTubeEmbeds = Allow YouTube embeds
configure-general-embedLinks-enableGiphyEmbeds = Allow GIFs from GIPHY
configure-general-embedLinks-enableExternalEmbeds = Enable external media
Expand Down
10 changes: 5 additions & 5 deletions locales/en-US/stream.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ comments-postComment-pasteImage = Paste image URL
comments-postComment-insertImage = Insert
comments-postComment-confirmMedia-youtube = Add this YouTube video to the end of your comment?
comments-postComment-confirmMedia-twitter = Add this Tweet to the end of your comment?
comments-postComment-confirmMedia-twitter = Add this post to the end of your comment?
comments-postComment-confirmMedia-cancel = Cancel
comments-postComment-confirmMedia-add-tweet = Add Tweet
comments-postComment-confirmMedia-add-tweet = Add post
comments-postComment-confirmMedia-add-video = Add video
comments-postComment-confirmMedia-remove = Remove
comments-commentForm-gifPreview-remove = Remove
Expand Down Expand Up @@ -463,8 +463,8 @@ comments-embedLinks-hide-giphy = Hide GIF
comments-embedLinks-show-youtube = Show video
comments-embedLinks-hide-youtube = Hide video
comments-embedLinks-show-twitter = Show Tweet
comments-embedLinks-hide-twitter = Hide Tweet
comments-embedLinks-show-twitter = Show post
comments-embedLinks-hide-twitter = Hide post
comments-embedLinks-show-external = Show image
comments-embedLinks-hide-external = Hide image
Expand Down Expand Up @@ -560,7 +560,7 @@ profile-commentHistory-archived-thisIsAllYourComments =
### Preferences

profile-preferences-mediaPreferences = Media Preferences
profile-preferences-mediaPreferences-alwaysShow = Always show GIFs, Tweets, YouTube, etc.
profile-preferences-mediaPreferences-alwaysShow = Always show GIFs, X posts, YouTube, etc.
profile-preferences-mediaPreferences-thisMayMake = This may make the comments slower to load
profile-preferences-mediaPreferences-update = Update
profile-preferences-mediaPreferences-preferencesUpdated =
Expand Down

0 comments on commit ac7ea5f

Please sign in to comment.