From 0341ab658d2cc05f96a67c51992e0d2bf624d38e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 29 Aug 2022 14:31:46 -0500 Subject: [PATCH 01/28] Upgrade Sentry to v7.11 --- package.json | 6 ++-- yarn.lock | 86 ++++++++++++++++++++++++++-------------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index 3c8ccb13fb..75c8844f82 100644 --- a/package.json +++ b/package.json @@ -64,9 +64,9 @@ "@reach/tabs": "^0.16.4", "@reach/tooltip": "^0.16.2", "@reduxjs/toolkit": "^1.8.1", - "@sentry/browser": "^7.2.0", - "@sentry/react": "^7.2.0", - "@sentry/tracing": "^7.2.0", + "@sentry/browser": "^7.11.1", + "@sentry/react": "^7.11.1", + "@sentry/tracing": "^7.11.1", "@tabler/icons": "^1.73.0", "@tailwindcss/forms": "^0.4.0", "@tailwindcss/typography": "^0.5.1", diff --git a/yarn.lock b/yarn.lock index 6677785fd3..4f2a766d34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2178,67 +2178,67 @@ redux-thunk "^2.4.1" reselect "^4.1.5" -"@sentry/browser@7.2.0", "@sentry/browser@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.2.0.tgz#ecfd13c6557ece5f00827109dd577d8d153a89c9" - integrity sha512-QMdRpK7MM8woFOeMTDh7/sXG4lXutgZ/K9SBBMvd5MVaaQnSSE5ZGJMaxMfsiYOISV0UqS7l0V0EaGnv9n3zrQ== +"@sentry/browser@7.11.1", "@sentry/browser@^7.11.1": + version "7.11.1" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.11.1.tgz#377d417e833ef54c78a93ef720a742bda5022625" + integrity sha512-k2XHuzPfnm8VJPK5eWd1+Y5VCgN42sLveb8Qxc3prb5PSL416NWMLZaoB7RMIhy430fKrSFiosnm6QDk2M6pbA== dependencies: - "@sentry/core" "7.2.0" - "@sentry/types" "7.2.0" - "@sentry/utils" "7.2.0" + "@sentry/core" "7.11.1" + "@sentry/types" "7.11.1" + "@sentry/utils" "7.11.1" tslib "^1.9.3" -"@sentry/core@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.2.0.tgz#bd6ef331c64ff917cb0ad8a8666b2c4c5c52acdb" - integrity sha512-9amsbB9/ePkJRgc0cVXCVW2hQUPImgTqBbnKu4frBXBza+9MBC5W3S8ZyZt2InCK22kuhNVo3z61a8mzCgXoCA== +"@sentry/core@7.11.1": + version "7.11.1" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.11.1.tgz#d68e796f3b6428aefd6086a1db00118df7a9a9e4" + integrity sha512-kaDSZ6VNuO4ZZdqUOOX6XM6x+kjo2bMnDQ3IJG51FPvVjr8lXYhXj1Ccxcot3pBYAIWPPby2+vNDOXllmXqoBA== dependencies: - "@sentry/hub" "7.2.0" - "@sentry/types" "7.2.0" - "@sentry/utils" "7.2.0" + "@sentry/hub" "7.11.1" + "@sentry/types" "7.11.1" + "@sentry/utils" "7.11.1" tslib "^1.9.3" -"@sentry/hub@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.2.0.tgz#c19ce0394c7c87647be284fca304d6fa1821ad75" - integrity sha512-uzd+GzD++Z4QopRh3AyRc4jz4AzomMnrXTOmdXgud1BH/Du9AYutVlBc5ZYwqCuJH7QPuAW3ySU3P+16UCinIg== +"@sentry/hub@7.11.1": + version "7.11.1" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.11.1.tgz#1749b2b102ea1892ff388d65d66d3b402b393958" + integrity sha512-M6ClgdXdptS0lUBKB5KpXXe2qMQhsoiEN2pEGRI6+auqhfHCUQB1ZXsfjiOYexKC9fwx7TyFyZ9Jcaf2DTxEhw== dependencies: - "@sentry/types" "7.2.0" - "@sentry/utils" "7.2.0" + "@sentry/types" "7.11.1" + "@sentry/utils" "7.11.1" tslib "^1.9.3" -"@sentry/react@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.2.0.tgz#5600bdadc970044c1a98e69ad815711429dc679b" - integrity sha512-4QtOaxTWRomL4qwa5X5UR4cM3XnDNtumBu0Lua5d7xV93/1m44hWvdxB4sqf/ueL6dPqmg0YbtgDYzT3loE5vQ== +"@sentry/react@^7.11.1": + version "7.11.1" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.11.1.tgz#b6a9828187484d53dfbe37fa93cd98238a7db2b3" + integrity sha512-kp/vBgwNrlFEtW3e6DY9T4s3di9peL66n5UIY5n6dYkiN7A7D6/Kz1WJ/ZCL82DvaCMEY577wNyr2C+442l7fw== dependencies: - "@sentry/browser" "7.2.0" - "@sentry/types" "7.2.0" - "@sentry/utils" "7.2.0" + "@sentry/browser" "7.11.1" + "@sentry/types" "7.11.1" + "@sentry/utils" "7.11.1" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/tracing@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.2.0.tgz#606350e647d14f946764bed7606ec818d1a87cd5" - integrity sha512-Lw5Y5H/kiesTviISFOtnAhjF7+cMX3MnkzdMl5ANwe5lNFPw/php5olzU9hGUqheKeGyYp3sM8BF4GwegGMWQw== +"@sentry/tracing@^7.11.1": + version "7.11.1" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.11.1.tgz#50cbe82dd5b9a1307b31761cdd4b0d71132cf5c7" + integrity sha512-ilgnHfpdYUWKG/5yAXIfIbPVsCfrC4ONFBR/wN25/hdAyVfXMa3AJx7NCCXxZBOPDWH3hMW8rl4La5yuDbXofg== dependencies: - "@sentry/hub" "7.2.0" - "@sentry/types" "7.2.0" - "@sentry/utils" "7.2.0" + "@sentry/hub" "7.11.1" + "@sentry/types" "7.11.1" + "@sentry/utils" "7.11.1" tslib "^1.9.3" -"@sentry/types@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.2.0.tgz#0c20073956bb46bdea3288683aeba2d5c350deb8" - integrity sha512-e6w62C2AmE5ULr9w/BuVaKTRpKUMGWyw4PhcBlSdDRoS47QgURGgDFIvr3VlaDwkUfCbASwSv49fDhKRX3aoew== +"@sentry/types@7.11.1": + version "7.11.1" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.11.1.tgz#06e2827f6ba37159c33644208a0453b86d25e232" + integrity sha512-gIEhOPxC2cjrxQ0+K2SFJ1P6e/an5osSxVc9OOtekN28eHtVsXFCLB8XVWeNQnS7N2VkrVrkqORMBz1kvIcvVQ== -"@sentry/utils@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.2.0.tgz#b288c204224a9fb1d576323c5168735ec8c03cd5" - integrity sha512-uUKIsIXyb6ZXBbl/L8UwG4gy8PBXZl5pGCUFRPbns+vi0U6vtmDRDYa1A/7E17VkBJNRPVNJQr9Pq5Yd0I0MRA== +"@sentry/utils@7.11.1": + version "7.11.1" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.11.1.tgz#1635c5b223369d9428bc83c9b8908c9c3287ee10" + integrity sha512-tRVXNT5O9ilkV31pyHeTqA1PcPQfMV/2OR6yUYM4ah+QVISovC0f0ybhByuH5nYg6x/Gsnx1o7pc8L1GE3+O7A== dependencies: - "@sentry/types" "7.2.0" + "@sentry/types" "7.11.1" tslib "^1.9.3" "@sinclair/typebox@^0.23.3": From 27581fa776c2b5bd148ab143c9de7b8ae92c4f90 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 30 Aug 2022 08:57:44 -0500 Subject: [PATCH 02/28] Ads: fix expiry filter logic --- app/soapbox/queries/ads.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/queries/ads.ts b/app/soapbox/queries/ads.ts index 91c7da2fb2..86dc1e86ff 100644 --- a/app/soapbox/queries/ads.ts +++ b/app/soapbox/queries/ads.ts @@ -23,7 +23,7 @@ export default function useAds() { }); // Filter out expired ads. - const data = result.data?.filter(isExpired); + const data = result.data?.filter(ad => !isExpired(ad)); return { ...result, From 05d296f1ee488f391de1e4446cb9911c035ecdd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 30 Aug 2022 22:51:13 +0200 Subject: [PATCH 03/28] Consistent behavior of compose modal close confirmation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/modal_root.js | Bin 7199 -> 7144 bytes .../features/ui/components/compose_modal.tsx | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/soapbox/components/modal_root.js b/app/soapbox/components/modal_root.js index bf7ecd2c6219348e58c1bf44344b904bbd2c645a..6c6c4021e0f6eb7dca7767b4c833bad10bfdb5f2 100644 GIT binary patch delta 24 fcmbPl@xpwA2@`v2ML~X1iNa(Prd69|n3*L3a!m*a delta 65 zcmaE1KHp-43Dab2rd0-+dGST51v!=RCHV@9wzdj+r8zk|Tna#toS$2eU!1B}Sejpw M3YXh_ok>s<0P~F&6#xJL diff --git a/app/soapbox/features/ui/components/compose_modal.tsx b/app/soapbox/features/ui/components/compose_modal.tsx index 81a8c92545..de53442e34 100644 --- a/app/soapbox/features/ui/components/compose_modal.tsx +++ b/app/soapbox/features/ui/components/compose_modal.tsx @@ -3,6 +3,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { cancelReplyCompose } from 'soapbox/actions/compose'; import { openModal, closeModal } from 'soapbox/actions/modals'; +import { checkComposeContent } from 'soapbox/components/modal_root'; import { Modal } from 'soapbox/components/ui'; import { useAppDispatch, useAppSelector } from 'soapbox/hooks'; @@ -23,13 +24,13 @@ const ComposeModal: React.FC = ({ onClose }) => { const dispatch = useAppDispatch(); const statusId = useAppSelector((state) => state.compose.id); - const composeText = useAppSelector((state) => state.compose.text); + const hasComposeContent = useAppSelector((state) => checkComposeContent(state.compose)); const privacy = useAppSelector((state) => state.compose.privacy); const inReplyTo = useAppSelector((state) => state.compose.in_reply_to); const quote = useAppSelector((state) => state.compose.quote); const onClickClose = () => { - if (composeText) { + if (hasComposeContent) { dispatch(openModal('CONFIRM', { icon: require('@tabler/icons/trash.svg'), heading: statusId From 03d6211e1ca4a31f4f82db5a0449265a9dea3a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Wed, 31 Aug 2022 11:35:06 +0200 Subject: [PATCH 04/28] Replace classnames with clsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/account_search.tsx | 2 +- .../announcements/announcements-panel.tsx | 2 +- .../components/announcements/reaction.tsx | 2 +- .../announcements/reactions-bar.tsx | 2 +- app/soapbox/components/autosuggest_input.tsx | 2 +- .../components/autosuggest_textarea.tsx | 2 +- app/soapbox/components/avatar.tsx | 2 +- app/soapbox/components/badge.tsx | 2 +- app/soapbox/components/column_header.js | Bin 3642 -> 3636 bytes app/soapbox/components/dropdown_menu.tsx | 2 +- .../components/emoji-button-wrapper.tsx | 2 +- app/soapbox/components/emoji_selector.tsx | 2 +- app/soapbox/components/filter_bar.js | Bin 3722 -> 3716 bytes app/soapbox/components/fork_awesome_icon.tsx | 2 +- app/soapbox/components/gdpr-banner.tsx | 2 +- .../components/hover-status-wrapper.tsx | 2 +- app/soapbox/components/hover_ref_wrapper.tsx | 2 +- app/soapbox/components/icon_button.js | Bin 5275 -> 5269 bytes app/soapbox/components/list.tsx | 2 +- app/soapbox/components/media_gallery.js | Bin 23701 -> 23695 bytes app/soapbox/components/modal_root.js | Bin 7144 -> 7138 bytes app/soapbox/components/polls/poll-option.tsx | 2 +- app/soapbox/components/profile-hover-card.tsx | 2 +- app/soapbox/components/progress_circle.tsx | 2 +- app/soapbox/components/quoted-status.tsx | 2 +- app/soapbox/components/radio_button.tsx | 2 +- app/soapbox/components/scroll-top-button.tsx | 2 +- .../components/sidebar-navigation-link.tsx | 2 +- app/soapbox/components/sidebar_menu.tsx | 2 +- app/soapbox/components/site-logo.tsx | 2 +- app/soapbox/components/status-action-bar.tsx | 2 +- .../components/status-action-button.tsx | 2 +- app/soapbox/components/status-hover-card.tsx | 2 +- app/soapbox/components/status.tsx | 2 +- app/soapbox/components/status_content.tsx | 2 +- app/soapbox/components/status_list.tsx | 2 +- app/soapbox/components/still_image.tsx | 2 +- app/soapbox/components/svg_icon.tsx | 2 +- .../components/thumb_navigation-link.tsx | 2 +- app/soapbox/components/ui/avatar/avatar.tsx | 2 +- app/soapbox/components/ui/banner/banner.tsx | 2 +- app/soapbox/components/ui/button/button.tsx | 2 +- .../components/ui/button/useButtonStyles.ts | 2 +- app/soapbox/components/ui/card/card.tsx | 2 +- .../ui/emoji-selector/emoji-selector.tsx | 2 +- app/soapbox/components/ui/hstack/hstack.tsx | 2 +- .../components/ui/icon-button/icon-button.tsx | 2 +- app/soapbox/components/ui/input/input.tsx | 2 +- app/soapbox/components/ui/layout/layout.tsx | 2 +- app/soapbox/components/ui/modal/modal.tsx | 2 +- app/soapbox/components/ui/stack/stack.tsx | 2 +- app/soapbox/components/ui/tabs/tabs.tsx | 2 +- app/soapbox/components/ui/text/text.tsx | 2 +- .../components/ui/textarea/textarea.tsx | 2 +- .../components/validation-checkmark.tsx | 2 +- app/soapbox/components/verification_badge.tsx | 2 +- app/soapbox/containers/soapbox.tsx | 2 +- .../account_gallery/components/media_item.tsx | 2 +- .../features/aliases/components/search.tsx | 2 +- app/soapbox/features/audio/index.js | Bin 15963 -> 15957 bytes app/soapbox/features/backups/index.tsx | 2 +- .../chats/components/chat-message-list.tsx | 2 +- .../compose/components/compose_form.js | Bin 14453 -> 14447 bytes .../components/compose_form_button.tsx | 2 +- .../components/emoji_picker_dropdown.js | Bin 11754 -> 11748 bytes .../compose/components/privacy_dropdown.tsx | 2 +- .../compose/components/schedule_form.tsx | 2 +- .../features/compose/components/search.tsx | 2 +- .../compose/components/search_results.tsx | 2 +- .../components/text_character_counter.tsx | 2 +- .../features/compose/components/upload.tsx | 2 +- .../compose/components/upload_form.tsx | 2 +- .../directory/components/account_card.tsx | 2 +- app/soapbox/features/directory/index.tsx | 2 +- .../components/restricted_instance.tsx | 2 +- .../features/feed-filtering/feed-carousel.tsx | 2 +- app/soapbox/features/forms/index.tsx | 2 +- app/soapbox/features/groups/create/index.js | Bin 3868 -> 3862 bytes app/soapbox/features/groups/edit/index.js | Bin 4571 -> 4565 bytes app/soapbox/features/groups/index/index.js | Bin 3105 -> 3099 bytes app/soapbox/features/introduction/index.js | Bin 5803 -> 5797 bytes .../list_editor/components/search.tsx | 2 +- app/soapbox/features/notifications/index.tsx | 2 +- .../features/onboarding/onboarding-wizard.tsx | 2 +- .../steps/avatar-selection-step.tsx | 2 +- .../steps/cover-photo-selection-step.tsx | 2 +- .../components/placeholder_card.tsx | 2 +- .../components/placeholder_status.tsx | 2 +- .../components/scheduled_status.tsx | 2 +- .../components/icon_picker_dropdown.js | Bin 6497 -> 6491 bytes .../components/site-preview.tsx | 2 +- .../features/status/components/card.tsx | 2 +- .../components/status-interaction-bar.tsx | 2 +- .../status/components/thread-status.tsx | 2 +- app/soapbox/features/status/index.tsx | 2 +- .../features/ui/components/accordion.tsx | 2 +- .../features/ui/components/actions_modal.tsx | 2 +- .../ui/components/background_shapes.tsx | 2 +- .../features/ui/components/column_header.tsx | 2 +- .../ui/components/compare_history_modal.tsx | 2 +- .../ui/components/focal_point_modal.js | Bin 3411 -> 3405 bytes .../features/ui/components/image_loader.js | Bin 3929 -> 3923 bytes .../features/ui/components/link_footer.tsx | 2 +- .../features/ui/components/media_modal.js | Bin 9153 -> 9147 bytes .../components/modals/landing-page-modal.tsx | 2 +- .../modals/report-modal/steps/reason-step.tsx | 2 +- app/soapbox/features/ui/components/navbar.tsx | 2 +- .../features/ui/components/pending_status.tsx | 2 +- .../ui/components/profile_fields_panel.tsx | 2 +- .../features/ui/components/upload_area.tsx | 2 +- app/soapbox/features/video/index.js | Bin 19891 -> 19885 bytes package.json | 2 +- webpack/shared.js | Bin 4484 -> 4512 bytes yarn.lock | 5 +++++ 114 files changed, 100 insertions(+), 95 deletions(-) diff --git a/app/soapbox/components/account_search.tsx b/app/soapbox/components/account_search.tsx index adbb5501df..bf9652b66e 100644 --- a/app/soapbox/components/account_search.tsx +++ b/app/soapbox/components/account_search.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/app/soapbox/components/announcements/announcements-panel.tsx b/app/soapbox/components/announcements/announcements-panel.tsx index 200615dab8..2febea40da 100644 --- a/app/soapbox/components/announcements/announcements-panel.tsx +++ b/app/soapbox/components/announcements/announcements-panel.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { List as ImmutableList, Map as ImmutableMap } from 'immutable'; import React, { useState } from 'react'; import { FormattedMessage } from 'react-intl'; diff --git a/app/soapbox/components/announcements/reaction.tsx b/app/soapbox/components/announcements/reaction.tsx index 1e415c667c..8e2391aec7 100644 --- a/app/soapbox/components/announcements/reaction.tsx +++ b/app/soapbox/components/announcements/reaction.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState } from 'react'; import AnimatedNumber from 'soapbox/components/animated-number'; diff --git a/app/soapbox/components/announcements/reactions-bar.tsx b/app/soapbox/components/announcements/reactions-bar.tsx index 66b5f3f832..5cec539742 100644 --- a/app/soapbox/components/announcements/reactions-bar.tsx +++ b/app/soapbox/components/announcements/reactions-bar.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { TransitionMotion, spring } from 'react-motion'; diff --git a/app/soapbox/components/autosuggest_input.tsx b/app/soapbox/components/autosuggest_input.tsx index 54f126a233..744160b2bc 100644 --- a/app/soapbox/components/autosuggest_input.tsx +++ b/app/soapbox/components/autosuggest_input.tsx @@ -1,5 +1,5 @@ import Portal from '@reach/portal'; -import classNames from 'classnames'; +import classNames from 'clsx'; import { List as ImmutableList } from 'immutable'; import React from 'react'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/soapbox/components/autosuggest_textarea.tsx b/app/soapbox/components/autosuggest_textarea.tsx index a475e5ce21..47f0eea39c 100644 --- a/app/soapbox/components/autosuggest_textarea.tsx +++ b/app/soapbox/components/autosuggest_textarea.tsx @@ -1,5 +1,5 @@ import Portal from '@reach/portal'; -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Textarea from 'react-textarea-autosize'; diff --git a/app/soapbox/components/avatar.tsx b/app/soapbox/components/avatar.tsx index 9d4fbaa7c3..4f40d46bb0 100644 --- a/app/soapbox/components/avatar.tsx +++ b/app/soapbox/components/avatar.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import StillImage from 'soapbox/components/still_image'; diff --git a/app/soapbox/components/badge.tsx b/app/soapbox/components/badge.tsx index 78610870f9..13646bcdb6 100644 --- a/app/soapbox/components/badge.tsx +++ b/app/soapbox/components/badge.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; interface IBadge { diff --git a/app/soapbox/components/column_header.js b/app/soapbox/components/column_header.js index c5fa73e5d966e7389c858e2d63200e61f9352c80..42f8eebb810e2887d6a3daa1e63070812b0b31d4 100644 GIT binary patch delta 13 VcmdlbvqfgYY^LIhjfvd@;=IJ%)Z&eEr}F{;Q6dN@ diff --git a/app/soapbox/components/dropdown_menu.tsx b/app/soapbox/components/dropdown_menu.tsx index d8b35f5fc5..bb20c86226 100644 --- a/app/soapbox/components/dropdown_menu.tsx +++ b/app/soapbox/components/dropdown_menu.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { supportsPassiveEvents } from 'detect-passive-events'; import React from 'react'; import { spring } from 'react-motion'; diff --git a/app/soapbox/components/emoji-button-wrapper.tsx b/app/soapbox/components/emoji-button-wrapper.tsx index 2315258678..0afdba85f8 100644 --- a/app/soapbox/components/emoji-button-wrapper.tsx +++ b/app/soapbox/components/emoji-button-wrapper.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState, useEffect, useRef } from 'react'; import { usePopper } from 'react-popper'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/components/emoji_selector.tsx b/app/soapbox/components/emoji_selector.tsx index 69d1043855..43e10d8756 100644 --- a/app/soapbox/components/emoji_selector.tsx +++ b/app/soapbox/components/emoji_selector.tsx @@ -1,4 +1,4 @@ -// import classNames from 'classnames'; +// import classNames from 'clsx'; import React from 'react'; import { HotKeys } from 'react-hotkeys'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/soapbox/components/filter_bar.js b/app/soapbox/components/filter_bar.js index 7b0651d0142ea8ce12f98b987d5790ee76b11649..601ca04a21ceca4eadaa6e407d495a2eb88c63af 100644 GIT binary patch delta 13 UcmeB@ZIPWI#Z+9eQ7MBD03JC6DF6Tf delta 19 acmZpX?UJ1!#gSNCoR^rJTD(yvgAV{fmIj#s diff --git a/app/soapbox/components/fork_awesome_icon.tsx b/app/soapbox/components/fork_awesome_icon.tsx index 45b146e084..98d6c5747f 100644 --- a/app/soapbox/components/fork_awesome_icon.tsx +++ b/app/soapbox/components/fork_awesome_icon.tsx @@ -5,7 +5,7 @@ * @see soapbox/components/icon */ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; export interface IForkAwesomeIcon extends React.HTMLAttributes { diff --git a/app/soapbox/components/gdpr-banner.tsx b/app/soapbox/components/gdpr-banner.tsx index bd9c7cb68c..425376f955 100644 --- a/app/soapbox/components/gdpr-banner.tsx +++ b/app/soapbox/components/gdpr-banner.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState } from 'react'; import { FormattedMessage } from 'react-intl'; diff --git a/app/soapbox/components/hover-status-wrapper.tsx b/app/soapbox/components/hover-status-wrapper.tsx index 6860762e71..da962e47c4 100644 --- a/app/soapbox/components/hover-status-wrapper.tsx +++ b/app/soapbox/components/hover-status-wrapper.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { debounce } from 'lodash'; import React, { useRef } from 'react'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/components/hover_ref_wrapper.tsx b/app/soapbox/components/hover_ref_wrapper.tsx index 7e103f3e5a..f509b2efee 100644 --- a/app/soapbox/components/hover_ref_wrapper.tsx +++ b/app/soapbox/components/hover_ref_wrapper.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import debounce from 'lodash/debounce'; import React, { useRef } from 'react'; diff --git a/app/soapbox/components/icon_button.js b/app/soapbox/components/icon_button.js index b6ed8b3d46657692654f826527ac6df76b095eda..cb92c28414e2fcca50f842f02a3764e64478096e 100644 GIT binary patch delta 13 UcmbQOIaPCl6jO1YVk&yN)Z4>x(4b1 diff --git a/app/soapbox/components/list.tsx b/app/soapbox/components/list.tsx index 45e6c38c5b..ae29a5cbdc 100644 --- a/app/soapbox/components/list.tsx +++ b/app/soapbox/components/list.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { v4 as uuidv4 } from 'uuid'; diff --git a/app/soapbox/components/media_gallery.js b/app/soapbox/components/media_gallery.js index 9d23c7f724f84ca2b7fd1f27d4efe2e91a509679..f8e9dc51ef7200318a18ddb0cc4b9660d74a9b43 100644 GIT binary patch delta 15 WcmbQbld*p%;{++D;);z*#W4Ue3I);t delta 21 ccmeC*$vAZ<;{+*=#Ny(-#N5>4jWWeC09-)`LI3~& diff --git a/app/soapbox/components/modal_root.js b/app/soapbox/components/modal_root.js index 6c6c4021e0f6eb7dca7767b4c833bad10bfdb5f2..23d392b510253f892145af0b818de2aa546c0922 100644 GIT binary patch delta 13 UcmaE1{>XfS6jO1YVk&yW6}Uq3kUQ7 diff --git a/app/soapbox/components/polls/poll-option.tsx b/app/soapbox/components/polls/poll-option.tsx index 024f01b7ba..f81be4f5b4 100644 --- a/app/soapbox/components/polls/poll-option.tsx +++ b/app/soapbox/components/polls/poll-option.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { Motion, presets, spring } from 'react-motion'; diff --git a/app/soapbox/components/profile-hover-card.tsx b/app/soapbox/components/profile-hover-card.tsx index e2574c7553..c96839c779 100644 --- a/app/soapbox/components/profile-hover-card.tsx +++ b/app/soapbox/components/profile-hover-card.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; import { usePopper } from 'react-popper'; diff --git a/app/soapbox/components/progress_circle.tsx b/app/soapbox/components/progress_circle.tsx index 6922bc68d3..fcfad084ed 100644 --- a/app/soapbox/components/progress_circle.tsx +++ b/app/soapbox/components/progress_circle.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; interface IProgressCircle { diff --git a/app/soapbox/components/quoted-status.tsx b/app/soapbox/components/quoted-status.tsx index 6d8af184c9..a8809bedf4 100644 --- a/app/soapbox/components/quoted-status.tsx +++ b/app/soapbox/components/quoted-status.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState } from 'react'; import { defineMessages, useIntl, FormattedMessage, FormattedList } from 'react-intl'; import { useHistory } from 'react-router-dom'; diff --git a/app/soapbox/components/radio_button.tsx b/app/soapbox/components/radio_button.tsx index b317e42591..2d350b9530 100644 --- a/app/soapbox/components/radio_button.tsx +++ b/app/soapbox/components/radio_button.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; interface IRadioButton { diff --git a/app/soapbox/components/scroll-top-button.tsx b/app/soapbox/components/scroll-top-button.tsx index 64c7c46294..7bf03f66bc 100644 --- a/app/soapbox/components/scroll-top-button.tsx +++ b/app/soapbox/components/scroll-top-button.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import throttle from 'lodash/throttle'; import React, { useState, useEffect, useCallback } from 'react'; import { useIntl, MessageDescriptor } from 'react-intl'; diff --git a/app/soapbox/components/sidebar-navigation-link.tsx b/app/soapbox/components/sidebar-navigation-link.tsx index 0509c34ad0..9a20ca4829 100644 --- a/app/soapbox/components/sidebar-navigation-link.tsx +++ b/app/soapbox/components/sidebar-navigation-link.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { NavLink } from 'react-router-dom'; diff --git a/app/soapbox/components/sidebar_menu.tsx b/app/soapbox/components/sidebar_menu.tsx index 084506b891..4f349fd1c2 100644 --- a/app/soapbox/components/sidebar_menu.tsx +++ b/app/soapbox/components/sidebar_menu.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/components/site-logo.tsx b/app/soapbox/components/site-logo.tsx index 1e8751ac55..56add1c19d 100644 --- a/app/soapbox/components/site-logo.tsx +++ b/app/soapbox/components/site-logo.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { useSoapboxConfig, useSettings, useTheme } from 'soapbox/hooks'; diff --git a/app/soapbox/components/status-action-bar.tsx b/app/soapbox/components/status-action-bar.tsx index 036289e7f9..c07bf818db 100644 --- a/app/soapbox/components/status-action-bar.tsx +++ b/app/soapbox/components/status-action-bar.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { List as ImmutableList } from 'immutable'; import React from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; diff --git a/app/soapbox/components/status-action-button.tsx b/app/soapbox/components/status-action-button.tsx index 46eac83d09..aacda516fc 100644 --- a/app/soapbox/components/status-action-button.tsx +++ b/app/soapbox/components/status-action-button.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { Text, Icon, Emoji } from 'soapbox/components/ui'; diff --git a/app/soapbox/components/status-hover-card.tsx b/app/soapbox/components/status-hover-card.tsx index dc02af3f48..4ae3f705ec 100644 --- a/app/soapbox/components/status-hover-card.tsx +++ b/app/soapbox/components/status-hover-card.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useEffect, useState, useCallback } from 'react'; import { usePopper } from 'react-popper'; import { useHistory } from 'react-router-dom'; diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index da7af3fa7f..dd2a151423 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useEffect, useRef, useState } from 'react'; import { HotKeys } from 'react-hotkeys'; import { useIntl, FormattedMessage, defineMessages } from 'react-intl'; diff --git a/app/soapbox/components/status_content.tsx b/app/soapbox/components/status_content.tsx index 75d969868f..2a89723151 100644 --- a/app/soapbox/components/status_content.tsx +++ b/app/soapbox/components/status_content.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState, useRef, useEffect, useMemo } from 'react'; import { FormattedMessage } from 'react-intl'; import { useHistory } from 'react-router-dom'; diff --git a/app/soapbox/components/status_list.tsx b/app/soapbox/components/status_list.tsx index 3f0b262b55..295538da2e 100644 --- a/app/soapbox/components/status_list.tsx +++ b/app/soapbox/components/status_list.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import debounce from 'lodash/debounce'; import React, { useRef, useCallback } from 'react'; import { FormattedMessage } from 'react-intl'; diff --git a/app/soapbox/components/still_image.tsx b/app/soapbox/components/still_image.tsx index 4369c84b99..24e212ce55 100644 --- a/app/soapbox/components/still_image.tsx +++ b/app/soapbox/components/still_image.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useRef } from 'react'; import { useSettings } from 'soapbox/hooks'; diff --git a/app/soapbox/components/svg_icon.tsx b/app/soapbox/components/svg_icon.tsx index a81979d0d3..cd8942f68c 100644 --- a/app/soapbox/components/svg_icon.tsx +++ b/app/soapbox/components/svg_icon.tsx @@ -4,7 +4,7 @@ * @see soapbox/components/icon */ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import InlineSVG from 'react-inlinesvg'; // eslint-disable-line no-restricted-imports diff --git a/app/soapbox/components/thumb_navigation-link.tsx b/app/soapbox/components/thumb_navigation-link.tsx index 1a6fa2ea56..58a55e7e69 100644 --- a/app/soapbox/components/thumb_navigation-link.tsx +++ b/app/soapbox/components/thumb_navigation-link.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { NavLink, useLocation } from 'react-router-dom'; diff --git a/app/soapbox/components/ui/avatar/avatar.tsx b/app/soapbox/components/ui/avatar/avatar.tsx index 1b02c6d25d..bdd38df9c1 100644 --- a/app/soapbox/components/ui/avatar/avatar.tsx +++ b/app/soapbox/components/ui/avatar/avatar.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import StillImage from 'soapbox/components/still_image'; diff --git a/app/soapbox/components/ui/banner/banner.tsx b/app/soapbox/components/ui/banner/banner.tsx index fa1cd0b444..f9313eca34 100644 --- a/app/soapbox/components/ui/banner/banner.tsx +++ b/app/soapbox/components/ui/banner/banner.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; interface IBanner { diff --git a/app/soapbox/components/ui/button/button.tsx b/app/soapbox/components/ui/button/button.tsx index e3ae339fc7..97de8862b8 100644 --- a/app/soapbox/components/ui/button/button.tsx +++ b/app/soapbox/components/ui/button/button.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { Link } from 'react-router-dom'; diff --git a/app/soapbox/components/ui/button/useButtonStyles.ts b/app/soapbox/components/ui/button/useButtonStyles.ts index 23d4019991..286a7751f5 100644 --- a/app/soapbox/components/ui/button/useButtonStyles.ts +++ b/app/soapbox/components/ui/button/useButtonStyles.ts @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; type ButtonThemes = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'danger' | 'transparent' | 'outline' type ButtonSizes = 'sm' | 'md' | 'lg' diff --git a/app/soapbox/components/ui/card/card.tsx b/app/soapbox/components/ui/card/card.tsx index d342ef63cf..8166273263 100644 --- a/app/soapbox/components/ui/card/card.tsx +++ b/app/soapbox/components/ui/card/card.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; diff --git a/app/soapbox/components/ui/emoji-selector/emoji-selector.tsx b/app/soapbox/components/ui/emoji-selector/emoji-selector.tsx index 659f72fd3e..20810efbe4 100644 --- a/app/soapbox/components/ui/emoji-selector/emoji-selector.tsx +++ b/app/soapbox/components/ui/emoji-selector/emoji-selector.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { Emoji, HStack } from 'soapbox/components/ui'; diff --git a/app/soapbox/components/ui/hstack/hstack.tsx b/app/soapbox/components/ui/hstack/hstack.tsx index f05f991ec0..3eef110556 100644 --- a/app/soapbox/components/ui/hstack/hstack.tsx +++ b/app/soapbox/components/ui/hstack/hstack.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { forwardRef } from 'react'; const justifyContentOptions = { diff --git a/app/soapbox/components/ui/icon-button/icon-button.tsx b/app/soapbox/components/ui/icon-button/icon-button.tsx index 6b4f5414a3..0e0ad25e2e 100644 --- a/app/soapbox/components/ui/icon-button/icon-button.tsx +++ b/app/soapbox/components/ui/icon-button/icon-button.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import SvgIcon from '../icon/svg-icon'; diff --git a/app/soapbox/components/ui/input/input.tsx b/app/soapbox/components/ui/input/input.tsx index 03a5630d13..5ca748ebc8 100644 --- a/app/soapbox/components/ui/input/input.tsx +++ b/app/soapbox/components/ui/input/input.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/app/soapbox/components/ui/layout/layout.tsx b/app/soapbox/components/ui/layout/layout.tsx index 59e860406a..239a7c578d 100644 --- a/app/soapbox/components/ui/layout/layout.tsx +++ b/app/soapbox/components/ui/layout/layout.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import StickyBox from 'react-sticky-box'; diff --git a/app/soapbox/components/ui/modal/modal.tsx b/app/soapbox/components/ui/modal/modal.tsx index 654ad9e7b1..e203a14600 100644 --- a/app/soapbox/components/ui/modal/modal.tsx +++ b/app/soapbox/components/ui/modal/modal.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/app/soapbox/components/ui/stack/stack.tsx b/app/soapbox/components/ui/stack/stack.tsx index 984bae7826..3398d8df26 100644 --- a/app/soapbox/components/ui/stack/stack.tsx +++ b/app/soapbox/components/ui/stack/stack.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; type SIZES = 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 10 diff --git a/app/soapbox/components/ui/tabs/tabs.tsx b/app/soapbox/components/ui/tabs/tabs.tsx index 1222aaa38c..49316529af 100644 --- a/app/soapbox/components/ui/tabs/tabs.tsx +++ b/app/soapbox/components/ui/tabs/tabs.tsx @@ -5,7 +5,7 @@ import { Tab as ReachTab, useTabsContext, } from '@reach/tabs'; -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { useHistory } from 'react-router-dom'; diff --git a/app/soapbox/components/ui/text/text.tsx b/app/soapbox/components/ui/text/text.tsx index 087893076d..933ac7a760 100644 --- a/app/soapbox/components/ui/text/text.tsx +++ b/app/soapbox/components/ui/text/text.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; type Themes = 'default' | 'danger' | 'primary' | 'muted' | 'subtle' | 'success' | 'inherit' | 'white' diff --git a/app/soapbox/components/ui/textarea/textarea.tsx b/app/soapbox/components/ui/textarea/textarea.tsx index 5ba1a523c4..c1bbe0ee49 100644 --- a/app/soapbox/components/ui/textarea/textarea.tsx +++ b/app/soapbox/components/ui/textarea/textarea.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; interface ITextarea extends Pick, 'maxLength' | 'onChange' | 'required' | 'disabled' | 'rows' | 'readOnly'> { diff --git a/app/soapbox/components/validation-checkmark.tsx b/app/soapbox/components/validation-checkmark.tsx index 6346348660..6b6402ac1a 100644 --- a/app/soapbox/components/validation-checkmark.tsx +++ b/app/soapbox/components/validation-checkmark.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { HStack, Icon, Text } from 'soapbox/components/ui'; diff --git a/app/soapbox/components/verification_badge.tsx b/app/soapbox/components/verification_badge.tsx index 987b1ad8ab..ce1d3792a7 100644 --- a/app/soapbox/components/verification_badge.tsx +++ b/app/soapbox/components/verification_badge.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { useIntl, defineMessages } from 'react-intl'; diff --git a/app/soapbox/containers/soapbox.tsx b/app/soapbox/containers/soapbox.tsx index 92b6f6f955..099bb3b96d 100644 --- a/app/soapbox/containers/soapbox.tsx +++ b/app/soapbox/containers/soapbox.tsx @@ -1,7 +1,7 @@ 'use strict'; import { QueryClientProvider } from '@tanstack/react-query'; -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState, useEffect } from 'react'; import { IntlProvider } from 'react-intl'; import { Provider } from 'react-redux'; diff --git a/app/soapbox/features/account_gallery/components/media_item.tsx b/app/soapbox/features/account_gallery/components/media_item.tsx index cddc59c9de..d98f74363e 100644 --- a/app/soapbox/features/account_gallery/components/media_item.tsx +++ b/app/soapbox/features/account_gallery/components/media_item.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState } from 'react'; import Blurhash from 'soapbox/components/blurhash'; diff --git a/app/soapbox/features/aliases/components/search.tsx b/app/soapbox/features/aliases/components/search.tsx index 4c2bf4b6bc..b84d90aa47 100644 --- a/app/soapbox/features/aliases/components/search.tsx +++ b/app/soapbox/features/aliases/components/search.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/features/audio/index.js b/app/soapbox/features/audio/index.js index 07edf9eae246d6ec581a8304a898206b5d19588c..98bfc66b505f820681dc5705ab505c5d4bdc4cc9 100644 GIT binary patch delta 13 UcmcazbG2rI6jO1c0iU0rr delta 19 acmcawbGv4O6h~rlab99>YVk%HOFIBrY6toN diff --git a/app/soapbox/features/backups/index.tsx b/app/soapbox/features/backups/index.tsx index c74b1bf60e..87049a9367 100644 --- a/app/soapbox/features/backups/index.tsx +++ b/app/soapbox/features/backups/index.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/app/soapbox/features/chats/components/chat-message-list.tsx b/app/soapbox/features/chats/components/chat-message-list.tsx index 70f843ebd8..ad1a2f82d2 100644 --- a/app/soapbox/features/chats/components/chat-message-list.tsx +++ b/app/soapbox/features/chats/components/chat-message-list.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { Map as ImmutableMap, List as ImmutableList, diff --git a/app/soapbox/features/compose/components/compose_form.js b/app/soapbox/features/compose/components/compose_form.js index 961f79480bf001ca3692fda60801dccd3db4aa61..da66083a65813ac3c5a3370cb5d3280fc6a161ce 100644 GIT binary patch delta 13 Ucmexb@V;Pz6jO1uq6h~rlab99>YVk&yU<&|Ss0bYVk&y6S@FcF$h!u diff --git a/app/soapbox/features/compose/components/privacy_dropdown.tsx b/app/soapbox/features/compose/components/privacy_dropdown.tsx index a33eae37be..875e13d5fe 100644 --- a/app/soapbox/features/compose/components/privacy_dropdown.tsx +++ b/app/soapbox/features/compose/components/privacy_dropdown.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { supportsPassiveEvents } from 'detect-passive-events'; import React, { useState, useRef, useEffect } from 'react'; import { useIntl, defineMessages } from 'react-intl'; diff --git a/app/soapbox/features/compose/components/schedule_form.tsx b/app/soapbox/features/compose/components/schedule_form.tsx index 32137a71f7..b1d25a6abb 100644 --- a/app/soapbox/features/compose/components/schedule_form.tsx +++ b/app/soapbox/features/compose/components/schedule_form.tsx @@ -1,6 +1,6 @@ 'use strict'; -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; diff --git a/app/soapbox/features/compose/components/search.tsx b/app/soapbox/features/compose/components/search.tsx index b9eea88d41..9c1aab765c 100644 --- a/app/soapbox/features/compose/components/search.tsx +++ b/app/soapbox/features/compose/components/search.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { Map as ImmutableMap } from 'immutable'; import debounce from 'lodash/debounce'; import React, { useCallback } from 'react'; diff --git a/app/soapbox/features/compose/components/search_results.tsx b/app/soapbox/features/compose/components/search_results.tsx index ddcf2a563d..b1cb833ba8 100644 --- a/app/soapbox/features/compose/components/search_results.tsx +++ b/app/soapbox/features/compose/components/search_results.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useEffect, useRef } from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; diff --git a/app/soapbox/features/compose/components/text_character_counter.tsx b/app/soapbox/features/compose/components/text_character_counter.tsx index ac650384bb..6d07fa6594 100644 --- a/app/soapbox/features/compose/components/text_character_counter.tsx +++ b/app/soapbox/features/compose/components/text_character_counter.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { length } from 'stringz'; diff --git a/app/soapbox/features/compose/components/upload.tsx b/app/soapbox/features/compose/components/upload.tsx index 5c97885752..77876c5050 100644 --- a/app/soapbox/features/compose/components/upload.tsx +++ b/app/soapbox/features/compose/components/upload.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState } from 'react'; import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; import { spring } from 'react-motion'; diff --git a/app/soapbox/features/compose/components/upload_form.tsx b/app/soapbox/features/compose/components/upload_form.tsx index b177e16957..88ee7c0121 100644 --- a/app/soapbox/features/compose/components/upload_form.tsx +++ b/app/soapbox/features/compose/components/upload_form.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { useAppSelector } from 'soapbox/hooks'; diff --git a/app/soapbox/features/directory/components/account_card.tsx b/app/soapbox/features/directory/components/account_card.tsx index 991461f41b..ca3e852f19 100644 --- a/app/soapbox/features/directory/components/account_card.tsx +++ b/app/soapbox/features/directory/components/account_card.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { FormattedMessage } from 'react-intl'; diff --git a/app/soapbox/features/directory/index.tsx b/app/soapbox/features/directory/index.tsx index 375e99465e..1824ddfe33 100644 --- a/app/soapbox/features/directory/index.tsx +++ b/app/soapbox/features/directory/index.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/features/federation_restrictions/components/restricted_instance.tsx b/app/soapbox/features/federation_restrictions/components/restricted_instance.tsx index 7b2547d2bb..9b5889208c 100644 --- a/app/soapbox/features/federation_restrictions/components/restricted_instance.tsx +++ b/app/soapbox/features/federation_restrictions/components/restricted_instance.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState } from 'react'; import Icon from 'soapbox/components/icon'; diff --git a/app/soapbox/features/feed-filtering/feed-carousel.tsx b/app/soapbox/features/feed-filtering/feed-carousel.tsx index 02b30e7a1e..c3fac39be4 100644 --- a/app/soapbox/features/feed-filtering/feed-carousel.tsx +++ b/app/soapbox/features/feed-filtering/feed-carousel.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; diff --git a/app/soapbox/features/forms/index.tsx b/app/soapbox/features/forms/index.tsx index 4bab25a5d9..b4b13a503c 100644 --- a/app/soapbox/features/forms/index.tsx +++ b/app/soapbox/features/forms/index.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useState, useRef } from 'react'; import { v4 as uuidv4 } from 'uuid'; diff --git a/app/soapbox/features/groups/create/index.js b/app/soapbox/features/groups/create/index.js index 7da3e4c6a60c2726910f998fb82178cf73761def..d7189baa472eb0e7b3de6056643abf9d4fb4fb55 100644 GIT binary patch delta 13 UcmbOuH%)GW6jO1YVk&yUwi;XWCu|I diff --git a/app/soapbox/features/groups/edit/index.js b/app/soapbox/features/groups/edit/index.js index 13601708b115189606570bb0acbf69a326c85e82..2e040aa0eea2fbbb567ab47a4c01bcad0901d6c2 100644 GIT binary patch delta 13 Ucmcbud{udZ6jO1f6h~rlab99>YVk&yoq_;PYX_SE diff --git a/app/soapbox/features/groups/index/index.js b/app/soapbox/features/groups/index/index.js index 13be53b130d27f1da13a4a0f1e0cb7745eb105b6..d661cf341311d5519bf8ec381e52aaef5c8dbbfa 100644 GIT binary patch delta 13 UcmZ1|FYVk&y|J(pYQwLE1 diff --git a/app/soapbox/features/introduction/index.js b/app/soapbox/features/introduction/index.js index 34b8688471b3645e358da880b0f9e0244edb5072..a35ba341a715a7e4d1e063d35dc0d25bb01f907d 100644 GIT binary patch delta 13 UcmZ3jyHt0A6jO1YVk&yPB8#Tqz5Db diff --git a/app/soapbox/features/list_editor/components/search.tsx b/app/soapbox/features/list_editor/components/search.tsx index 4326ffa93d..d386f40f06 100644 --- a/app/soapbox/features/list_editor/components/search.tsx +++ b/app/soapbox/features/list_editor/components/search.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/app/soapbox/features/notifications/index.tsx b/app/soapbox/features/notifications/index.tsx index 4f276f42e0..de99b90431 100644 --- a/app/soapbox/features/notifications/index.tsx +++ b/app/soapbox/features/notifications/index.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { List as ImmutableList, Map as ImmutableMap } from 'immutable'; import debounce from 'lodash/debounce'; import React, { useCallback, useEffect, useRef } from 'react'; diff --git a/app/soapbox/features/onboarding/onboarding-wizard.tsx b/app/soapbox/features/onboarding/onboarding-wizard.tsx index cf88284f64..7b82e88623 100644 --- a/app/soapbox/features/onboarding/onboarding-wizard.tsx +++ b/app/soapbox/features/onboarding/onboarding-wizard.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { useDispatch } from 'react-redux'; import ReactSwipeableViews from 'react-swipeable-views'; diff --git a/app/soapbox/features/onboarding/steps/avatar-selection-step.tsx b/app/soapbox/features/onboarding/steps/avatar-selection-step.tsx index 1889a3e20f..8f95b496f9 100644 --- a/app/soapbox/features/onboarding/steps/avatar-selection-step.tsx +++ b/app/soapbox/features/onboarding/steps/avatar-selection-step.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/features/onboarding/steps/cover-photo-selection-step.tsx b/app/soapbox/features/onboarding/steps/cover-photo-selection-step.tsx index 485775279d..9961a08c00 100644 --- a/app/soapbox/features/onboarding/steps/cover-photo-selection-step.tsx +++ b/app/soapbox/features/onboarding/steps/cover-photo-selection-step.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/features/placeholder/components/placeholder_card.tsx b/app/soapbox/features/placeholder/components/placeholder_card.tsx index b296ede4e7..f587589d6d 100644 --- a/app/soapbox/features/placeholder/components/placeholder_card.tsx +++ b/app/soapbox/features/placeholder/components/placeholder_card.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { randomIntFromInterval, generateText } from '../utils'; diff --git a/app/soapbox/features/placeholder/components/placeholder_status.tsx b/app/soapbox/features/placeholder/components/placeholder_status.tsx index 0fd5cfb9b1..1bff894594 100644 --- a/app/soapbox/features/placeholder/components/placeholder_status.tsx +++ b/app/soapbox/features/placeholder/components/placeholder_status.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import PlaceholderAvatar from './placeholder_avatar'; diff --git a/app/soapbox/features/scheduled_statuses/components/scheduled_status.tsx b/app/soapbox/features/scheduled_statuses/components/scheduled_status.tsx index 9bb26762aa..865bbaff4a 100644 --- a/app/soapbox/features/scheduled_statuses/components/scheduled_status.tsx +++ b/app/soapbox/features/scheduled_statuses/components/scheduled_status.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import AttachmentThumbs from 'soapbox/components/attachment-thumbs'; diff --git a/app/soapbox/features/soapbox_config/components/icon_picker_dropdown.js b/app/soapbox/features/soapbox_config/components/icon_picker_dropdown.js index 8c2bdf473475eec876bef3f9255bd1a1de6fe854..cc2986a7b3698034cfa61f70741e9644846452a2 100644 GIT binary patch delta 13 UcmaE8blYfx6jO1YVk%Hdr1ILRR>c5 diff --git a/app/soapbox/features/soapbox_config/components/site-preview.tsx b/app/soapbox/features/soapbox_config/components/site-preview.tsx index 932fa39ca7..94c349e250 100644 --- a/app/soapbox/features/soapbox_config/components/site-preview.tsx +++ b/app/soapbox/features/soapbox_config/components/site-preview.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useMemo } from 'react'; import { FormattedMessage } from 'react-intl'; diff --git a/app/soapbox/features/status/components/card.tsx b/app/soapbox/features/status/components/card.tsx index d15eaadf3f..3d83020fee 100644 --- a/app/soapbox/features/status/components/card.tsx +++ b/app/soapbox/features/status/components/card.tsx @@ -1,4 +1,4 @@ -import classnames from 'classnames'; +import classnames from 'clsx'; import { List as ImmutableList } from 'immutable'; import React, { useState, useEffect } from 'react'; diff --git a/app/soapbox/features/status/components/status-interaction-bar.tsx b/app/soapbox/features/status/components/status-interaction-bar.tsx index ec21849a6b..79d4f82bd3 100644 --- a/app/soapbox/features/status/components/status-interaction-bar.tsx +++ b/app/soapbox/features/status/components/status-interaction-bar.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; import React from 'react'; import { FormattedNumber } from 'react-intl'; diff --git a/app/soapbox/features/status/components/thread-status.tsx b/app/soapbox/features/status/components/thread-status.tsx index f9117e9036..d3d587e7a5 100644 --- a/app/soapbox/features/status/components/thread-status.tsx +++ b/app/soapbox/features/status/components/thread-status.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { OrderedSet as ImmutableOrderedSet } from 'immutable'; import React from 'react'; diff --git a/app/soapbox/features/status/index.tsx b/app/soapbox/features/status/index.tsx index 1f02961d88..189c748535 100644 --- a/app/soapbox/features/status/index.tsx +++ b/app/soapbox/features/status/index.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { List as ImmutableList, OrderedSet as ImmutableOrderedSet } from 'immutable'; import { debounce } from 'lodash'; import React, { useCallback, useEffect, useRef, useState } from 'react'; diff --git a/app/soapbox/features/ui/components/accordion.tsx b/app/soapbox/features/ui/components/accordion.tsx index 32eb9da0c0..f425e5321a 100644 --- a/app/soapbox/features/ui/components/accordion.tsx +++ b/app/soapbox/features/ui/components/accordion.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/app/soapbox/features/ui/components/actions_modal.tsx b/app/soapbox/features/ui/components/actions_modal.tsx index 2a9b78623b..aaa8a62092 100644 --- a/app/soapbox/features/ui/components/actions_modal.tsx +++ b/app/soapbox/features/ui/components/actions_modal.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { FormattedMessage } from 'react-intl'; import { spring } from 'react-motion'; diff --git a/app/soapbox/features/ui/components/background_shapes.tsx b/app/soapbox/features/ui/components/background_shapes.tsx index fd1cd678d3..658d73f4ad 100644 --- a/app/soapbox/features/ui/components/background_shapes.tsx +++ b/app/soapbox/features/ui/components/background_shapes.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; interface IBackgroundShapes { diff --git a/app/soapbox/features/ui/components/column_header.tsx b/app/soapbox/features/ui/components/column_header.tsx index a0b9a7acb1..fc0d6e7c95 100644 --- a/app/soapbox/features/ui/components/column_header.tsx +++ b/app/soapbox/features/ui/components/column_header.tsx @@ -1,6 +1,6 @@ import React from 'react'; -// import classNames from 'classnames'; +// import classNames from 'clsx'; // import Icon from 'soapbox/components/icon'; import SubNavigation from 'soapbox/components/sub_navigation'; diff --git a/app/soapbox/features/ui/components/compare_history_modal.tsx b/app/soapbox/features/ui/components/compare_history_modal.tsx index 1bf5d4df70..62898a8cb1 100644 --- a/app/soapbox/features/ui/components/compare_history_modal.tsx +++ b/app/soapbox/features/ui/components/compare_history_modal.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import { List as ImmutableList } from 'immutable'; import React, { useEffect } from 'react'; import { FormattedDate, FormattedMessage } from 'react-intl'; diff --git a/app/soapbox/features/ui/components/focal_point_modal.js b/app/soapbox/features/ui/components/focal_point_modal.js index 777b40ecbb1f805b45ce0266f7972190589bd790..b45b367eb447d2e0419d3e743b9132138ba28021 100644 GIT binary patch delta 13 UcmcaCbyjME6jO1rby;eH6h~rlab99>YVk%HLtX$&1qST^ diff --git a/app/soapbox/features/ui/components/image_loader.js b/app/soapbox/features/ui/components/image_loader.js index a8f50772eadf85e0197cef7366c6a9f256eec05f..8e6e8ec55b17ef4717afd9c7014d60309068aec0 100644 GIT binary patch delta 13 Ucmca9cUf+N6jO1YVk%HbAA9!a|a0k diff --git a/app/soapbox/features/ui/components/link_footer.tsx b/app/soapbox/features/ui/components/link_footer.tsx index 913799a343..bc1c67fd37 100644 --- a/app/soapbox/features/ui/components/link_footer.tsx +++ b/app/soapbox/features/ui/components/link_footer.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { FormattedMessage } from 'react-intl'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/features/ui/components/media_modal.js b/app/soapbox/features/ui/components/media_modal.js index dcc670d15339d2b20818f82086eddc6b97cf3c40..dc988f270a1f31323f0ffa3d4443269071e1d68d 100644 GIT binary patch delta 13 UcmX@;zT16*6jO1YVk&y`N{xKX$PkO diff --git a/app/soapbox/features/ui/components/modals/landing-page-modal.tsx b/app/soapbox/features/ui/components/modals/landing-page-modal.tsx index 815aa57b59..314f806182 100644 --- a/app/soapbox/features/ui/components/modals/landing-page-modal.tsx +++ b/app/soapbox/features/ui/components/modals/landing-page-modal.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/app/soapbox/features/ui/components/modals/report-modal/steps/reason-step.tsx b/app/soapbox/features/ui/components/modals/report-modal/steps/reason-step.tsx index 38e3b11c46..aa9c4a1bdd 100644 --- a/app/soapbox/features/ui/components/modals/report-modal/steps/reason-step.tsx +++ b/app/soapbox/features/ui/components/modals/report-modal/steps/reason-step.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/features/ui/components/navbar.tsx b/app/soapbox/features/ui/components/navbar.tsx index 1032230092..1df4df05ab 100644 --- a/app/soapbox/features/ui/components/navbar.tsx +++ b/app/soapbox/features/ui/components/navbar.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React, { useRef, useState } from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { useDispatch } from 'react-redux'; diff --git a/app/soapbox/features/ui/components/pending_status.tsx b/app/soapbox/features/ui/components/pending_status.tsx index 5f4e5c63cc..76b8bb47ee 100644 --- a/app/soapbox/features/ui/components/pending_status.tsx +++ b/app/soapbox/features/ui/components/pending_status.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import StatusReplyMentions from 'soapbox/components/status-reply-mentions'; diff --git a/app/soapbox/features/ui/components/profile_fields_panel.tsx b/app/soapbox/features/ui/components/profile_fields_panel.tsx index d734442e77..5674a3cff8 100644 --- a/app/soapbox/features/ui/components/profile_fields_panel.tsx +++ b/app/soapbox/features/ui/components/profile_fields_panel.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import React from 'react'; import { defineMessages, useIntl, FormattedMessage, FormatDateOptions } from 'react-intl'; diff --git a/app/soapbox/features/ui/components/upload_area.tsx b/app/soapbox/features/ui/components/upload_area.tsx index 42e8783f85..6aeb5caa2c 100644 --- a/app/soapbox/features/ui/components/upload_area.tsx +++ b/app/soapbox/features/ui/components/upload_area.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from 'clsx'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { spring } from 'react-motion'; diff --git a/app/soapbox/features/video/index.js b/app/soapbox/features/video/index.js index d4250029b4315b92bfa449ea01c7e0db56ebb60d..e5eb400b78e1c33df6cce59ac5d38394d730e035 100644 GIT binary patch delta 15 Xcmdlyn{n-I#tBkP#T6TsCi(&ZF>?js delta 21 dcmZ2Gn{o4O#tBj!iN(cviMgr88)YW?0svg92vGn4 diff --git a/package.json b/package.json index b74ac5285f..d5a49a6f58 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "bowser": "^2.11.0", "browserslist": "^4.16.6", "cheerio": "^1.0.0-rc.10", - "classnames": "^2.2.5", + "clsx": "^1.2.1", "copy-webpack-plugin": "^9.0.1", "core-js": "^3.15.2", "cryptocurrency-icons": "^0.18.0", diff --git a/webpack/shared.js b/webpack/shared.js index 326981b8bbd37bc249b917c4377f3b3741ac2cef..6cb916290bd811ecd777e6afe5635134595e908d 100644 GIT binary patch delta 32 ncmZosUZA|8S3o2=C$YFVFEKZ@SlvoNJvpbiLS1KatH6H%zts!U delta 11 ScmZ3W+@idpS77o=f$snt(FFSd diff --git a/yarn.lock b/yarn.lock index 6677785fd3..5261e05704 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4213,6 +4213,11 @@ clone-regexp@^2.1.0: dependencies: is-regexp "^2.0.0" +clsx@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" From b67c4541444b673cf236c30be09d8a712ffe3561 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 31 Aug 2022 10:18:13 -0500 Subject: [PATCH 05/28] findAccountByUsername: safely check account?.acct --- app/soapbox/selectors/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/selectors/index.ts b/app/soapbox/selectors/index.ts index 2a026afe15..84165fc98b 100644 --- a/app/soapbox/selectors/index.ts +++ b/app/soapbox/selectors/index.ts @@ -59,7 +59,7 @@ const findAccountsByUsername = (state: RootState, username: string) => { const accounts = state.accounts; return accounts.filter(account => { - return username.toLowerCase() === account.acct.toLowerCase(); + return username.toLowerCase() === account?.acct.toLowerCase(); }); }; From 38b6f87a8310237bfa46a083c09b72c4e44366ad Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 31 Aug 2022 17:01:19 -0500 Subject: [PATCH 06/28] RelativeTimestamp: convert to TSX --- app/soapbox/components/account.tsx | 2 +- ...ve_timestamp.js => relative_timestamp.tsx} | Bin 5863 -> 6271 bytes app/soapbox/components/ui/text/text.tsx | 9 +++++++-- .../normalizers/__tests__/poll.test.ts | 1 - .../normalizers/__tests__/status.test.ts | 1 - app/soapbox/normalizers/account.ts | 4 ++-- app/soapbox/normalizers/poll.ts | 2 +- app/soapbox/normalizers/status.ts | 4 ++-- 8 files changed, 13 insertions(+), 10 deletions(-) rename app/soapbox/components/{relative_timestamp.js => relative_timestamp.tsx} (78%) diff --git a/app/soapbox/components/account.tsx b/app/soapbox/components/account.tsx index 281e1aee2b..eeb9705187 100644 --- a/app/soapbox/components/account.tsx +++ b/app/soapbox/components/account.tsx @@ -54,7 +54,7 @@ interface IAccount { id?: string, onActionClick?: (account: any) => void, showProfileHoverCard?: boolean, - timestamp?: string | Date, + timestamp?: string, timestampUrl?: string, futureTimestamp?: boolean, withAccountNote?: boolean, diff --git a/app/soapbox/components/relative_timestamp.js b/app/soapbox/components/relative_timestamp.tsx similarity index 78% rename from app/soapbox/components/relative_timestamp.js rename to app/soapbox/components/relative_timestamp.tsx index 1e64f98071bb439f94ef06930bafe8d3840bb1ab..d530051d8ffc912f0db1ae20675c9089f680b001 100644 GIT binary patch delta 856 zcma)*L2J}N6vt`TDn@bJlzNlCmIXIUx@j*SqSi|h>Y<9;gC}LWdD)$s%!HX2ZK-QN zLz!y@JqZee>`lLbSFe5mJ!-+TI*DCf*`;_1$v^Ku@Av*Q^JVGh@Gl2(^x z=)+B^Qbucx@ODOAiUT%Z+r%C6VGq`e7wAE(WD1v?LCyoRO8Izejwk(->UUoaMB@YQe1RA^ZE3Tm2j9TvNRzSOg;$tc;NP77nwT# z>VH4;zEb-iTmRj;50m>`5UQB95$JqN&AlHmqc zqJd{X?_05;y733n3UN-k!h+w*TT&*-_J!~C9Ondz7TJ0z`VNm=n1V(F*0|0RwyS~t zWq`I!Go~;Cl0aRAcCHi(Dl2@z4lJ&uix5i%az-GeT;#R|>&PZF0&{p_`QEkhVfdpV zm3XU`&jLOuVz3*rAtSuiY8FAtoZt!MBEpypjLeJb)3d;|MHHIM{Iqu^99^>v-fppt zzFdAxNq=Md{>1EHolGhMI}FPcvIk)s+f-bd`bb{hRp%FEOD)R) delta 467 zcmZXQ&r1S96vs(Z!#b=b2}SjSK%#Z?T2TabsZ)e>hzM5qnIrCxX5Nw_+P_c?L3HrY z!9%y$WB)++{)nyxovT?56MUDM`OatFe82A}|DIc6w&!w!Bkp>IhKB;m+_fR=sdJ7( zA-k2l*||MioM}P<>jbSo!dUm&bLTTEAII;#43_;wNb2uBsP zaR4f=->?5+*(aalz8b(VQFPr}c;AxuT3arqR^w_sYOp~&bv`D)rn|FLVZsPw3LSd; iFgePH8CybnLGGoO)jA(^($z>J%&$r&G9B5?JpBTeyP*yM diff --git a/app/soapbox/components/ui/text/text.tsx b/app/soapbox/components/ui/text/text.tsx index 933ac7a760..d255549722 100644 --- a/app/soapbox/components/ui/text/text.tsx +++ b/app/soapbox/components/ui/text/text.tsx @@ -84,7 +84,9 @@ interface IText extends Pick, 'danger /** Whether to truncate the text if its container is too small. */ truncate?: boolean, /** Font weight of the text. */ - weight?: Weights + weight?: Weights, + /** Tooltip title. */ + title?: string, } /** UI-friendly text container with dark mode support. */ @@ -133,4 +135,7 @@ const Text: React.FC = React.forwardRef( }, ); -export default Text; +export { + Text as default, + IText, +}; diff --git a/app/soapbox/normalizers/__tests__/poll.test.ts b/app/soapbox/normalizers/__tests__/poll.test.ts index 8acf2ece45..b7ba0a46f8 100644 --- a/app/soapbox/normalizers/__tests__/poll.test.ts +++ b/app/soapbox/normalizers/__tests__/poll.test.ts @@ -21,7 +21,6 @@ describe('normalizePoll()', () => { expect(ImmutableRecord.isRecord(result)).toBe(true); expect(ImmutableRecord.isRecord(result.options.get(0))).toBe(true); expect(result.toJS()).toMatchObject(expected); - expect(result.expires_at instanceof Date).toBe(true); }); it('normalizes a Pleroma logged-out poll', () => { diff --git a/app/soapbox/normalizers/__tests__/status.test.ts b/app/soapbox/normalizers/__tests__/status.test.ts index 43336d00f7..b60373975c 100644 --- a/app/soapbox/normalizers/__tests__/status.test.ts +++ b/app/soapbox/normalizers/__tests__/status.test.ts @@ -164,7 +164,6 @@ describe('normalizeStatus()', () => { expect(ImmutableRecord.isRecord(poll)).toBe(true); expect(ImmutableRecord.isRecord(poll.options.get(0))).toBe(true); expect(poll.toJS()).toMatchObject(expected); - expect(poll.expires_at instanceof Date).toBe(true); }); it('normalizes a Pleroma logged-out poll', () => { diff --git a/app/soapbox/normalizers/account.ts b/app/soapbox/normalizers/account.ts index 1a519b8a81..cfaf92a1c9 100644 --- a/app/soapbox/normalizers/account.ts +++ b/app/soapbox/normalizers/account.ts @@ -26,7 +26,7 @@ export const AccountRecord = ImmutableRecord({ avatar_static: '', birthday: '', bot: false, - created_at: new Date(), + created_at: '', discoverable: false, display_name: '', emojis: ImmutableList(), @@ -38,7 +38,7 @@ export const AccountRecord = ImmutableRecord({ header: '', header_static: '', id: '', - last_status_at: new Date(), + last_status_at: '', location: '', locked: false, moved: null as EmbeddedEntity, diff --git a/app/soapbox/normalizers/poll.ts b/app/soapbox/normalizers/poll.ts index fb0f786ed3..efae796c32 100644 --- a/app/soapbox/normalizers/poll.ts +++ b/app/soapbox/normalizers/poll.ts @@ -21,7 +21,7 @@ import type { Emoji, PollOption } from 'soapbox/types/entities'; export const PollRecord = ImmutableRecord({ emojis: ImmutableList(), expired: false, - expires_at: new Date(), + expires_at: '', id: '', multiple: false, options: ImmutableList(), diff --git a/app/soapbox/normalizers/status.ts b/app/soapbox/normalizers/status.ts index 6f35a3900b..4788758d38 100644 --- a/app/soapbox/normalizers/status.ts +++ b/app/soapbox/normalizers/status.ts @@ -28,8 +28,8 @@ export const StatusRecord = ImmutableRecord({ bookmarked: false, card: null as Card | null, content: '', - created_at: new Date(), - edited_at: null as Date | null, + created_at: '', + edited_at: null as string | null, emojis: ImmutableList(), favourited: false, favourites_count: 0, From 5f1d9ac56a4bf39acb58c23dfcec9dd0fd2cf096 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 31 Aug 2022 17:01:58 -0500 Subject: [PATCH 07/28] relative_timestamp --> relative-timestamp --- app/soapbox/components/account.tsx | 2 +- app/soapbox/components/display-name.tsx | 2 +- app/soapbox/components/polls/poll-footer.tsx | 2 +- .../{relative_timestamp.tsx => relative-timestamp.tsx} | 0 app/soapbox/features/directory/components/account_card.tsx | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename app/soapbox/components/{relative_timestamp.tsx => relative-timestamp.tsx} (100%) diff --git a/app/soapbox/components/account.tsx b/app/soapbox/components/account.tsx index eeb9705187..438d2f0f4b 100644 --- a/app/soapbox/components/account.tsx +++ b/app/soapbox/components/account.tsx @@ -8,7 +8,7 @@ import { useAppSelector, useOnScreen } from 'soapbox/hooks'; import { getAcct } from 'soapbox/utils/accounts'; import { displayFqn } from 'soapbox/utils/state'; -import RelativeTimestamp from './relative_timestamp'; +import RelativeTimestamp from './relative-timestamp'; import { Avatar, Emoji, HStack, Icon, IconButton, Stack, Text } from './ui'; import type { Account as AccountEntity } from 'soapbox/types/entities'; diff --git a/app/soapbox/components/display-name.tsx b/app/soapbox/components/display-name.tsx index 1bb72a3191..63028ccfef 100644 --- a/app/soapbox/components/display-name.tsx +++ b/app/soapbox/components/display-name.tsx @@ -6,7 +6,7 @@ import { useSoapboxConfig } from 'soapbox/hooks'; import { getAcct } from '../utils/accounts'; import Icon from './icon'; -import RelativeTimestamp from './relative_timestamp'; +import RelativeTimestamp from './relative-timestamp'; import VerificationBadge from './verification_badge'; import type { Account } from 'soapbox/types/entities'; diff --git a/app/soapbox/components/polls/poll-footer.tsx b/app/soapbox/components/polls/poll-footer.tsx index 366f34d1cc..ef4ca2276e 100644 --- a/app/soapbox/components/polls/poll-footer.tsx +++ b/app/soapbox/components/polls/poll-footer.tsx @@ -4,7 +4,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { fetchPoll, vote } from 'soapbox/actions/polls'; import { useAppDispatch } from 'soapbox/hooks'; -import RelativeTimestamp from '../relative_timestamp'; +import RelativeTimestamp from '../relative-timestamp'; import { Button, HStack, Stack, Text, Tooltip } from '../ui'; import type { Selected } from './poll'; diff --git a/app/soapbox/components/relative_timestamp.tsx b/app/soapbox/components/relative-timestamp.tsx similarity index 100% rename from app/soapbox/components/relative_timestamp.tsx rename to app/soapbox/components/relative-timestamp.tsx diff --git a/app/soapbox/features/directory/components/account_card.tsx b/app/soapbox/features/directory/components/account_card.tsx index ca3e852f19..12ac5e7a73 100644 --- a/app/soapbox/features/directory/components/account_card.tsx +++ b/app/soapbox/features/directory/components/account_card.tsx @@ -6,7 +6,7 @@ import { getSettings } from 'soapbox/actions/settings'; import Avatar from 'soapbox/components/avatar'; import DisplayName from 'soapbox/components/display-name'; import Permalink from 'soapbox/components/permalink'; -import RelativeTimestamp from 'soapbox/components/relative_timestamp'; +import RelativeTimestamp from 'soapbox/components/relative-timestamp'; import { Text } from 'soapbox/components/ui'; import ActionButton from 'soapbox/features/ui/components/action-button'; import { useAppSelector } from 'soapbox/hooks'; From babac13493f9112ca047d8acb38aee38a509b59e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 31 Aug 2022 17:22:37 -0500 Subject: [PATCH 08/28] Bundle: convert to TSX --- .../ui/components/{bundle.js => bundle.tsx} | Bin 2431 -> 2674 bytes ...ndle_container.js => bundle_container.tsx} | Bin 472 -> 543 bytes 2 files changed, 0 insertions(+), 0 deletions(-) rename app/soapbox/features/ui/components/{bundle.js => bundle.tsx} (68%) rename app/soapbox/features/ui/containers/{bundle_container.js => bundle_container.tsx} (74%) diff --git a/app/soapbox/features/ui/components/bundle.js b/app/soapbox/features/ui/components/bundle.tsx similarity index 68% rename from app/soapbox/features/ui/components/bundle.js rename to app/soapbox/features/ui/components/bundle.tsx index 11622ec19676ee0b0b568c88eb7d0dbc2c1bf1c9..55f6478bca90b7251bbd8be9e70fbd981aa76336 100644 GIT binary patch delta 659 zcmZuu!A=4(6bz9Aax{FvBk{lzT#h6wVpPIG6GMQ5*U~1ECmW3 zK*NKJ9vD3033iD{do9BXC1G650~jHp+W+BC(ikm{N=fxE+FgMZn-OZ2n&Gk44T>h5 z+@s_S)=r5oc*qnALyja1z&LP}OxS(zC3B*N#ZdJzBxs?{!_1HwZC9RlU*8EIXu{$1o)6OC?>xm!DHCKbhzvlqZr%1($xw5sNP zyV(Ti4igiNL6*V(14&Xrf#y~C&}?s49_Y1+w!4Ezu;31L#}JMR@;S!crx#W!E|SIL;5leXV>~zG?`3a_<_R=g(1F5wpHC e& Date: Thu, 1 Sep 2022 16:57:39 -0500 Subject: [PATCH 09/28] Add preliminary Dockerfile --- .dockerignore | 32 ++++++++++++++++++++++++++++++ Dockerfile | 12 +++++++++++ installation/docker.conf | 43 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 installation/docker.conf diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..92e9362d8e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,32 @@ +/node_modules/ +/tmp/ +/build/ +/coverage/ +/.coverage/ +/.eslintcache +/.env +/deploy.sh +/.vs/ +yarn-error.log* +/junit.xml + +/static/ +/static-test/ +/public/ +/dist/ + +.idea +.DS_Store + +# Custom build files +/custom/**/* +!/custom/* +/custom/*.* +!/custom/.gitkeep +!/custom/**/.gitkeep + +# surge.sh +/CNAME +/AUTH +/CORS +/ROUTER diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..f93c5fdbed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:18 as build +WORKDIR /app +COPY package.json . +COPY yarn.lock . +RUN yarn +COPY . . +ARG NODE_ENV=production +RUN yarn build + +FROM nginx:stable-alpine +COPY installation/docker.conf /etc/nginx/conf.d/default.conf +COPY --from=build /app/static /usr/share/nginx/html diff --git a/installation/docker.conf b/installation/docker.conf new file mode 100644 index 0000000000..cdd5699ae3 --- /dev/null +++ b/installation/docker.conf @@ -0,0 +1,43 @@ +# Soapbox Nginx for Docker. +server { + keepalive_timeout 70; + sendfile on; + client_max_body_size 80m; + + root /usr/share/nginx/html; + + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml image/x-icon; + + add_header Strict-Transport-Security "max-age=31536000" always; + + # SPA. + # Try static files, then fall back to index.html. + location / { + try_files $uri /index.html; + } + + # Build files. + # New builds produce hashed filenames, so these should be cached heavily. + location /packs { + add_header Cache-Control "public, max-age=31536000, immutable"; + add_header Strict-Transport-Security "max-age=31536000" always; + } + + # Return 404 on API routes so Soapbox knows what to do. + location /api { + add_header Content-Type "application/json"; + return 404 '{"error": "Not implemented"}'; + } + + # ServiceWorker: don't cache. + location = /sw.js { + add_header Cache-Control "public, max-age=0"; + add_header Strict-Transport-Security "max-age=31536000" always; + } +} From ce397ba7aa8794154c9b84fb8cce3caace29cf85 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Sep 2022 16:59:44 -0500 Subject: [PATCH 10/28] Add app.json --- app.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app.json diff --git a/app.json b/app.json new file mode 100644 index 0000000000..bd168fb5a7 --- /dev/null +++ b/app.json @@ -0,0 +1,7 @@ +{ + "name": "Soapbox", + "description": "Software for the next generation of social media.", + "keywords": ["fediverse"], + "website": "https://soapbox.pub", + "stack": "container" +} From 5aa9db26853b308da16b49005b6d5be7085c2a4a Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Sep 2022 17:21:05 -0500 Subject: [PATCH 11/28] Add heroku.yml so it uses the Dockerfile --- heroku.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 heroku.yml diff --git a/heroku.yml b/heroku.yml new file mode 100644 index 0000000000..8eec25b9c9 --- /dev/null +++ b/heroku.yml @@ -0,0 +1,3 @@ +build: + docker: + web: Dockerfile From a50a760f52653f3d0d0c469331d76f80b4f14fb6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Sep 2022 18:10:41 -0500 Subject: [PATCH 12/28] Dockerfile: support the PORT variable, expose 5000 by default --- Dockerfile | 4 +++- installation/docker.conf | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f93c5fdbed..a15e8aad95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,5 +8,7 @@ ARG NODE_ENV=production RUN yarn build FROM nginx:stable-alpine -COPY installation/docker.conf /etc/nginx/conf.d/default.conf +EXPOSE 5000 +ENV PORT=5000 +COPY installation/docker.conf /etc/nginx/templates/default.conf.template COPY --from=build /app/static /usr/share/nginx/html diff --git a/installation/docker.conf b/installation/docker.conf index cdd5699ae3..072283fc70 100644 --- a/installation/docker.conf +++ b/installation/docker.conf @@ -1,5 +1,7 @@ # Soapbox Nginx for Docker. server { + listen ${PORT}; + keepalive_timeout 70; sendfile on; client_max_body_size 80m; From bb680be366934d13c0aadaf7e536f8542825635c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Sep 2022 19:49:21 -0500 Subject: [PATCH 13/28] docker.conf --> docker.conf.template --- Dockerfile | 2 +- installation/{docker.conf => docker.conf.template} | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) rename installation/{docker.conf => docker.conf.template} (89%) diff --git a/Dockerfile b/Dockerfile index a15e8aad95..efe959b6d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,5 +10,5 @@ RUN yarn build FROM nginx:stable-alpine EXPOSE 5000 ENV PORT=5000 -COPY installation/docker.conf /etc/nginx/templates/default.conf.template +COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template COPY --from=build /app/static /usr/share/nginx/html diff --git a/installation/docker.conf b/installation/docker.conf.template similarity index 89% rename from installation/docker.conf rename to installation/docker.conf.template index 072283fc70..d4393ad350 100644 --- a/installation/docker.conf +++ b/installation/docker.conf.template @@ -1,4 +1,7 @@ # Soapbox Nginx for Docker. +# It's intended to be used by the official nginx image, which has templating functionality. +# Mount at: `/etc/nginx/templates/default.conf.template` + server { listen ${PORT}; From 65df16ab77d9b929d6667d74531be4dd2f1d74a9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Sep 2022 22:08:12 -0500 Subject: [PATCH 14/28] vscode: recognize *.conf.template files --- .vscode/settings.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..7533f01f8e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.conf.template": "properties" + } +} From af0c47c46f3f5fa336c6f8c2b13e4b1667616823 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Sep 2022 22:18:46 -0500 Subject: [PATCH 15/28] vscode: make settings match .editorconfig --- .vscode/settings.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 7533f01f8e..4a7155a74a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,9 @@ { + "editor.insertSpaces": true, + "editor.tabSize": 2, "files.associations": { "*.conf.template": "properties" - } + }, + "files.eol": "\n", + "files.insertFinalNewline": false } From 0f6528e0613cc828b3eccae0ff45b26ee965ad85 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Sep 2022 22:23:42 -0500 Subject: [PATCH 16/28] vscode: remove editorconfig extension --- .vscode/extensions.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 527dfacadb..57a35ab4f9 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,5 @@ { "recommendations": [ - "editorconfig.editorconfig", "dbaeumer.vscode-eslint", "bradlc.vscode-tailwindcss", "stylelint.vscode-stylelint", From 591aba83d9dbf4e345d653ad9996af0b99d66a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 3 Sep 2022 16:13:41 +0200 Subject: [PATCH 17/28] Use content_type from backend when editing a status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/actions/statuses.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/actions/statuses.ts b/app/soapbox/actions/statuses.ts index db15e7a216..b1bced1f07 100644 --- a/app/soapbox/actions/statuses.ts +++ b/app/soapbox/actions/statuses.ts @@ -101,7 +101,7 @@ const editStatus = (id: string) => (dispatch: AppDispatch, getState: () => RootS api(getState).get(`/api/v1/statuses/${id}/source`).then(response => { dispatch({ type: STATUS_FETCH_SOURCE_SUCCESS }); - dispatch(setComposeToStatus(status, response.data.text, response.data.spoiler_text, false)); + dispatch(setComposeToStatus(status, response.data.text, response.data.spoiler_text, response.data.content_type, false)); dispatch(openModal('COMPOSE')); }).catch(error => { dispatch({ type: STATUS_FETCH_SOURCE_FAIL, error }); From cd93399569b60c7867cc4a68bd4e98839b0bb510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 3 Sep 2022 17:15:21 +0200 Subject: [PATCH 18/28] Update Polish translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/polls/poll.tsx | 2 +- .../report-modal/steps/other-actions-step.tsx | 2 +- app/soapbox/locales/pl.json | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/soapbox/components/polls/poll.tsx b/app/soapbox/components/polls/poll.tsx index a30348678a..2b6f99392f 100644 --- a/app/soapbox/components/polls/poll.tsx +++ b/app/soapbox/components/polls/poll.tsx @@ -18,7 +18,7 @@ interface IPoll { } const messages = defineMessages({ - multiple: { id: 'poll.chooseMultiple', defaultMessage: 'Choose as many as you\'d like.' }, + multiple: { id: 'poll.choose_multiple', defaultMessage: 'Choose as many as you\'d like.' }, }); const Poll: React.FC = ({ id, status }): JSX.Element | null => { diff --git a/app/soapbox/features/ui/components/modals/report-modal/steps/other-actions-step.tsx b/app/soapbox/features/ui/components/modals/report-modal/steps/other-actions-step.tsx index e26cbbf440..e50a90778c 100644 --- a/app/soapbox/features/ui/components/modals/report-modal/steps/other-actions-step.tsx +++ b/app/soapbox/features/ui/components/modals/report-modal/steps/other-actions-step.tsx @@ -14,7 +14,7 @@ import { isRemote, getDomain } from 'soapbox/utils/accounts'; import type { ReducerAccount } from 'soapbox/reducers/accounts'; const messages = defineMessages({ - addAdditionalStatuses: { id: 'report.otherActions.addAdditionl', defaultMessage: 'Would you like to add additional statuses to this report?' }, + addAdditionalStatuses: { id: 'report.otherActions.addAdditional', defaultMessage: 'Would you like to add additional statuses to this report?' }, addMore: { id: 'report.otherActions.addMore', defaultMessage: 'Add more' }, furtherActions: { id: 'report.otherActions.furtherActions', defaultMessage: 'Further actions:' }, hideAdditonalStatuses: { id: 'report.otherActions.hideAdditional', defaultMessage: 'Hide additional statuses' }, diff --git a/app/soapbox/locales/pl.json b/app/soapbox/locales/pl.json index bd359fbc97..0acbe3acd6 100644 --- a/app/soapbox/locales/pl.json +++ b/app/soapbox/locales/pl.json @@ -564,8 +564,8 @@ "forms.copy": "Kopiuj", "forms.hide_password": "Ukryj hasło", "forms.show_password": "Pokaż hasło", - "gdpr.accept": "Aceptuj", - "gdpr.learn_more": "Dowiedz się więcej", + "gdpr.accept": "Akceptuj", + "gdpr.learn_more": "Dowiedz się więcej", "gdpr.message": "{siteTitle} korzysta z ciasteczek sesji, które są niezbędne dla działania strony.", "gdpr.title": "{siteTitle} korzysta z ciasteczek", "getting_started.open_source_notice": "{code_name} jest oprogramowaniem o otwartym źródle. Możesz pomóc w rozwoju lub zgłaszać błędy na GitLabie tutaj: {code_link} (v{code_version}).", @@ -859,8 +859,10 @@ "patron.title": "Cel wsparcia", "pinned_accounts.title": "Polecani przez {name}", "pinned_statuses.none": "Brak przypięć do pokazania.", - "poll.chooseMultiple": "Wybierz tyle, ile potrzebujesz.", + "poll.choose_multiple": "Wybierz tyle, ile potrzebujesz.", "poll.closed": "Zamknięte", + "poll.non_anonymous": "Publiczne głosowanie", + "poll.non_anonymous.label": "Inne instancje mogą wyświetlać, które odpowiedzi wybrałeś(-aś)", "poll.refresh": "Odśwież", "poll.total_people": "{count, plural, one {# osoba} few {# osoby} many {# osób} other {# osób}}", "poll.total_votes": "{count, plural, one {# głos} few {# głosy} many {# głosów} other {# głosów}}", @@ -889,7 +891,7 @@ "preferences.fields.reduce_motion_label": "Ogranicz ruch w animacjach", "preferences.fields.system_font_label": "Używaj domyślnej czcionki systemu", "preferences.fields.theme": "Motyw", - "preferences.fields.underline_links_label": "Zawsze podkreślaj odnośniki we wpisach", + "preferences.fields.underline_links_label": "Zawsze podkreślaj odnośniki we wpisach", "preferences.fields.unfollow_modal_label": "Pokazuj prośbę o potwierdzenie przed cofnięciem obserwacji", "preferences.hints.feed": "Na stronie głównej", "preferences.notifications.advanced": "Pokazuj wszystkie kategorie powiadomień", @@ -988,7 +990,7 @@ "report.forward": "Przekaż na {target}", "report.forward_hint": "To konto znajduje się na innej instancji. Czy chcesz wysłać anonimową kopię zgłoszenia rnież na nią?", "report.next": "Dalej", - "report.otherActions.addAdditionl": "Czy chcesz uwzględnić inne wpisy w tym zgłoszeniu?", + "report.otherActions.addAdditional": "Czy chcesz uwzględnić inne wpisy w tym zgłoszeniu?", "report.otherActions.addMore": "Dodaj więcej", "report.otherActions.furtherActions": "Dodatkowe działania:", "report.otherActions.hideAdditional": "Ukryj dodatkowe wpisy", @@ -1186,7 +1188,7 @@ "streamfield.add": "Dodaj", "streamfield.remove": "Usuń", "suggestions.dismiss": "Odrzuć sugestię", - "sw.update": "Aktualizacja", + "sw.update": "Aktualizacja", "sw.update_text": "Dostępna jest aktualizacja.", "tabs_bar.all": "Wszystkie", "tabs_bar.apps": "Aplikacje", From 08702248b91d769e37c45f65a567449949d2624e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 3 Sep 2022 17:27:27 +0200 Subject: [PATCH 19/28] Update Polish translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/locales/pl.json | 38 +++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/app/soapbox/locales/pl.json b/app/soapbox/locales/pl.json index 0acbe3acd6..70a7b39027 100644 --- a/app/soapbox/locales/pl.json +++ b/app/soapbox/locales/pl.json @@ -73,6 +73,8 @@ "account_note.target": "Notatka o @{target}", "account_search.placeholder": "Szukaj konta", "account_timeline.column_settings.show_pinned": "Show pinned posts", + "actualStatus.edited": "Edytowano {date}", + "actualStatuses.quote_tombstone": "Wpis jest niedostępny", "admin.awaiting_approval.approved_message": "Przyjęto {acct}!", "admin.awaiting_approval.empty_message": "Nikt nie oczekuje przyjęcia. Gdy zarejestruje się nowy użytkownik, możesz zatwierdzić go tutaj.", "admin.awaiting_approval.rejected_message": "Odrzucono {acct}!", @@ -134,8 +136,8 @@ "admin_nav.awaiting_approval": "Oczekujące zgłoszenia", "admin_nav.dashboard": "Panel administracyjny", "admin_nav.reports": "Zgłoszenia", - "age_verification.header": "Wprowadź datę urodzenia", "age_verification.fail": "Musisz mieć przynajmniej {ageMinimum, plural, one {# rok} few {# lata} many {# lat} other {# lat}}.", + "age_verification.header": "Wprowadź datę urodzenia", "alert.unexpected.body": "Przepraszamy za niedogodności. Jeżeli problem nie ustanie, skontaktuj się z naszym wsparciem technicznym. Możesz też spróbować {clearCookies} (zostaniesz wylogowany(-a)).", "alert.unexpected.browser": "Przeglądarka", "alert.unexpected.clear_cookies": "wyczyścić pliki cookies i dane przeglądarki", @@ -164,16 +166,16 @@ "app_create.scopes_placeholder": "np. „read write follow”", "app_create.submit": "Utwórz aplikację", "app_create.website_label": "Strona", - "auth_layout.register": "Utwórz konto", "auth.invalid_credentials": "Nieprawidłowa nazwa użytkownika lub hasło", "auth.logged_out": "Wylogowano.", + "auth_layout.register": "Utwórz konto", "backups.actions.create": "Utwórz kopię zapasową", "backups.empty_message": "Nie znaleziono kopii zapasowych. {action}", "backups.empty_message.action": "Chcesz utworzyć?", "backups.pending": "Oczekująca", "beta.also_available": "Dostępne w językach:", - "birthdays_modal.empty": "Żaden z Twoich znajomych nie ma dziś urodzin.", "birthday_panel.title": "Urodziny", + "birthdays_modal.empty": "Żaden z Twoich znajomych nie ma dziś urodzin.", "boost_modal.combo": "Naciśnij {combo}, aby pominąć to następnym razem", "bundle_column_error.body": "Coś poszło nie tak podczas ładowania tego składnika.", "bundle_column_error.retry": "Spróbuj ponownie", @@ -283,8 +285,8 @@ "community.column_settings.title": "Ustawienia lokalnej osi czasu", "compare_history_modal.header": "Historia edycji", "compose.character_counter.title": "Wykorzystano {chars} z {maxChars} znaków", - "compose.invalid_schedule": "Musisz zaplanować wpis przynajmniej 5 minut wcześniej.", "compose.edit_success": "Twój wpis został zedytowany", + "compose.invalid_schedule": "Musisz zaplanować wpis przynajmniej 5 minut wcześniej.", "compose.submit_success": "Twój wpis został wysłany", "compose_form.direct_message_warning": "Ten wpis będzie widoczny tylko dla wszystkich wspomnianych użytkowników.", "compose_form.hashtag_warning": "Ten wpis nie będzie widoczny pod podanymi hashtagami, ponieważ jest oznaczony jako niewidoczny. Tylko publiczne wpisy mogą zostać znalezione z użyciem hashtagów.", @@ -342,6 +344,7 @@ "confirmations.block.confirm": "Zablokuj", "confirmations.block.heading": "Zablokuj @{name}", "confirmations.block.message": "Czy na pewno chcesz zablokować {name}?", + "confirmations.cancel_editing.confirm": "Anuluj edycję", "confirmations.cancel_editing.heading": "Anuluj edycję wpisu", "confirmations.cancel_editing.message": "Czy na pewno chcesz anulować edytowanie wpisu? Niezapisane zmiany zostaną utracone.", "confirmations.delete.confirm": "Usuń", @@ -432,9 +435,9 @@ "edit_profile.fields.location_label": "Lokalizacja", "edit_profile.fields.location_placeholder": "Lokalizacja", "edit_profile.fields.locked_label": "Zablokuj konto", - "edit_profile.fields.meta_fields_label": "Pola profilu", "edit_profile.fields.meta_fields.content_placeholder": "Treść", "edit_profile.fields.meta_fields.label_placeholder": "Podpis", + "edit_profile.fields.meta_fields_label": "Pola profilu", "edit_profile.fields.stranger_notifications_label": "Blokuj powiadomienia od nieznajomych", "edit_profile.fields.website_label": "Strona internetowa", "edit_profile.fields.website_placeholder": "Wyświetl link", @@ -446,7 +449,7 @@ "edit_profile.hints.header": "PNG, GIF lub JPG. Zostanie zmniejszony do {size}", "edit_profile.hints.hide_network": "To, kogo obserwujesz i kto Cię obserwuje nie będzie wyświetlane na Twoim profilu", "edit_profile.hints.locked": "Wymaga ręcznego zatwierdzania obserwacji", - "edit_profile.hints.meta_fields": "Możesz ustawić {count, plural, one {# niestandardowe pole} few {# niestandardowe pola} many {# niestandardowych pól} wyświetlanych na Twoim profilu.", + "edit_profile.hints.meta_fields": "Możesz ustawić {count, plural, one {# niestandardowe pole wyświetlane} few {# niestandardowe pola wyświetlane} many {# niestandardowych pól wyświetlanych}} na Twoim profilu.", "edit_profile.hints.stranger_notifications": "Wyświetlaj tylko powiadomienia od osób, które obserwujesz", "edit_profile.save": "Zapisz", "edit_profile.success": "Zapisano profil!", @@ -568,6 +571,7 @@ "gdpr.learn_more": "Dowiedz się więcej", "gdpr.message": "{siteTitle} korzysta z ciasteczek sesji, które są niezbędne dla działania strony.", "gdpr.title": "{siteTitle} korzysta z ciasteczek", + "generic.saved": "Zapisano", "getting_started.open_source_notice": "{code_name} jest oprogramowaniem o otwartym źródle. Możesz pomóc w rozwoju lub zgłaszać błędy na GitLabie tutaj: {code_link} (v{code_version}).", "group.detail.archived_group": "Archived group", "group.members.empty": "Ta grupa nie ma żadnych członków.", @@ -625,6 +629,7 @@ "import_data.success.blocks": "Pomyślnie zaimportowano zablokowane konta", "import_data.success.followers": "Pomyślnie zaimportowano obserwowane konta", "import_data.success.mutes": "Pomyślnie zaimportowano wyciszone konta", + "input.copy": "Kopiuj", "input.password.hide_password": "Ukryj hasło", "input.password.show_password": "Pokazuj hasło", "intervals.full.days": "{number, plural, one {# dzień} few {# dni} many {# dni} other {# dni}}", @@ -831,8 +836,8 @@ "notifications.filter.statuses": "Nowe wpisy osób, które subskrybujesz", "notifications.group": "{count, number} {count, plural, one {powiadomienie} few {powiadomienia} many {powiadomień} more {powiadomień}}", "notifications.queue_label": "Naciśnij aby zobaczyć {count} {count, plural, one {nowe powiadomienie} few {nowe powiadomienia} many {nowych powiadomień} other {nowe powiadomienia}}", - "oauth_consumers.title": "Inne opcje logowania", "oauth_consumer.tooltip": "Zaloguj się używając {provider}", + "oauth_consumers.title": "Inne opcje logowania", "onboarding.avatar.subtitle": "Just have fun with it.", "onboarding.avatar.title": "Wybierz zdjęcie profilowe", "onboarding.display_name.subtitle": "Możesz ją zawsze zmienić później.", @@ -893,6 +898,7 @@ "preferences.fields.theme": "Motyw", "preferences.fields.underline_links_label": "Zawsze podkreślaj odnośniki we wpisach", "preferences.fields.unfollow_modal_label": "Pokazuj prośbę o potwierdzenie przed cofnięciem obserwacji", + "preferences.hints.demetricator": "Ogranicz skutki uzależnienia od mediów społecznościowych, ukrywając wyświetlane liczby.", "preferences.hints.feed": "Na stronie głównej", "preferences.notifications.advanced": "Pokazuj wszystkie kategorie powiadomień", "preferences.options.content_type_markdown": "Markdown", @@ -920,12 +926,6 @@ "regeneration_indicator.sublabel": "Twoja oś czasu jest przygotowywana!", "register_invite.lead": "Wypełnij poniższy formularz, aby utworzyć konto.", "register_invite.title": "Otrzymałeś(-aś) zaproszenie na {siteTitle}!", - "registrations.create_account": "Utwórz konto", - "registrations.error": "Nie udało się zarejestrować konta.", - "registrations.get_started": "Rozpocznijmy!", - "registrations.success": "Witamy na {siteTitle}!", - "registrations.tagline": "Media społecznościowe, które nie wykluczają", - "registrations.unprocessable_entity": "Ta nazwa użytkownika jest już zajęta.", "registration.acceptance": "Rejestrując się, wyrażasz zgodę na {terms} i {privacy}.", "registration.agreement": "Akceptuję {tos}.", "registration.captcha.hint": "Naciśnij na obrazek, aby uzyskać nową captchę", @@ -950,6 +950,12 @@ "registration.validation.capital_letter": "1 wielka litera", "registration.validation.lowercase_letter": "1 mała litera", "registration.validation.minimum_characters": "8 znaków", + "registrations.create_account": "Utwórz konto", + "registrations.error": "Nie udało się zarejestrować konta.", + "registrations.get_started": "Rozpocznijmy!", + "registrations.success": "Witamy na {siteTitle}!", + "registrations.tagline": "Media społecznościowe, które nie wykluczają", + "registrations.unprocessable_entity": "Ta nazwa użytkownika jest już zajęta.", "relative_time.days": "{number} dni", "relative_time.hours": "{number} godz.", "relative_time.just_now": "teraz", @@ -1118,8 +1124,8 @@ "soapbox_config.single_user_mode_profile_hint": "@nazwa", "soapbox_config.single_user_mode_profile_label": "Nazwa głównego użytkownika", "soapbox_config.verified_can_edit_name_label": "Pozwól zweryfikowanym użytkownikom na zmianę swojej nazwy wyświetlanej.", - "sponsored.info.title": "Dlaczego widzę tę reklamę?", "sponsored.info.message": "{siteTitle} wyświetla reklamy, aby utrzymać naszą usługę.", + "sponsored.info.title": "Dlaczego widzę tę reklamę?", "sponsored.subtitle": "Wpis sponsorowany", "status.actions.more": "Więcej", "status.admin_account": "Otwórz interfejs moderacyjny dla @{name}", @@ -1139,6 +1145,10 @@ "status.embed": "Osadź", "status.favourite": "Zareaguj", "status.filtered": "Filtrowany(-a)", + "status.in_review_summary.contact": "Jeżeli uważasz że to błąd, {link}.", + "status.in_review_summary.link": "skontaktuj się z działem pomocy", + "status.in_review_summary.summary": "Ten wpis został wysłany do weryfikacji moderatorom i jest widoczny tylko dla Ciebie.", + "status.in_review_warning": "Treści w trakcie weryfikacji", "status.load_more": "Załaduj więcej", "status.media_hidden": "Zawartość multimedialna ukryta", "status.mention": "Wspomnij o @{name}", From 005f317a93dfa2d05a3664037456019374857426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 3 Sep 2022 23:19:30 +0200 Subject: [PATCH 20/28] Change active tab when navigated to another profile page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/pages/profile_page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/pages/profile_page.tsx b/app/soapbox/pages/profile_page.tsx index 9c5a4a55e8..f4ff974e02 100644 --- a/app/soapbox/pages/profile_page.tsx +++ b/app/soapbox/pages/profile_page.tsx @@ -105,7 +105,7 @@ const ProfilePage: React.FC = ({ params, children }) => { {account && showTabs && ( - + )} {children} From 6bd4bc7bdd7c7049968ee925e22b553ccd88e4b2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 11:45:45 -0500 Subject: [PATCH 21/28] Docker: configurable BACKEND_URL --- Dockerfile | 1 + installation/docker.conf.template | 49 ++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index efe959b6d0..4c47eae540 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,5 +10,6 @@ RUN yarn build FROM nginx:stable-alpine EXPOSE 5000 ENV PORT=5000 +ENV BACKEND_URL=http://localhost COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template COPY --from=build /app/static /usr/share/nginx/html diff --git a/installation/docker.conf.template b/installation/docker.conf.template index d4393ad350..06fdc50967 100644 --- a/installation/docker.conf.template +++ b/installation/docker.conf.template @@ -2,6 +2,22 @@ # It's intended to be used by the official nginx image, which has templating functionality. # Mount at: `/etc/nginx/templates/default.conf.template` +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +} + +proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=1g; + +server { + server_name localhost; + + location / { + add_header Content-Type "application/json" always; + return 404 '{"error": "Not implemented"}'; + } +} + server { listen ${PORT}; @@ -34,10 +50,9 @@ server { add_header Strict-Transport-Security "max-age=31536000" always; } - # Return 404 on API routes so Soapbox knows what to do. - location /api { - add_header Content-Type "application/json"; - return 404 '{"error": "Not implemented"}'; + # Backend routes + location ~ ^/(api|oauth|auth|admin|pghero|sidekiq|manifest.json|media|nodeinfo|unsubscribe|.well-known/(webfinger|host-meta|nodeinfo|change-password)|@(.+)/embed$) { + try_files /dev/null @backend; } # ServiceWorker: don't cache. @@ -45,4 +60,30 @@ server { add_header Cache-Control "public, max-age=0"; add_header Strict-Transport-Security "max-age=31536000" always; } + + # Proxy to the backend. + location @backend { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Proxy ""; + proxy_pass_header Server; + + proxy_pass ${BACKEND_URL}; + proxy_buffering on; + proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + proxy_cache CACHE; + proxy_cache_valid 200 7d; + proxy_cache_valid 410 24h; + proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; + add_header X-Cached $upstream_cache_status; + add_header Strict-Transport-Security "max-age=31536000" always; + + tcp_nodelay on; + } } From 6d07c45903885670b0cb8b0d1b9a146f6ba8568a Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 12:54:41 -0500 Subject: [PATCH 22/28] dockerignore: .git --- .dockerignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.dockerignore b/.dockerignore index 92e9362d8e..41b87855af 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,5 @@ +.git + /node_modules/ /tmp/ /build/ From 9821a1f639cbd06b23b34537adce1f1e194536e5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 13:58:13 -0500 Subject: [PATCH 23/28] Docker: adopt mastodon.conf --- installation/docker.conf.template | 47 ++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/installation/docker.conf.template b/installation/docker.conf.template index 06fdc50967..0c13a26a32 100644 --- a/installation/docker.conf.template +++ b/installation/docker.conf.template @@ -2,11 +2,20 @@ # It's intended to be used by the official nginx image, which has templating functionality. # Mount at: `/etc/nginx/templates/default.conf.template` +map_hash_bucket_size 128; + map $http_upgrade $connection_upgrade { default upgrade; '' close; } +# ActivityPub routing. +map $http_accept $activitypub_location { + default @soapbox; + "application/activity+json" @backend; + 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' @backend; +} + proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=1g; server { @@ -20,6 +29,7 @@ server { server { listen ${PORT}; + listen [::]:${PORT}; keepalive_timeout 70; sendfile on; @@ -28,6 +38,7 @@ server { root /usr/share/nginx/html; gzip on; + gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; @@ -37,30 +48,46 @@ server { add_header Strict-Transport-Security "max-age=31536000" always; - # SPA. - # Try static files, then fall back to index.html. + # Content Security Policy (CSP) + # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy + add_header Content-Security-Policy "base-uri 'none'; default-src 'none'; font-src 'self'; img-src 'self' https: data: blob:; style-src 'self' 'unsafe-inline'; media-src 'self' https: data:; frame-src 'self' https:; manifest-src 'self'; connect-src 'self' data: blob:; script-src 'self'; child-src 'self'; worker-src 'self';"; + + # Fallback route. + # Try static files, then fall back to the SPA. location / { - try_files $uri /index.html; + try_files $uri @soapbox; } - # Build files. + # Backend routes. + # These are routes to the backend's API and important rendered pages. + location ~ ^/(api|oauth|auth|admin|pghero|sidekiq|manifest.json|media|nodeinfo|unsubscribe|.well-known/(webfinger|host-meta|nodeinfo|change-password)|@(.+)/embed$) { + try_files /dev/null @backend; + } + + # Backend ActivityPub routes. + # Conditionally send to the backend by Accept header. + location ~ ^/(inbox|users|@(.+)) { + try_files /dev/null $activitypub_location; + } + + # Soapbox build files. # New builds produce hashed filenames, so these should be cached heavily. location /packs { add_header Cache-Control "public, max-age=31536000, immutable"; add_header Strict-Transport-Security "max-age=31536000" always; } - # Backend routes - location ~ ^/(api|oauth|auth|admin|pghero|sidekiq|manifest.json|media|nodeinfo|unsubscribe|.well-known/(webfinger|host-meta|nodeinfo|change-password)|@(.+)/embed$) { - try_files /dev/null @backend; - } - - # ServiceWorker: don't cache. + # Soapbox ServiceWorker. location = /sw.js { add_header Cache-Control "public, max-age=0"; add_header Strict-Transport-Security "max-age=31536000" always; } + # Soapbox SPA (Single Page App). + location @soapbox { + try_files /index.html /dev/null; + } + # Proxy to the backend. location @backend { proxy_set_header Host $host; From 06afd122130f7cc41e0e2050e75a2d3abc59738b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 14:46:29 -0500 Subject: [PATCH 24/28] Docker: make CSP configurable --- Dockerfile | 1 + installation/docker.conf.template | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c47eae540..c7068a768e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,6 @@ FROM nginx:stable-alpine EXPOSE 5000 ENV PORT=5000 ENV BACKEND_URL=http://localhost +ENV CSP= COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template COPY --from=build /app/static /usr/share/nginx/html diff --git a/installation/docker.conf.template b/installation/docker.conf.template index 0c13a26a32..2759f765a3 100644 --- a/installation/docker.conf.template +++ b/installation/docker.conf.template @@ -50,7 +50,7 @@ server { # Content Security Policy (CSP) # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy - add_header Content-Security-Policy "base-uri 'none'; default-src 'none'; font-src 'self'; img-src 'self' https: data: blob:; style-src 'self' 'unsafe-inline'; media-src 'self' https: data:; frame-src 'self' https:; manifest-src 'self'; connect-src 'self' data: blob:; script-src 'self'; child-src 'self'; worker-src 'self';"; + add_header Content-Security-Policy "${CSP}"; # Fallback route. # Try static files, then fall back to the SPA. @@ -97,7 +97,7 @@ server { proxy_set_header Proxy ""; proxy_pass_header Server; - proxy_pass ${BACKEND_URL}; + proxy_pass "${BACKEND_URL}"; proxy_buffering on; proxy_redirect off; proxy_http_version 1.1; From 8403615eb0346067fa4a22520ae619a9a2f418bd Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 15:02:12 -0500 Subject: [PATCH 25/28] Docker: open fallback backend at :4444 --- Dockerfile | 3 ++- installation/docker.conf.template | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7068a768e..bfb7c2e481 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,8 @@ RUN yarn build FROM nginx:stable-alpine EXPOSE 5000 ENV PORT=5000 -ENV BACKEND_URL=http://localhost +ENV FALLBACK_PORT=4444 +ENV BACKEND_URL=http://localhost:4444 ENV CSP= COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template COPY --from=build /app/static /usr/share/nginx/html diff --git a/installation/docker.conf.template b/installation/docker.conf.template index 2759f765a3..0938b756eb 100644 --- a/installation/docker.conf.template +++ b/installation/docker.conf.template @@ -18,8 +18,10 @@ map $http_accept $activitypub_location { proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=1g; +# Fake backend for when BACKEND_URL isn't defined. server { - server_name localhost; + listen ${FALLBACK_PORT}; + listen [::]:${FALLBACK_PORT}; location / { add_header Content-Type "application/json" always; From d9d9c4521fca441f5d1fa049bc8777cf0f13fae8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 15:15:54 -0500 Subject: [PATCH 26/28] soapbox-pub/soapbox-fe --> soapbox-pub/soapbox --- .vscode/soapbox.code-snippets | 2 +- CHANGELOG.md | 8 ++++---- README.md | 12 ++++++------ app/instance/about.example/index.html | 5 ++--- app/soapbox/actions/importer/index.ts | 4 ++-- app/soapbox/normalizers/account.ts | 2 +- app/soapbox/reducers/custom_emojis.ts | 2 +- app/soapbox/reducers/notifications.js | Bin 7264 -> 7261 bytes app/soapbox/reducers/timelines.ts | 2 +- app/soapbox/utils/features.ts | 4 ++-- app/soapbox/utils/status.ts | 2 +- docs/administration/deploy-at-scale.md | 4 ++-- docs/administration/install-subdomain.md | 2 +- docs/administration/install-yunohost.md | 2 +- docs/administration/mastodon.md | 4 ++-- docs/administration/updating.md | 4 ++-- docs/contributing.md | 8 ++++---- docs/development/developing-backend.md | 4 ++-- docs/development/how-it-works.md | 2 +- docs/development/running-locally.md | 4 ++-- docs/installing.md | 2 +- package.json | 6 +++--- 22 files changed, 42 insertions(+), 43 deletions(-) diff --git a/.vscode/soapbox.code-snippets b/.vscode/soapbox.code-snippets index 66da1a25bc..b31d50ff5f 100644 --- a/.vscode/soapbox.code-snippets +++ b/.vscode/soapbox.code-snippets @@ -1,5 +1,5 @@ { - // Place your soapbox-fe workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // Place your Soapbox workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: diff --git a/CHANGELOG.md b/CHANGELOG.md index b6971b861c..6a38505994 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -211,7 +211,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial beta release. -[Unreleased]: https://gitlab.com/soapbox-pub/soapbox-fe/-/compare/v1.0.0...develop -[Unreleased patch]: https://gitlab.com/soapbox-pub/soapbox-fe/-/compare/v1.0.0...stable/1.0.x -[1.0.0]: https://gitlab.com/soapbox-pub/soapbox-fe/-/compare/v0.9.0...v1.0.0 -[0.9.0]: https://gitlab.com/soapbox-pub/soapbox-fe/-/tags/v0.9.0 +[Unreleased]: https://gitlab.com/soapbox-pub/soapbox/-/compare/v1.0.0...develop +[Unreleased patch]: https://gitlab.com/soapbox-pub/soapbox/-/compare/v1.0.0...stable/1.0.x +[1.0.0]: https://gitlab.com/soapbox-pub/soapbox/-/compare/v0.9.0...v1.0.0 +[0.9.0]: https://gitlab.com/soapbox-pub/soapbox/-/tags/v0.9.0 diff --git a/README.md b/README.md index c8ddf44803..07ba0d7a72 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ Installing Soapbox on an existing Pleroma server is extremely easy. Just ssh into the server and download a .zip of the latest build: ```sh -curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip +curl -L https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/develop/download?job=build-production -o soapbox.zip ``` Then unpack it into Pleroma's `instance` directory: ```sh -busybox unzip soapbox-fe.zip -o -d /opt/pleroma/instance +busybox unzip soapbox.zip -o -d /opt/pleroma/instance ``` **That's it!** :tada: @@ -54,7 +54,7 @@ location / { } ``` -(See [`mastodon.conf`](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/installation/mastodon.conf) for a full example.) +(See [`mastodon.conf`](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/installation/mastodon.conf) for a full example.) Soapbox incorporates much of the [Mastodon API](https://docs.joinmastodon.org/methods/), [Pleroma API](https://api.pleroma.social/), and more. It detects features supported by the backend to provide the right experience for the backend. @@ -64,8 +64,8 @@ It detects features supported by the backend to provide the right experience for To get it running, just clone the repo: ```sh -git clone https://gitlab.com/soapbox-pub/soapbox-fe.git -cd soapbox-fe +git clone https://gitlab.com/soapbox-pub/soapbox.git +cd soapbox ``` Ensure that Node.js and Yarn are installed, then install dependencies: @@ -101,7 +101,7 @@ Try again. ### Troubleshooting: it's not working! -Run `node -V` and compare your Node.js version with the version in [`.tool-versions`](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/.tool-versions). +Run `node -V` and compare your Node.js version with the version in [`.tool-versions`](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/.tool-versions). If they don't match, try installing [asdf](https://asdf-vm.com/). ## Local Dev Configuration diff --git a/app/instance/about.example/index.html b/app/instance/about.example/index.html index 5efb11fc92..6af826f850 100644 --- a/app/instance/about.example/index.html +++ b/app/instance/about.example/index.html @@ -23,6 +23,5 @@

Open Source Software

-

Soapbox is free and open source (FOSS) software that runs atop a Pleroma server

-

The Soapbox repository can be found at Soapbox-fe

-

The Pleroma server repository can be found at Pleroma-be

+

Soapbox is free and open source (FOSS) software.

+

The Soapbox repository can be found at Soapbox

diff --git a/app/soapbox/actions/importer/index.ts b/app/soapbox/actions/importer/index.ts index 20041180b6..a5d86c9b0f 100644 --- a/app/soapbox/actions/importer/index.ts +++ b/app/soapbox/actions/importer/index.ts @@ -106,10 +106,10 @@ export function importFetchedStatus(status: APIEntity, idempotencyKey?: string) const isBroken = (status: APIEntity) => { try { // Skip empty accounts - // https://gitlab.com/soapbox-pub/soapbox-fe/-/issues/424 + // https://gitlab.com/soapbox-pub/soapbox/-/issues/424 if (!status.account.id) return true; // Skip broken reposts - // https://gitlab.com/soapbox-pub/soapbox/-/issues/28 + // https://gitlab.com/soapbox-pub/rebased/-/issues/28 if (status.reblog && !status.reblog.account.id) return true; return false; } catch (e) { diff --git a/app/soapbox/normalizers/account.ts b/app/soapbox/normalizers/account.ts index cfaf92a1c9..37f42ab8f1 100644 --- a/app/soapbox/normalizers/account.ts +++ b/app/soapbox/normalizers/account.ts @@ -78,7 +78,7 @@ export const FieldRecord = ImmutableRecord({ value_plain: '', }); -// https://gitlab.com/soapbox-pub/soapbox-fe/-/issues/549 +// https://gitlab.com/soapbox-pub/soapbox/-/issues/549 const normalizePleromaLegacyFields = (account: ImmutableMap) => { return account.update('pleroma', ImmutableMap(), (pleroma: ImmutableMap) => { return pleroma.withMutations(pleroma => { diff --git a/app/soapbox/reducers/custom_emojis.ts b/app/soapbox/reducers/custom_emojis.ts index 477e7cce97..38b54a6733 100644 --- a/app/soapbox/reducers/custom_emojis.ts +++ b/app/soapbox/reducers/custom_emojis.ts @@ -20,7 +20,7 @@ const importEmojis = (customEmojis: APIEntity[]) => { const emojis = (fromJS(customEmojis) as ImmutableList>).filter((emoji) => { // If a custom emoji has the shortcode of a Unicode emoji, skip it. // Otherwise it breaks EmojiMart. - // https://gitlab.com/soapbox-pub/soapbox-fe/-/issues/610 + // https://gitlab.com/soapbox-pub/soapbox/-/issues/610 const shortcode = emoji.get('shortcode', '').toLowerCase(); return !emojiData[shortcode]; }); diff --git a/app/soapbox/reducers/notifications.js b/app/soapbox/reducers/notifications.js index 08b87e4f0bb2a3af82084e2bb17d7fd284063b5e..d7697d4ddf3414da24412f2fe876db945d78db48 100644 GIT binary patch delta 12 TcmaE0ao1u)3j5}C_MajECn^PZ delta 16 Xcmca>@xWq33OloITI%K$_MajEI_Cy& diff --git a/app/soapbox/reducers/timelines.ts b/app/soapbox/reducers/timelines.ts index cd24d9df32..def2574073 100644 --- a/app/soapbox/reducers/timelines.ts +++ b/app/soapbox/reducers/timelines.ts @@ -242,7 +242,7 @@ const timelineDisconnect = (state: State, timelineId: string) => { if (items.isEmpty()) return; // This is causing problems. Disable for now. - // https://gitlab.com/soapbox-pub/soapbox-fe/-/issues/716 + // https://gitlab.com/soapbox-pub/soapbox/-/issues/716 // timeline.set('items', addStatusId(items, null)); })); }; diff --git a/app/soapbox/utils/features.ts b/app/soapbox/utils/features.ts index c9eac36880..78908b04fd 100644 --- a/app/soapbox/utils/features.ts +++ b/app/soapbox/utils/features.ts @@ -46,8 +46,8 @@ export const PIXELFED = 'Pixelfed'; export const TRUTHSOCIAL = 'TruthSocial'; /** - * Soapbox BE, the recommended Pleroma fork for Soapbox. - * @see {@link https://gitlab.com/soapbox-pub/soapbox-be} + * Rebased, the recommended backend for Soapbox. + * @see {@link https://gitlab.com/soapbox-pub/rebased} */ export const SOAPBOX = 'soapbox'; diff --git a/app/soapbox/utils/status.ts b/app/soapbox/utils/status.ts index 6f03b1ce07..66e380b5a3 100644 --- a/app/soapbox/utils/status.ts +++ b/app/soapbox/utils/status.ts @@ -35,7 +35,7 @@ export const shouldHaveCard = (status: StatusEntity): boolean => { }; /** Whether the media IDs on this status have integer IDs (opposed to FlakeIds). */ -// https://gitlab.com/soapbox-pub/soapbox-fe/-/merge_requests/1087 +// https://gitlab.com/soapbox-pub/soapbox/-/merge_requests/1087 export const hasIntegerMediaIds = (status: StatusEntity): boolean => { return status.media_attachments.some(({ id }) => isIntegerId(id)); }; diff --git a/docs/administration/deploy-at-scale.md b/docs/administration/deploy-at-scale.md index 9d413fb0ac..40e878a0a9 100644 --- a/docs/administration/deploy-at-scale.md +++ b/docs/administration/deploy-at-scale.md @@ -11,7 +11,7 @@ The best way to get Soapbox builds is from a GitLab CI job. The official build URL is here: ``` -https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/develop/download?job=build-production +https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/develop/download?job=build-production ``` (Note that `develop` in that URL can be replaced with any git ref, eg `v2.0.0`, and thus will be updated with the latest zip whenever a new commit is pushed to `develop`.) @@ -44,7 +44,7 @@ location ~ ^/(api|oauth|admin) { } ``` -We recommend trying [`mastodon.conf`](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/installation/mastodon.conf) as a starting point. +We recommend trying [`mastodon.conf`](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/installation/mastodon.conf) as a starting point. It is fine-tuned, includes support for federation, and should work with any backend. ## The ServiceWorker diff --git a/docs/administration/install-subdomain.md b/docs/administration/install-subdomain.md index 513d8dd934..34a8cb37b6 100644 --- a/docs/administration/install-subdomain.md +++ b/docs/administration/install-subdomain.md @@ -13,7 +13,7 @@ mkdir -p /opt/soapbox Fetch the build. ```sh -curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/v1.3.0/download?job=build-production -o /tmp/soapbox-fe.zip +curl -L https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/v1.3.0/download?job=build-production -o /tmp/soapbox-fe.zip ``` Unzip the build. diff --git a/docs/administration/install-yunohost.md b/docs/administration/install-yunohost.md index d5cba3ba63..af99231b4d 100644 --- a/docs/administration/install-yunohost.md +++ b/docs/administration/install-yunohost.md @@ -7,7 +7,7 @@ If you want to install Soapbox to a Pleroma instance installed using [YunoHost]( First, download the latest build of Soapbox from GitLab. ```sh -curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/v1.3.0/download?job=build-production -o soapbox-fe.zip +curl -L https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/v1.3.0/download?job=build-production -o soapbox-fe.zip ``` ## 2. Unzip the build diff --git a/docs/administration/mastodon.md b/docs/administration/mastodon.md index d8261d9def..345408ad1f 100644 --- a/docs/administration/mastodon.md +++ b/docs/administration/mastodon.md @@ -8,7 +8,7 @@ To do so, shell into your server and unpack Soapbox: ```sh mkdir -p /opt/soapbox -curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip +curl -L https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip busybox unzip soapbox-fe.zip -o -d /opt/soapbox ``` @@ -17,7 +17,7 @@ Now create an Nginx file for Soapbox with Mastodon. If you already have one, replace it: ```sh -curl https://gitlab.com/soapbox-pub/soapbox-fe/-/raw/develop/installation/mastodon.conf > /etc/nginx/sites-available/mastodon +curl https://gitlab.com/soapbox-pub/soapbox/-/raw/develop/installation/mastodon.conf > /etc/nginx/sites-available/mastodon ``` Edit this file and replace all occurrences of `example.com` with your domain name. diff --git a/docs/administration/updating.md b/docs/administration/updating.md index ddfb62e08b..6e5252efa6 100644 --- a/docs/administration/updating.md +++ b/docs/administration/updating.md @@ -1,6 +1,6 @@ # Updating Soapbox -You should always check the [release notes/changelog](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/CHANGELOG.md) in case there are deprecations, special update changes, etc. +You should always check the [release notes/changelog](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/CHANGELOG.md) in case there are deprecations, special update changes, etc. Besides that, it's relatively pretty easy to update Soapbox. There's two ways to go about it: with the command line or with an unofficial script. @@ -10,7 +10,7 @@ To update Soapbox via the command line, do the following: ``` # Download the build. -curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip +curl -L https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip # Remove all the current Soapbox build in Pleroma's instance directory. rm -R /opt/pleroma/instance/static/packs diff --git a/docs/contributing.md b/docs/contributing.md index 47a7b747de..bb59effc74 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -2,20 +2,20 @@ Thank you for your interest in Soapbox! -When contributing to Soapbox, please first discuss the change you wish to make by [opening an issue](https://gitlab.com/soapbox-pub/soapbox-fe/-/issues). +When contributing to Soapbox, please first discuss the change you wish to make by [opening an issue](https://gitlab.com/soapbox-pub/soapbox/-/issues). ## Opening an MR (merge request) 1. Smash that "fork" button on GitLab to make a copy of the repo. 2. Clone the repo locally, then begin work on a new branch (eg not `develop`). 3. Push your branch to your fork. -4. Once pushed, GitLab should provide you with a URL to open a new merge request right in your terminal. If not, do it [manually](https://gitlab.com/soapbox-pub/soapbox-fe/-/merge_requests/new). +4. Once pushed, GitLab should provide you with a URL to open a new merge request right in your terminal. If not, do it [manually](https://gitlab.com/soapbox-pub/soapbox/-/merge_requests/new). ### Ensuring the CI pipeline succeeds When you push to a branch, the CI pipeline will run. -[Soapbox uses GitLab CI](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/.gitlab-ci.yml) to lint, run tests, and verify changes. +[Soapbox uses GitLab CI](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/.gitlab-ci.yml) to lint, run tests, and verify changes. It's important this pipeline passes, otherwise we cannot merge the change. New users of gitlab.com may see a "detatched pipeline" error. @@ -31,4 +31,4 @@ We recommend developing Soapbox with [VSCodium](https://vscodium.com/) (or its p This will help give you feedback about your changes _in the editor itself_ before GitLab CI performs linting, etc. When this project is opened in Code it will automatically recommend extensions. -See [`.vscode/extensions.json`](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/.vscode/extensions.json) for the full list. +See [`.vscode/extensions.json`](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/.vscode/extensions.json) for the full list. diff --git a/docs/development/developing-backend.md b/docs/development/developing-backend.md index af4400e9fc..723a28002d 100644 --- a/docs/development/developing-backend.md +++ b/docs/development/developing-backend.md @@ -48,7 +48,7 @@ Typically checks are done against `BACKEND_NAME` and `VERSION`. The version string is similar in purpose to a [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) string. The format was first invented by Pleroma, but is now widely used, including by Pixelfed, Mitra, and Soapbox BE. -See [`features.ts`](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/app/soapbox/utils/features.ts) for the complete list of features. +See [`features.ts`](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/app/soapbox/utils/features.ts) for the complete list of features. ## Forks of other software @@ -73,4 +73,4 @@ For Pleroma forks, the fork name should be in the compat section (eg Soapbox BE) ## Adding support for a new backend -If the backend conforms to the above format, please modify [`features.ts`](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/app/soapbox/utils/features.ts) and submit a merge request to enable features for your backend! +If the backend conforms to the above format, please modify [`features.ts`](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/app/soapbox/utils/features.ts) and submit a merge request to enable features for your backend! diff --git a/docs/development/how-it-works.md b/docs/development/how-it-works.md index 68aa0e5ee4..52a326d8ac 100644 --- a/docs/development/how-it-works.md +++ b/docs/development/how-it-works.md @@ -18,7 +18,7 @@ location / { } ``` -(See [`mastodon.conf`](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/installation/mastodon.conf) for a full example.) +(See [`mastodon.conf`](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/installation/mastodon.conf) for a full example.) Soapbox incorporates much of the [Mastodon API](https://docs.joinmastodon.org/methods/), [Pleroma API](https://api.pleroma.social/), and more. It detects features supported by the backend to provide the right experience for the backend. diff --git a/docs/development/running-locally.md b/docs/development/running-locally.md index d11c593967..7cd1164a64 100644 --- a/docs/development/running-locally.md +++ b/docs/development/running-locally.md @@ -3,7 +3,7 @@ To get it running, just clone the repo: ``` -git clone https://gitlab.com/soapbox-pub/soapbox-fe.git +git clone https://gitlab.com/soapbox-pub/soapbox.git cd soapbox-fe ``` @@ -40,5 +40,5 @@ Try again. ## Troubleshooting: it's not working! -Run `node -V` and compare your Node.js version with the version in [`.tool-versions`](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/.tool-versions). +Run `node -V` and compare your Node.js version with the version in [`.tool-versions`](https://gitlab.com/soapbox-pub/soapbox/-/blob/develop/.tool-versions). If they don't match, try installing [asdf](https://asdf-vm.com/). diff --git a/docs/installing.md b/docs/installing.md index fb659e751d..37c9c36e5b 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -10,7 +10,7 @@ First, follow the instructions to [install Pleroma](https://docs-develop.pleroma The Soapbox frontend is the main component of Soapbox. Once you've installed Pleroma, installing Soapbox is a breeze. -First, ssh into the server and download a .zip of the latest build: ``curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip`` +First, ssh into the server and download a .zip of the latest build: ``curl -L https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip`` Then unpack it into Pleroma's ``instance`` directory: ``busybox unzip soapbox-fe.zip -o -d /opt/pleroma/instance`` diff --git a/package.json b/package.json index 8cb1e8a4b0..d5647cdec0 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,19 @@ { - "name": "soapbox-fe", + "name": "soapbox", "displayName": "Soapbox", "version": "3.0.0", "description": "Soapbox frontend for the Fediverse.", "homepage": "https://soapbox.pub/", "repository": { "type": "git", - "url": "https://gitlab.com/soapbox-pub/soapbox-fe" + "url": "https://gitlab.com/soapbox-pub/soapbox" }, "keywords": [ "fediverse", "pleroma" ], "bugs": { - "url": "https://gitlab.com/soapbox-pub/soapbox-fe/-/issues" + "url": "https://gitlab.com/soapbox-pub/soapbox/-/issues" }, "scripts": { "start": "npx webpack-dev-server", From 06646a01df32779e39d6a420e6920e55b352330e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 15:37:34 -0500 Subject: [PATCH 27/28] GitLab CI: build a docker image --- .gitlab-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90c856e40f..edd3700aee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,3 +142,16 @@ pages: only: refs: - develop + +docker: + image: docker:20.10.17 + services: + - docker:20.10.17-dind + # https://medium.com/devops-with-valentine/how-to-build-a-docker-image-and-push-it-to-the-gitlab-container-registry-from-a-gitlab-ci-pipeline-acac0d1f26df + script: + - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin + - docker build -t $CI_REGISTRY_IMAGE . + - docker push $CI_REGISTRY_IMAGE + # only: + # refs: + # - develop \ No newline at end of file From 53be32de34c64bb40c9bf05a25ffc3c4d085e249 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 15:58:48 -0500 Subject: [PATCH 28/28] GitLab CI: only publish image on develop --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index edd3700aee..aaca197c3a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -144,14 +144,15 @@ pages: - develop docker: + stage: deploy image: docker:20.10.17 services: - - docker:20.10.17-dind + - docker:20.10.17-dind # https://medium.com/devops-with-valentine/how-to-build-a-docker-image-and-push-it-to-the-gitlab-container-registry-from-a-gitlab-ci-pipeline-acac0d1f26df script: - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin - docker build -t $CI_REGISTRY_IMAGE . - docker push $CI_REGISTRY_IMAGE - # only: - # refs: - # - develop \ No newline at end of file + only: + refs: + - develop \ No newline at end of file