diff --git a/src/actions/interactions.ts b/src/actions/interactions.ts index 60f1d686b..cc5094631 100644 --- a/src/actions/interactions.ts +++ b/src/actions/interactions.ts @@ -9,10 +9,9 @@ import api, { getLinks } from '../api'; import { fetchRelationships } from './accounts'; import { importFetchedAccounts, importFetchedStatus } from './importer'; import { openModal } from './modals'; -import { expandGroupFeaturedTimeline } from './timelines'; import type { AppDispatch, RootState } from 'soapbox/store'; -import type { APIEntity, Group, Status as StatusEntity } from 'soapbox/types/entities'; +import type { APIEntity, Status as StatusEntity } from 'soapbox/types/entities'; const REBLOG_REQUEST = 'REBLOG_REQUEST'; const REBLOG_SUCCESS = 'REBLOG_SUCCESS'; @@ -629,20 +628,6 @@ const pin = (status: StatusEntity) => }); }; -const pinToGroup = (status: StatusEntity, group: Group) => - (dispatch: AppDispatch, getState: () => RootState) => { - return api(getState) - .post(`/api/v1/groups/${group.id}/statuses/${status.id}/pin`) - .then(() => dispatch(expandGroupFeaturedTimeline(group.id))); - }; - -const unpinFromGroup = (status: StatusEntity, group: Group) => - (dispatch: AppDispatch, getState: () => RootState) => { - return api(getState) - .post(`/api/v1/groups/${group.id}/statuses/${status.id}/unpin`) - .then(() => dispatch(expandGroupFeaturedTimeline(group.id))); - }; - const pinRequest = (status: StatusEntity) => ({ type: PIN_REQUEST, status, @@ -855,8 +840,6 @@ export { unpinSuccess, unpinFail, togglePin, - pinToGroup, - unpinFromGroup, remoteInteraction, remoteInteractionRequest, remoteInteractionSuccess, diff --git a/src/components/location-search.tsx b/src/components/location-search.tsx index b3c9430b6..8a09050f9 100644 --- a/src/components/location-search.tsx +++ b/src/components/location-search.tsx @@ -85,7 +85,7 @@ const LocationSearch: React.FC = ({ onSelected }) => { }, [value]); return ( -
+
= ({ dispatch(togglePin(status)); }; - const handleGroupPinClick: React.EventHandler = () => { - const group = status.group as Group; - - if (status.pinned) { - dispatch(unpinFromGroup(status, group)); - } else { - dispatch(pinToGroup(status, group)) - .then(() => toast.success(intl.formatMessage(messages.pinToGroupSuccess))) - .catch(() => null); - } - }; - const handleMentionClick: React.EventHandler = (e) => { dispatch(mentionCompose(status.account)); }; @@ -404,17 +389,6 @@ const StatusActionBar: React.FC = ({ } const isGroupStatus = typeof status.group === 'object'; - if (isGroupStatus && !!status.group) { - const isGroupOwner = groupRelationship?.role === GroupRoles.OWNER; - - if (isGroupOwner) { - menu.push({ - text: intl.formatMessage(status.pinned ? messages.unpinFromGroup : messages.pinToGroup), - action: handleGroupPinClick, - icon: status.pinned ? require('@tabler/icons/outline/pinned-off.svg') : require('@tabler/icons/outline/pin.svg'), - }); - } - } if (features.bookmarks) { menu.push({ diff --git a/src/features/aliases/index.tsx b/src/features/aliases/index.tsx index 1b6caab8b..e4bbb10d2 100644 --- a/src/features/aliases/index.tsx +++ b/src/features/aliases/index.tsx @@ -47,18 +47,18 @@ const Aliases = () => { const emptyMessage = ; return ( - + { loaded && searchAccountIds.size === 0 ? ( -
+
) : ( -
+
{searchAccountIds.map(accountId => )}
) @@ -66,7 +66,7 @@ const Aliases = () => { -
+
= (props) => { shouldCondense autoFocus={false} group={groupId} - extra={!group.locked && ( - - - - )} />
diff --git a/src/pages/group-page.tsx b/src/pages/group-page.tsx index a1e2bf545..3273ec1da 100644 --- a/src/pages/group-page.tsx +++ b/src/pages/group-page.tsx @@ -19,7 +19,6 @@ const messages = defineMessages({ all: { id: 'group.tabs.all', defaultMessage: 'All' }, members: { id: 'group.tabs.members', defaultMessage: 'Members' }, media: { id: 'group.tabs.media', defaultMessage: 'Media' }, - tags: { id: 'group.tabs.tags', defaultMessage: 'Topics' }, }); interface IGroupPage { diff --git a/src/styles/application.scss b/src/styles/application.scss index b23e1095a..8de2cf5ba 100644 --- a/src/styles/application.scss +++ b/src/styles/application.scss @@ -4,13 +4,11 @@ @import 'loading'; @import 'ui'; @import 'emoji-picker'; -@import 'rtl'; @import 'accessibility'; @import 'navigation'; @import 'autosuggest'; // COMPONENTS -@import 'components/buttons'; @import 'components/modal'; @import 'components/compose-form'; @import 'components/status'; diff --git a/src/styles/autosuggest.scss b/src/styles/autosuggest.scss index f81cbf195..d07eb3868 100644 --- a/src/styles/autosuggest.scss +++ b/src/styles/autosuggest.scss @@ -1,26 +1,3 @@ -.react-datepicker__input-container input { - // display: block; - // box-sizing: border-box; - // width: 100%; - // margin: 0; - // background: transparent; - // color: var(--primary-text-color); - // padding: 10px; - // font-family: inherit; - // font-size: 16px; - // resize: vertical; - // border: 0; - // outline: 0; - - // &:focus { - // outline: 0; - // } - - // @media screen and (max-width: 600px) { - // font-size: 16px; - // } -} - .autosuggest-emoji { display: flex; flex-direction: row; diff --git a/src/styles/components/aliases.scss b/src/styles/components/aliases.scss index 8f15165d4..f689ecf7f 100644 --- a/src/styles/components/aliases.scss +++ b/src/styles/components/aliases.scss @@ -1,14 +1,3 @@ -.aliases { - &__accounts { - overflow-y: auto; - - &.empty-column-indicator { - min-height: unset; - overflow-y: unset; - } - } -} - -.aliases-settings-panel { - flex: 1; +.aliases__accounts.empty-column-indicator { + min-height: unset; } diff --git a/src/styles/components/buttons.scss b/src/styles/components/buttons.scss deleted file mode 100644 index 1f8b0c6f1..000000000 --- a/src/styles/components/buttons.scss +++ /dev/null @@ -1,8 +0,0 @@ -button { - font-family: inherit; - cursor: pointer; - - &:focus { - outline: none; - } -} diff --git a/src/styles/components/compose-form.scss b/src/styles/components/compose-form.scss index dd1b17802..661112e1f 100644 --- a/src/styles/components/compose-form.scss +++ b/src/styles/components/compose-form.scss @@ -29,18 +29,6 @@ font-family: inherit; } - &__upload-wrapper { overflow: hidden; } - - &__uploads-wrapper { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - &.contains-media { - padding: 5px; - } - } - &__upload { flex: 1 1 0; min-width: 40%; @@ -49,18 +37,6 @@ border-radius: 4px; overflow: hidden; - &__actions { - @apply p-2 bg-gradient-to-b from-gray-900/80 via-gray-900/50 to-transparent flex items-start gap-2 justify-end opacity-0 transition-opacity duration-100 ease-linear; - - &.active { - @apply opacity-100; - } - - .icon-button { - @apply text-gray-200 hover:text-white text-sm font-medium p-2.5 space-x-1 rtl:space-x-reverse flex items-center; - } - } - &-description { @apply bg-gradient-to-b from-transparent via-gray-900/50 to-gray-900/80 absolute z-[2px] bottom-0 left-0 right-0 p-2.5 opacity-0 transition-opacity duration-100 ease-linear; @@ -93,25 +69,25 @@ object-fit: cover; } } - } - - &__upload-thumbnail { - background-position: center; - background-size: contain; - background-repeat: no-repeat; - height: 160px; - width: 100%; - overflow: hidden; - position: relative; - - &.video { - background-image: url('../assets/images/video-placeholder.png'); - background-size: cover; - } - - &.audio { - background-image: url('../assets/images/audio-placeholder.png'); - background-size: cover; + + &-thumbnail { + background-position: center; + background-size: contain; + background-repeat: no-repeat; + height: 160px; + width: 100%; + overflow: hidden; + position: relative; + + &.video { + background-image: url('../assets/images/video-placeholder.png'); + background-size: cover; + } + + &.audio { + background-image: url('../assets/images/audio-placeholder.png'); + background-size: cover; + } } } } diff --git a/src/styles/components/modal.scss b/src/styles/components/modal.scss index d69552f67..840d01eec 100644 --- a/src/styles/components/modal.scss +++ b/src/styles/components/modal.scss @@ -29,54 +29,6 @@ } } -.error-modal { - @apply text-gray-900; - border-radius: 8px; - overflow: hidden; - display: flex; - flex-direction: column; - - &__body { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - height: 80vh; - width: 80vw; - max-width: 520px; - max-height: 420px; - position: relative; - text-align: center; - - & > div { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - box-sizing: border-box; - padding: 25px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - opacity: 0; - user-select: text; - } - } - - &__footer { - flex: 0 0 auto; - display: flex; - justify-content: center; - padding: 25px; - - & > div { - min-width: 33px; - } - } -} - .actions-modal { @apply flex-col relative text-gray-400 overflow-hidden w-full max-w-lg m-auto bg-white black:bg-black dark:bg-gray-900 shadow-xl rounded-2xl; max-height: calc(100vh - 3rem); diff --git a/src/styles/components/search.scss b/src/styles/components/search.scss index 70d39c8d2..387f196f0 100644 --- a/src/styles/components/search.scss +++ b/src/styles/components/search.scss @@ -1,7 +1,3 @@ -.search { - position: relative; -} - .search__icon { &::-moz-focus-inner { border: 0; @@ -30,15 +26,15 @@ pointer-events: auto; opacity: 1; } - } - .svg-icon--search.active { - pointer-events: none; - } + &--search.active { + pointer-events: none; + } - .svg-icon--backspace { - cursor: pointer; - width: 22px; - height: 22px; + &--backspace { + cursor: pointer; + width: 22px; + height: 22px; + } } } diff --git a/src/styles/navigation.scss b/src/styles/navigation.scss index 010d3b22e..e732e7f0e 100644 --- a/src/styles/navigation.scss +++ b/src/styles/navigation.scss @@ -11,30 +11,5 @@ &__link { @apply px-2 py-2.5 space-y-1 flex flex-col flex-1 items-center text-gray-600 text-lg; - - // padding: 8px 10px; - // display: flex; - // flex-direction: column; - // align-items: center; - // justify-content: end; - // color: var(--primary-text-color); - // text-decoration: none; - // font-size: 20px; - // width: 55px; - - // span { - // margin-top: 1px; - // text-align: center; - // font-size: 1.2rem; - // } - - // .svg-icon { - // width: 24px; - // height: 24px; - - // svg { - // stroke-width: 1px; - // } - // } } } diff --git a/src/styles/rtl.scss b/src/styles/rtl.scss deleted file mode 100644 index 09de6297d..000000000 --- a/src/styles/rtl.scss +++ /dev/null @@ -1,13 +0,0 @@ -body.rtl { - direction: rtl; - - .status { - padding-left: 10px; - padding-right: 68px; - } - - .table th, - .table td { - text-align: right; - } -} diff --git a/src/styles/utilities.scss b/src/styles/utilities.scss index 8172e0825..8f2ab061c 100644 --- a/src/styles/utilities.scss +++ b/src/styles/utilities.scss @@ -1,11 +1,3 @@ -.w-10i { - width: 2.5rem !important; -} - -.z-1000 { - z-index: 1000; -} - .divide-x-dot > *:not(:last-child)::after { content: 'ยท'; padding-right: 4px;