diff --git a/src/assets/font-icons/pinned-chat.svg b/src/assets/font-icons/pinned-chat.svg index 2515f9f79..43267792e 100644 --- a/src/assets/font-icons/pinned-chat.svg +++ b/src/assets/font-icons/pinned-chat.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/assets/localization/fallback.strings b/src/assets/localization/fallback.strings index bc0be526b..1d94fb201 100644 --- a/src/assets/localization/fallback.strings +++ b/src/assets/localization/fallback.strings @@ -606,6 +606,7 @@ "ConversationOpenBotLinkLogin" = "Log in to **{url}** as {user}"; "ConversationOpenBotLinkAllowMessages" = "Allow **{bot}** to send me messages"; "BotWebViewOpenBot" = "Open Bot"; +"BotChatMiniAppOpen" = "Open"; "WebAppReloadPage" = "Reload Page"; "WebAppRemoveBot" = "Remove From Menu"; "WebAppAddToAttachmentAdd" = "Add"; diff --git a/src/components/common/ChatForumLastMessage.tsx b/src/components/common/ChatForumLastMessage.tsx index dff6036f7..37122b4ee 100644 --- a/src/components/common/ChatForumLastMessage.tsx +++ b/src/components/common/ChatForumLastMessage.tsx @@ -1,5 +1,4 @@ -import type { FC } from '../../lib/teact/teact'; -import type React from '../../lib/teact/teact'; +import type { TeactNode } from '../../lib/teact/teact'; import { memo, useEffect, @@ -28,21 +27,21 @@ import styles from './ChatForumLastMessage.module.scss'; type OwnProps = { chat: ApiChat; topics?: Record; - renderLastMessage: () => React.ReactNode; + hasTags?: boolean; + renderLastMessage: () => TeactNode | undefined; observeIntersection?: ObserveFn; - noForumTitle?: boolean; }; const NO_CORNER_THRESHOLD = Number(REM); const MAX_TOPICS = 3; -const ChatForumLastMessage: FC = ({ +const ChatForumLastMessage = ({ chat, topics, + hasTags, renderLastMessage, observeIntersection, - noForumTitle, -}) => { +}: OwnProps) => { const { openThread } = getActions(); const lastMessageRef = useRef(); @@ -81,7 +80,7 @@ const ChatForumLastMessage: FC = ({ useEffect(() => { const lastMessageElement = lastMessageRef.current; const mainColumnElement = mainColumnRef.current; - if (!lastMessageElement || !mainColumnElement) return; + if (!lastMessageElement || !mainColumnElement || hasTags) return; const lastMessageWidth = lastMessageElement.offsetWidth; const mainColumnWidth = mainColumnElement.offsetWidth; @@ -92,7 +91,7 @@ const ChatForumLastMessage: FC = ({ setOverwrittenWidth(undefined); } setIsReversedCorner(lastMessageWidth > mainColumnWidth); - }, [lastActiveTopic, renderLastMessage]); + }, [lastActiveTopic, renderLastMessage, hasTags]); return (
= ({ style={overwrittenWidth ? `--overwritten-width: ${overwrittenWidth}px` : undefined} > { - !noForumTitle && ( + !hasTags && ( <> {lastActiveTopic && (
@@ -160,7 +159,7 @@ const ChatForumLastMessage: FC = ({ ) }
= ({ +const FakeIcon = ({ fakeType, -}) => { - const lang = useOldLang(); +}: OwnProps) => { + const lang = useLang(); return ( diff --git a/src/components/common/FullNameTitle.module.scss b/src/components/common/FullNameTitle.module.scss index 2d50fcb5a..8eba65f6e 100644 --- a/src/components/common/FullNameTitle.module.scss +++ b/src/components/common/FullNameTitle.module.scss @@ -4,8 +4,8 @@ align-items: center; .statusTransition { - width: 1.5em !important; - height: 1.5em !important; + width: 1.25em !important; + height: 1.25em !important; } } diff --git a/src/components/common/LastMessageMeta.scss b/src/components/common/LastMessageMeta.scss index 80d38e48d..8373cb60d 100644 --- a/src/components/common/LastMessageMeta.scss +++ b/src/components/common/LastMessageMeta.scss @@ -2,9 +2,6 @@ display: flex; flex-shrink: 0; align-items: center; - - margin-right: 0.1875rem; - font-size: 0.75rem; .MessageOutgoingStatus { diff --git a/src/components/common/VerifiedIcon.scss b/src/components/common/VerifiedIcon.scss index bd89bccc0..e922101a5 100644 --- a/src/components/common/VerifiedIcon.scss +++ b/src/components/common/VerifiedIcon.scss @@ -1,10 +1,9 @@ .VerifiedIcon { - --color-fill: var(--color-primary); --color-checkmark: #fff; display: inline-block; flex-shrink: 0; - width: 1.5rem; - height: 1.5rem; + width: 1.25em; + height: 1.25em; } diff --git a/src/components/common/VerifiedIcon.tsx b/src/components/common/VerifiedIcon.tsx index 6d025c39c..b5c9348ce 100644 --- a/src/components/common/VerifiedIcon.tsx +++ b/src/components/common/VerifiedIcon.tsx @@ -1,8 +1,6 @@ -import type { FC } from '../../lib/teact/teact'; - import './VerifiedIcon.scss'; -const VerifiedIcon: FC = () => { +const VerifiedIcon = () => { return ( diff --git a/src/components/left/main/Chat.scss b/src/components/left/main/Chat.scss index 63bd1c675..8997815e4 100644 --- a/src/components/left/main/Chat.scss +++ b/src/components/left/main/Chat.scss @@ -65,13 +65,6 @@ } } - body.is-ios &, - body.is-android & { - .ListItem-button { - border-radius: 0 !important; - } - } - &.forum { --color-chat-username: var(--color-text); @@ -103,14 +96,15 @@ padding-bottom: 0.3125rem; } - .title { - line-height: 1.375rem; - } - .status { background-color: var(--background-color); } + .info.has-tags .subtitle { + height: unset; + line-height: inherit; + } + @media (max-width: 600px) { &::before { left: 0; @@ -118,6 +112,13 @@ } } + &.chat-item-with-tags { + .ListItem-button { + align-items: flex-start; + padding: 0.375rem 0.5625rem; + } + } + .ripple-container { z-index: var(--z-chat-ripple); } @@ -133,7 +134,6 @@ } .avatar-badge-wrapper { - --outline-color: var(--color-background); position: absolute; @@ -141,11 +141,7 @@ right: 0.5rem; bottom: 0; - .ChatBadge { - box-shadow: 0 0 0 2px var(--outline-color); - } - - .ChatBadge-transition { + .chat-badge-transition { position: relative; transition: opacity var(--layer-transition), transform var(--layer-transition); @@ -190,12 +186,25 @@ } .info { + display: flex; + flex-direction: column; + justify-content: center; transition: opacity 300ms ease, transform var(--layer-transition); body.no-page-transitions & { transition: opacity 300ms ease; } + &.has-tags { + justify-content: flex-start; + height: 3.75rem; + + .info-row, .subtitle { + height: 1.25rem; + line-height: 1.25rem; + } + } + .title .custom-emoji { color: var(--color-primary); } @@ -204,11 +213,6 @@ margin-left: 0.25rem; font-size: 1.125rem; color: var(--color-list-icon); - - body.is-ios & { - margin-top: 0; - margin-right: 0.5rem; - } } .general-forum-icon { @@ -216,13 +220,6 @@ color: var(--color-text-secondary); } - .LastMessageMeta { - body.is-ios & { - margin-right: 0; - font-size: 0.875rem; - } - } - .last-message, .typing-status { unicode-bidi: plaintext; @@ -284,7 +281,6 @@ width: 1.25rem; height: 1.25rem; - margin-inline-start: 0.125rem; margin-inline-end: 0.25rem; border-radius: 0.125rem; @@ -292,12 +288,6 @@ object-fit: cover; - body.is-ios & { - width: 1.125rem; - height: 1.125rem; - vertical-align: -0.1875rem; - } - &.round { border-radius: 0.625rem; } @@ -319,11 +309,6 @@ font-size: 0.75rem; color: #fff; - - body.is-ios & { - bottom: 0; - margin-inline-start: -1.125rem; - } } } @@ -332,21 +317,6 @@ line-height: initial; vertical-align: text-top; } - - &.has-tags { - line-height: 1.375rem; - - .ChatBadge { - min-width: 1.375rem; - height: 1.375rem; - line-height: 1.5rem; - - .is-ios &, - .is-macos & { - line-height: 1.375rem; - } - } - } } &[dir="rtl"] { @@ -446,30 +416,12 @@ color: var(--color-white) !important; } - .ChatBadge:not(.pinned):not(.muted) { - color: var(--color-chat-active); - background: var(--color-white); - } - - .ChatBadge:not(.pinned).muted { - color: var(--color-white); - background: #FFFFFF33; - } - - .avatar-badge-wrapper .ChatBadge:not(.pinned) { - --outline-color: transparent; - } - - .avatar-badge-wrapper .ChatBadge:not(.pinned).muted { - background: var(--color-gray); - } - .monoforum-badge { color: var(--color-chat-active); background-color: #fff; } - .ChatTags { + .chat-tag { color: var(--color-chat-active); background-color: #ffffffab; } diff --git a/src/components/left/main/Chat.tsx b/src/components/left/main/Chat.tsx index 45f988c10..7c499e343 100644 --- a/src/components/left/main/Chat.tsx +++ b/src/components/left/main/Chat.tsx @@ -221,7 +221,8 @@ const Chat: FC = ({ }); }, [orderedFolderIds, folderId, chatFoldersById, chatFolderIds]); - const shouldRenderTags = areTagsEnabled && withTags && Boolean(tagFolderIds?.length); + const isTagsMode = areTagsEnabled && withTags; + const shouldRenderTags = isTagsMode && Boolean(tagFolderIds?.length); const { renderSubtitle, ref } = useChatListEntry({ chat, @@ -240,7 +241,7 @@ const Chat: FC = ({ isPreview, onReorderAnimationEnd, topics, - noForumTitle: shouldRenderTags, + hasTags: shouldRenderTags, }); const getIsForumPanelClosed = useSelectorSignal(selectIsForumPanelClosed); @@ -441,13 +442,14 @@ const Chat: FC = ({ forceHidden={getIsForumPanelClosed} topics={topics} isSelected={isSelected} + isOnAvatar />
{chat.isCallActive && chat.isCallNotEmpty && ( )}
-
+
= ({ hasMiniApp={user?.hasMainMiniApp} topics={topics} isSelected={isSelected} + transitionClassName="chat-badge-transition" /> )}
{shouldRenderTags && ( diff --git a/src/components/left/main/ChatBadge.module.scss b/src/components/left/main/ChatBadge.module.scss new file mode 100644 index 000000000..494d104fe --- /dev/null +++ b/src/components/left/main/ChatBadge.module.scss @@ -0,0 +1,120 @@ +.badge { + flex-shrink: 0; + + min-width: 1.375rem; + height: 1.375rem; + margin-inline-start: 0.5rem; + padding: 0 0.4375rem; + border-radius: 0.75rem; + + font-size: 0.875rem; + font-weight: var(--font-weight-medium); + line-height: 1.4375rem; + color: white; + text-align: center; + + background: var(--color-gray); + + :global(body.is-ios) &, + :global(body.is-macos) & { + line-height: 1.375rem; + } +} + +.transition { + display: flex; + align-items: center; + justify-content: center; + + height: 1.25rem; + + opacity: 1; + + transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); + + &:not(:global(.open)) { + transform: scale(0); + opacity: 0; + } + + &:not(:global(.shown)) { + display: none; + } + + &:global(.closing) { + transition: + transform 0.2s ease-out, + opacity 0.2s ease-out; + } +} + +.wrapper { + display: flex; +} + +.mention, +.unread:not(.muted), +.unopened:not(.muted) { + color: var(--color-white); + background: var(--color-green); +} + +.unopened { + align-self: center; + + width: 0.5rem; + min-width: auto; + height: 0.5rem; + min-height: auto; + padding: 0; +} + +.pinned { + display: flex; + justify-content: flex-end; + + padding: 0; + + font-size: 1rem; + color: var(--color-list-icon); + + background: transparent; +} + +.reaction:not(.muted) { + background: #ed504f; +} + +.round { + display: grid; + place-content: center; + + width: 1.375rem; + height: 1.375rem; + padding: 0.25rem; + + font-size: 1rem; +} + +.miniapp { + z-index: calc(var(--z-chat-ripple) + 1); + height: auto !important; + padding: 0 0.4375rem !important; + font-size: 0.875rem !important; +} + +.selected { + .badge:not(.pinned) { + color: var(--color-chat-active); + background: var(--color-white); + + &.muted { + color: var(--color-white); + background: #ffffff33; + } + } +} + +.onAvatar .badge { + box-shadow: 0 0 0 2px var(--outline-color); +} diff --git a/src/components/left/main/ChatBadge.scss b/src/components/left/main/ChatBadge.scss deleted file mode 100644 index cbedb6e46..000000000 --- a/src/components/left/main/ChatBadge.scss +++ /dev/null @@ -1,122 +0,0 @@ -.ChatBadge-transition { - opacity: 1; - transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); - - &:not(.open) { - transform: scale(0); - opacity: 0; - } - - &:not(.shown) { - display: none; - } - - &.closing { - transition: transform 0.2s ease-out, opacity 0.2s ease-out; - } - - body.is-macos & { - height: 1.375rem; - } -} - -.ChatBadge-wrapper { - display: flex; - - .ChatBadge { - margin-inline-start: 0.5rem; - } -} - -.ChatBadge { - flex-shrink: 0; - - min-width: 1.5rem; - height: 1.5rem; - padding: 0 0.4375rem; - border-radius: 0.75rem; - - font-size: 0.875rem; - font-weight: var(--font-weight-medium); - line-height: 1.5625rem; - color: white; - text-align: center; - - background: var(--color-gray); - - body.is-macos & { - line-height: 1.5rem; - } - - body.is-ios &:not(.unopened) { - min-width: 1.375rem; - height: 1.375rem; - padding: 0 0.375rem; - line-height: 1.375rem; - } - - body.is-ios, - body.is-macos, - &.miniapp { - min-width: 1.5rem; - height: 1.5rem !important; - line-height: 1.5rem !important; - } - - &.mention, - &.unread:not(.muted), - &.unopened:not(.muted) { - color: var(--color-white); - background: var(--color-green); - } - - &.unopened { - align-self: center; - - width: 0.5rem; - min-width: auto; - height: 0.5rem; - min-height: auto; - padding: 0; - } - - &.pinned { - width: 1.5rem; - padding: 0; - color: var(--color-list-icon); - background: transparent; - - .icon { - font-size: 1.5rem; - } - } - - &.reaction:not(.muted) { - background: #ed504f; - } - - &.mention, &.reaction { - width: 1.5rem; - padding: 0.25rem !important; - - .icon { - font-size: 1rem; - vertical-align: super; - } - - body.is-ios & { - width: 1.375rem; - padding: 0.25rem; - - .icon { - font-size: 0.875rem; - } - } - } - - &.miniapp { - z-index: calc(var(--z-chat-ripple) + 1); - padding: 0 0.4375rem !important; - font-size: 0.875rem !important; - } -} diff --git a/src/components/left/main/ChatBadge.tsx b/src/components/left/main/ChatBadge.tsx index dbe376f09..7b0ae62d1 100644 --- a/src/components/left/main/ChatBadge.tsx +++ b/src/components/left/main/ChatBadge.tsx @@ -1,5 +1,3 @@ -import type { FC } from '../../../lib/teact/teact'; -import type React from '../../../lib/teact/teact'; import { memo, useMemo } from '../../../lib/teact/teact'; import { getActions } from '../../../global'; @@ -15,14 +13,13 @@ import { extractCurrentThemeParams } from '../../../util/themeStyle'; import useDerivedState from '../../../hooks/useDerivedState'; import useLang from '../../../hooks/useLang'; import useLastCallback from '../../../hooks/useLastCallback'; -import useOldLang from '../../../hooks/useOldLang'; import AnimatedCounter from '../../common/AnimatedCounter'; import Icon from '../../common/icons/Icon'; import Button from '../../ui/Button'; import ShowTransition from '../../ui/ShowTransition'; -import './ChatBadge.scss'; +import styles from './ChatBadge.module.scss'; type OwnProps = { chat: ApiChat; @@ -36,9 +33,12 @@ type OwnProps = { forceHidden?: boolean | Signal; topics?: Record; isSelected?: boolean; + isOnAvatar?: boolean; + transitionClassName?: string; + badgeClassName?: string; }; -const ChatBadge: FC = ({ +const ChatBadge = ({ topic, topics, chat, @@ -50,10 +50,12 @@ const ChatBadge: FC = ({ isSavedDialog, hasMiniApp, isSelected, -}) => { + isOnAvatar, + transitionClassName, + badgeClassName, +}: OwnProps) => { const { requestMainWebView } = getActions(); - const oldLang = useOldLang(); const lang = useLang(); const { @@ -101,14 +103,6 @@ const ChatBadge: FC = ({ || isTopicUnopened || hasMiniApp, ); - const isUnread = Boolean((unreadCount || hasUnreadMark) && !isSavedDialog); - const className = buildClassName( - 'ChatBadge', - !shouldBeUnMuted && 'muted', - !isUnread && isPinned && 'pinned', - isUnread && 'unread', - ); - const handleOpenApp = useLastCallback((e: React.MouseEvent) => { e.stopPropagation(); @@ -121,30 +115,32 @@ const ChatBadge: FC = ({ }); function renderContent() { + const baseClassName = buildClassName(styles.badge, !shouldBeUnMuted && styles.muted, badgeClassName); + const unreadReactionsElement = unreadReactionsCount && ( -
+
); const unreadMentionsElement = unreadMentionsCount && ( -
+
); const unopenedTopicElement = isTopicUnopened && ( -
+
); const unreadCountElement = (hasUnreadMark || unreadCount) ? ( -
+
{!hasUnreadMark && }
) : undefined; const pinnedElement = isPinned && ( -
+
); @@ -152,12 +148,12 @@ const ChatBadge: FC = ({ const miniAppButton = hasMiniApp && ( ); @@ -185,14 +181,23 @@ const ChatBadge: FC = ({ } return ( -
+
{elements}
); } return ( - + {renderContent()} ); diff --git a/src/components/left/main/ChatTags.module.scss b/src/components/left/main/ChatTags.module.scss index 5d47b1c16..d62c9d47f 100644 --- a/src/components/left/main/ChatTags.module.scss +++ b/src/components/left/main/ChatTags.module.scss @@ -1,13 +1,12 @@ .wrapper { display: flex; gap: 0.25rem; - height: 0.875rem; - margin-top: 0.125rem; + padding-top: 0.125rem; } .tag { - --emoji-size: 0.75rem; - --custom-emoji-size: 0.75rem; + --emoji-size: 0.875rem; + --custom-emoji-size: 0.875rem; position: relative; @@ -17,10 +16,11 @@ justify-content: center; min-width: 1.5rem; - padding: 0 0.25rem; + height: 1.125rem; + padding: 0.125rem 0.25rem; border-radius: 0.25rem; - font-size: 0.6875rem; + font-size: 0.75rem; font-weight: var(--font-weight-medium); line-height: 1; color: var(--accent-color); diff --git a/src/components/left/main/ChatTags.tsx b/src/components/left/main/ChatTags.tsx index ac1388869..471ce3f3e 100644 --- a/src/components/left/main/ChatTags.tsx +++ b/src/components/left/main/ChatTags.tsx @@ -3,21 +3,25 @@ import { memo } from '../../../lib/teact/teact'; import type { ApiChatFolder } from '../../../api/types'; import buildClassName from '../../../util/buildClassName'; +import { REM } from '../../common/helpers/mediaDimensions'; import { getApiPeerColorClass } from '../../common/helpers/peerColor'; import { renderTextWithEntities } from '../../common/helpers/renderTextWithEntities'; import styles from './ChatTags.module.scss'; const MAX_VISIBLE_TAGS = 3; +const CUSTOM_EMOJI_SIZE = 0.875 * REM; type OwnProps = { orderedFolderIds?: number[]; chatFoldersById?: Record; + itemClassName?: string; }; const ChatTags = ({ orderedFolderIds, chatFoldersById, + itemClassName, }: OwnProps) => { if (!orderedFolderIds) { return undefined; @@ -34,22 +38,22 @@ const ChatTags = ({
{renderTextWithEntities({ text: folder.title.text, entities: folder.title.entities, noCustomEmojiPlayback: folder.noTitleAnimations, - emojiSize: 12, + emojiSize: CUSTOM_EMOJI_SIZE, })}
); })} {remainingCount > 0 && ( -
+
+ {remainingCount}
diff --git a/src/components/left/main/Topic.module.scss b/src/components/left/main/Topic.module.scss index f40adc187..4c22c101d 100644 --- a/src/components/left/main/Topic.module.scss +++ b/src/components/left/main/Topic.module.scss @@ -14,7 +14,6 @@ :global(.LastMessageMeta) { margin-top: -0.5rem; - margin-right: 0 !important; padding-top: 0; } } diff --git a/src/components/left/main/Topic.tsx b/src/components/left/main/Topic.tsx index 00d4a8571..b673d05a9 100644 --- a/src/components/left/main/Topic.tsx +++ b/src/components/left/main/Topic.tsx @@ -225,6 +225,7 @@ const Topic: FC = ({ topic={topic} wasTopicOpened={wasTopicOpened} topics={topics} + isSelected={isSelected} />
diff --git a/src/components/left/main/hooks/useChatListEntry.tsx b/src/components/left/main/hooks/useChatListEntry.tsx index 71ae8dd77..9b8a0c48d 100644 --- a/src/components/left/main/hooks/useChatListEntry.tsx +++ b/src/components/left/main/hooks/useChatListEntry.tsx @@ -51,7 +51,7 @@ export default function useChatListEntry({ isTopic, isSavedDialog, isPreview, - noForumTitle, + hasTags, onReorderAnimationEnd, }: { chat?: ApiChat; @@ -67,11 +67,11 @@ export default function useChatListEntry({ isTopic?: boolean; isSavedDialog?: boolean; isPreview?: boolean; + hasTags?: boolean; animationType: ChatAnimationTypes; orderDiff: number; withInterfaceAnimations?: boolean; - noForumTitle?: boolean; onReorderAnimationEnd?: NoneToVoidFunction; }) { const lang = useLang(); @@ -156,7 +156,7 @@ export default function useChatListEntry({ renderLastMessage={renderLastMessageOrTyping} observeIntersection={observeIntersection} topics={topics} - noForumTitle={noForumTitle} + hasTags={hasTags} /> ); } diff --git a/src/components/left/search/LeftSearch.scss b/src/components/left/search/LeftSearch.scss index 881b25b78..d3634041f 100644 --- a/src/components/left/search/LeftSearch.scss +++ b/src/components/left/search/LeftSearch.scss @@ -197,6 +197,13 @@ filter: brightness(1.1); } } + + .search-result-miniapp-button { + height: auto !important; + padding: 0 0.4375rem !important; + font-size: 0.875rem !important; + line-height: 1.5rem; + } } .search-section { diff --git a/src/components/left/search/LeftSearchResultChat.tsx b/src/components/left/search/LeftSearchResultChat.tsx index 15d54952b..219483a44 100644 --- a/src/components/left/search/LeftSearchResultChat.tsx +++ b/src/components/left/search/LeftSearchResultChat.tsx @@ -20,8 +20,8 @@ import { extractCurrentThemeParams } from '../../../util/themeStyle'; import useChatContextActions from '../../../hooks/useChatContextActions'; import useFlag from '../../../hooks/useFlag'; +import useLang from '../../../hooks/useLang'; import useLastCallback from '../../../hooks/useLastCallback'; -import useOldLang from '../../../hooks/useOldLang'; import useSelectWithEnter from '../../../hooks/useSelectWithEnter'; import GroupChatInfo from '../../common/GroupChatInfo'; @@ -58,7 +58,7 @@ const LeftSearchResultChat: FC = ({ onClick, }) => { const { requestMainWebView, updateChatMutedState, openQuickPreview } = getActions(); - const oldLang = useOldLang(); + const lang = useLang(); const [isMuteModalOpen, openMuteModal, closeMuteModal] = useFlag(); const [isChatFolderModalOpen, openChatFolderModal, closeChatFolderModal] = useFlag(); @@ -150,13 +150,13 @@ const LeftSearchResultChat: FC = ({ )} {withOpenAppButton && user?.hasMainMiniApp && ( )} {shouldRenderMuteModal && ( diff --git a/src/components/left/settings/folders/SettingsFolders.scss b/src/components/left/settings/folders/SettingsFolders.scss index 52cafa864..1d7b54c10 100644 --- a/src/components/left/settings/folders/SettingsFolders.scss +++ b/src/components/left/settings/folders/SettingsFolders.scss @@ -214,7 +214,7 @@ .settings-folders-color-circle { position: absolute; top: 50%; - right: 2rem; + right: 2.5rem; transform: translateY(-50%); width: 1.25rem; diff --git a/src/components/left/settings/folders/SettingsFoldersMain.tsx b/src/components/left/settings/folders/SettingsFoldersMain.tsx index 3e928de4e..2726423f3 100644 --- a/src/components/left/settings/folders/SettingsFoldersMain.tsx +++ b/src/components/left/settings/folders/SettingsFoldersMain.tsx @@ -250,7 +250,7 @@ const SettingsFoldersMain: FC = ({ const draggedTop = (state.orderedFolderIds?.indexOf(folder.id) ?? 0) * FOLDER_HEIGHT_PX; const top = (state.dragOrderIds?.indexOf(folder.id) ?? 0) * FOLDER_HEIGHT_PX; - const shouldRenderColor = folder?.color !== undefined && folder.color !== -1 && isPremium; + const shouldRenderColor = folder?.color !== undefined && folder.color !== -1 && areTagsEnabled; if (folder.id === ALL_FOLDER_ID) { return ( @@ -292,7 +292,7 @@ const SettingsFoldersMain: FC = ({ onDrag={handleDrag} onDragEnd={handleDragEnd} style={`top: ${isDragged ? draggedTop : top}px;`} - knobStyle={`${lang.isRtl ? 'left' : 'right'}: ${shouldRenderColor ? '3.5rem' : '3rem'};`} + knobStyle={`${lang.isRtl ? 'left' : 'right'}: ${shouldRenderColor ? '4rem' : '2.5rem'};`} isDisabled={isBlocked || !isActive} > = ({ +const Badge = ({ text, className, isAlternateColor, -}) => { +}: OwnProps) => { return (