eggplant rather than wrench, because of course
Some checks failed
Some checks failed
This commit is contained in:
@ -351,8 +351,8 @@ const DropdownNavigation: React.FC = React.memo((): JSX.Element | null => {
|
||||
{features.wrenchedTimeline && (
|
||||
<DropdownNavigationLink
|
||||
to='/timeline/wrenched'
|
||||
icon={require('@phosphor-icons/core/regular/wrench.svg')}
|
||||
text={<FormattedMessage id='tabs_bar.wrenched' defaultMessage='Wrenched' />}
|
||||
icon={require('@phosphor-icons/core/regular/plant.svg')}
|
||||
text={<FormattedMessage id='tabs_bar.eggplanted' defaultMessage='Eggplanted' />}
|
||||
onClick={closeSidebar}
|
||||
/>
|
||||
)}
|
||||
@ -465,8 +465,8 @@ const DropdownNavigation: React.FC = React.memo((): JSX.Element | null => {
|
||||
{features.wrenchedTimeline && !restrictUnauth.timelines.wrenched && (
|
||||
<DropdownNavigationLink
|
||||
to='/timeline/wrenched'
|
||||
icon={require('@phosphor-icons/core/regular/wrench.svg')}
|
||||
text={<FormattedMessage id='tabs_bar.wrenched' defaultMessage='Wrenched' />}
|
||||
icon={require('@phosphor-icons/core/regular/plant.svg')}
|
||||
text={<FormattedMessage id='tabs_bar.eggplanted' defaultMessage='Eggplanted' />}
|
||||
onClick={closeSidebar}
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -340,9 +340,9 @@ const SidebarNavigation: React.FC<ISidebarNavigation> = React.memo(({ shrink })
|
||||
{(features.wrenchedTimeline && (account || !restrictUnauth.timelines.wrenched)) && (
|
||||
<SidebarNavigationLink
|
||||
to='/timeline/wrenched'
|
||||
icon={require('@phosphor-icons/core/regular/wrench.svg')}
|
||||
activeIcon={require('@phosphor-icons/core/fill/wrench-fill.svg')}
|
||||
text={<FormattedMessage id='tabs_bar.wrenched' defaultMessage='Wrenched' />}
|
||||
icon={require('@phosphor-icons/core/regular/plant.svg')}
|
||||
activeIcon={require('@phosphor-icons/core/fill/plant-fill.svg')}
|
||||
text={<FormattedMessage id='tabs_bar.eggplanted' defaultMessage='Eggplanted' />}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ const messages = defineMessages({
|
||||
unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },
|
||||
unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },
|
||||
viewReactions: { id: 'status.view_reactions', defaultMessage: 'View reactions' },
|
||||
wrench: { id: 'status.wrench', defaultMessage: 'Wrench reaction' },
|
||||
eggplant: { id: 'status.eggplant', defaultMessage: 'Eggplant reaction' },
|
||||
addKnownLanguage: { id: 'status.add_known_language', defaultMessage: 'Do not auto-translate posts in {language}.' },
|
||||
translate: { id: 'status.translate', defaultMessage: 'Translate' },
|
||||
hideTranslation: { id: 'status.hide_translation', defaultMessage: 'Hide translation' },
|
||||
@ -479,9 +479,9 @@ const DislikeButton: React.FC<IActionButton> = ({
|
||||
);
|
||||
};
|
||||
|
||||
const getLongerWrench = (emojis: Array<CustomEmoji>) => emojis.find(({ shortcode }) => shortcode === 'longestest_wrench') || emojis.find(({ shortcode }) => shortcode === 'longest_wrench');
|
||||
const getLongerEggplant = (emojis: Array<CustomEmoji>) => emojis.find(({ shortcode }) => shortcode === 'longestest_eggplant') || emojis.find(({ shortcode }) => shortcode === 'longest_eggplant');
|
||||
|
||||
const WrenchButton: React.FC<IActionButton> = ({
|
||||
const EggplantButton: React.FC<IActionButton> = ({
|
||||
status,
|
||||
withLabels,
|
||||
me,
|
||||
@ -491,39 +491,39 @@ const WrenchButton: React.FC<IActionButton> = ({
|
||||
const features = useFeatures();
|
||||
|
||||
const { openModal } = useModalsActions();
|
||||
const { showWrenchButton } = useSettings();
|
||||
const { showEggplantButton } = useSettings();
|
||||
|
||||
const { data: hasLongerWrench } = useCustomEmojis(getLongerWrench);
|
||||
const { data: hasLongerEggplant } = useCustomEmojis(getLongerEggplant);
|
||||
|
||||
if (!me || withLabels || !features.emojiReacts || !showWrenchButton) return;
|
||||
if (!me || withLabels || !features.emojiReacts || !showEggplantButton) return;
|
||||
|
||||
const wrenches = showWrenchButton && status.emoji_reactions.find(emoji => emoji.name === '🔧') || undefined;
|
||||
const eggplants = showEggplantButton && status.emoji_reactions.find(emoji => emoji.name === '🍆') || undefined;
|
||||
|
||||
const handleWrenchClick: React.EventHandler<React.MouseEvent> = (e) => {
|
||||
if (wrenches?.me) {
|
||||
dispatch(unEmojiReact(status.id, '🔧'));
|
||||
const handleEggplantClick: React.EventHandler<React.MouseEvent> = (e) => {
|
||||
if (eggplants?.me) {
|
||||
dispatch(unEmojiReact(status.id, '🍆'));
|
||||
} else {
|
||||
dispatch(emojiReact(status.id, '🔧', undefined, intl));
|
||||
dispatch(emojiReact(status.id, '🍆', undefined, intl));
|
||||
}
|
||||
};
|
||||
|
||||
const handleWrenchLongPress = () => {
|
||||
if (features.customEmojiReacts && hasLongerWrench) {
|
||||
dispatch(emojiReact(status.id, hasLongerWrench.shortcode, hasLongerWrench.url, intl));
|
||||
} else if (wrenches?.count) {
|
||||
openModal('REACTIONS', { statusId: status.id, reaction: wrenches.name });
|
||||
const handleEggplantLongPress = () => {
|
||||
if (features.customEmojiReacts && hasLongerEggplant) {
|
||||
dispatch(emojiReact(status.id, hasLongerEggplant.shortcode, hasLongerEggplant.url, intl));
|
||||
} else if (eggplants?.count) {
|
||||
openModal('REACTIONS', { statusId: status.id, reaction: eggplants.name });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<StatusActionButton
|
||||
title={intl.formatMessage(messages.wrench)}
|
||||
icon={require('@phosphor-icons/core/regular/wrench.svg')}
|
||||
filledIcon={require('@phosphor-icons/core/fill/wrench-fill.svg')}
|
||||
onClick={handleWrenchClick}
|
||||
onLongPress={handleWrenchLongPress}
|
||||
active={wrenches?.me}
|
||||
count={wrenches?.count || undefined}
|
||||
title={intl.formatMessage(messages.eggplant)}
|
||||
icon={require('@phosphor-icons/core/regular/plant.svg')}
|
||||
filledIcon={require('@phosphor-icons/core/fill/plant-fill.svg')}
|
||||
onClick={handleEggplantClick}
|
||||
onLongPress={handleEggplantLongPress}
|
||||
active={eggplants?.me}
|
||||
count={eggplants?.count || undefined}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@ -1171,7 +1171,7 @@ const StatusActionBar: React.FC<IStatusActionBar> = ({
|
||||
onOpenUnauthorizedModal={onOpenUnauthorizedModal}
|
||||
/>
|
||||
|
||||
<WrenchButton
|
||||
<EggplantButton
|
||||
status={status}
|
||||
withLabels={withLabels}
|
||||
me={me}
|
||||
|
||||
@ -326,8 +326,8 @@ const Preferences = () => {
|
||||
</ListItem>
|
||||
|
||||
{features.emojiReacts && (
|
||||
<ListItem label={<FormattedMessage id='preferences.fields.wrench_label' defaultMessage='Display wrench reaction button' />} >
|
||||
<SettingToggle settings={settings} settingPath={['showWrenchButton']} onChange={onToggleChange} />
|
||||
<ListItem label={<FormattedMessage id='preferences.fields.eggplant_label' defaultMessage='Display eggplant reaction button' />} >
|
||||
<SettingToggle settings={settings} settingPath={['showEggplantButton']} onChange={onToggleChange} />
|
||||
</ListItem>
|
||||
)}
|
||||
|
||||
|
||||
@ -504,7 +504,7 @@
|
||||
"column.settings_store": "Settings store",
|
||||
"column.test": "Test timeline",
|
||||
"column.tokens": "Active sessions",
|
||||
"column.wrenched": "Recent wrenches timeline",
|
||||
"column.eggplanted": "Recent eggplants timeline",
|
||||
"column_forbidden.body": "You do not have permission to access this page.",
|
||||
"column_forbidden.title": "Forbidden",
|
||||
"common.cancel": "Cancel",
|
||||
@ -923,7 +923,7 @@
|
||||
"empty_column.search.accounts": "There are no people results for \"{term}\"",
|
||||
"empty_column.search.statuses": "There are no posts results for \"{term}\"",
|
||||
"empty_column.test": "The test timeline is empty.",
|
||||
"empty_column.wrenched": "There is nothing here! 🔧 a public post to fill it up",
|
||||
"empty_column.eggplanted": "There is nothing here! 🍆 a public post to fill it up",
|
||||
"event.banner": "Event banner",
|
||||
"event.copy": "Copy link to event",
|
||||
"event.date": "Date",
|
||||
@ -1479,7 +1479,7 @@
|
||||
"preferences.fields.unfollow_modal_label": "Show confirmation dialog before unfollowing someone",
|
||||
"preferences.fields.web_layout_label": "Layout of the web view of your profile",
|
||||
"preferences.fields.web_visibility_label": "Visibility level of posts displayed on your profile",
|
||||
"preferences.fields.wrench_label": "Display wrench reaction button",
|
||||
"preferences.fields.eggplant_label": "Display eggplant reaction button",
|
||||
"preferences.hints.demetricator": "Decrease social media anxiety by hiding all numbers from the site.",
|
||||
"preferences.hints.mention_policy": "Applies to direct messages and public posts",
|
||||
"preferences.notifications.advanced": "Show all notification categories",
|
||||
@ -1789,7 +1789,7 @@
|
||||
"status.visibility.mutuals_only": "The post is only visible to people who mutually follow the author",
|
||||
"status.visibility.private": "The post is only visible to followers of the author",
|
||||
"status.visibility.subscribers": "The post is only visible to users subscribing the author",
|
||||
"status.wrench": "Wrench reaction",
|
||||
"status.eggplant": "Eggplant reaction",
|
||||
"status_list.queue_label": "Click to see {count} new {count, plural, one {post} other {posts}}",
|
||||
"statuses.quote_tombstone": "Post is unavailable.",
|
||||
"statuses.tombstone": "One or more posts are unavailable.",
|
||||
@ -1818,7 +1818,7 @@
|
||||
"tabs_bar.profile": "Profile",
|
||||
"tabs_bar.search": "Search",
|
||||
"tabs_bar.settings": "Settings",
|
||||
"tabs_bar.wrenched": "Wrenched",
|
||||
"tabs_bar.eggplanted": "Eggplanted",
|
||||
"textarea.counter.label": "{count} characters remaining",
|
||||
"theme_editor.colors.accent": "Accent",
|
||||
"theme_editor.colors.accent_blue": "Accent Blue",
|
||||
|
||||
@ -10,7 +10,7 @@ import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch';
|
||||
import { useSettings } from 'pl-fe/stores/settings';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.wrenched', defaultMessage: 'Recent wrenches timeline' },
|
||||
title: { id: 'column.eggplanted', defaultMessage: 'Recent eggplants timeline' },
|
||||
});
|
||||
|
||||
const WrenchedTimelinePage = () => {
|
||||
@ -41,8 +41,8 @@ const WrenchedTimelinePage = () => {
|
||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
||||
prefix='home'
|
||||
onLoadMore={handleLoadMore}
|
||||
emptyMessageText={<FormattedMessage id='empty_column.wrenched' defaultMessage='There is nothing here! 🔧 a public post to fill it up' />}
|
||||
emptyMessageIcon={require('@phosphor-icons/core/regular/wrench.svg')}
|
||||
emptyMessageText={<FormattedMessage id='empty_column.eggplanted' defaultMessage='There is nothing here! 🍆 a public post to fill it up' />}
|
||||
emptyMessageIcon={require('@phosphor-icons/core/regular/plant.svg')}
|
||||
/>
|
||||
</PullToRefresh>
|
||||
</Column>
|
||||
|
||||
@ -40,7 +40,7 @@ const settingsSchema = v.object({
|
||||
forceImplicitAddressing: v.fallback(v.boolean(), false),
|
||||
autoTranslate: v.fallback(v.boolean(), false),
|
||||
knownLanguages: v.fallback(v.array(v.string()), []),
|
||||
showWrenchButton: v.fallback(v.boolean(), false),
|
||||
showEggplantButton: v.fallback(v.boolean(), false),
|
||||
urlPrivacy: coerceObject({
|
||||
clearLinksInCompose: v.optional(v.boolean(), true),
|
||||
clearLinksInContent: v.optional(v.boolean(), false),
|
||||
|
||||
Reference in New Issue
Block a user