From efa6fef58ab3eb7abc6c0f2525283438b26476d5 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 18 Dec 2023 21:12:46 +0100 Subject: [PATCH 01/12] fix(post): fix state string placement --- src/views/post/post.module.css | 2 ++ src/views/post/post.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/post/post.module.css b/src/views/post/post.module.css index d45b55b8..14dfe246 100644 --- a/src/views/post/post.module.css +++ b/src/views/post/post.module.css @@ -68,6 +68,8 @@ text-overflow: ellipsis; width: calc(100vw - 28px); width: 100vw; + color: var(--text-info); + font-size: x-small; } @media (max-width: 768px) { diff --git a/src/views/post/post.tsx b/src/views/post/post.tsx index fc6fc6d9..29f04824 100644 --- a/src/views/post/post.tsx +++ b/src/views/post/post.tsx @@ -68,8 +68,8 @@ const Post = () => {
-
{loadingString && loadingString} +
{replies.map((reply, index) => ( From 665f00c5198715b4ef738c8a4332dd8deb518c35 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 18 Dec 2023 21:48:43 +0100 Subject: [PATCH 02/12] style(author sidebar): show karma if 0, remove "estimated" --- .../author-sidebar/author-sidebar.tsx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/components/author-sidebar/author-sidebar.tsx b/src/components/author-sidebar/author-sidebar.tsx index 0b664c9c..dfd03b37 100644 --- a/src/components/author-sidebar/author-sidebar.tsx +++ b/src/components/author-sidebar/author-sidebar.tsx @@ -112,18 +112,12 @@ const AuthorSidebar = () => {
)} - {postScore ? ( - <> -
- {postScore} post karma - {isAuthorPage && postScore ? ' (estimated)' : null} -
-
- {replyScore} comment karma - {isAuthorPage && replyScore ? ' (estimated)' : null} -
- - ) : null} +
+ {postScore} post karma +
+
+ {replyScore} comment karma +
{isAuthorPage && authorAddress !== profileAccount?.author?.address && ( From a89bfe59615412992daa31c634294f2e3259dbe0 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Tue, 19 Dec 2023 11:14:22 +0100 Subject: [PATCH 03/12] style(author sidebar): better styling for edit displayname button --- .../author-sidebar/author-sidebar.module.css | 16 +++++++++++ .../author-sidebar/author-sidebar.tsx | 27 ++++++++++++++----- src/components/post/post.tsx | 6 ++++- src/components/reply/reply.tsx | 9 +++++-- src/views/post/post.tsx | 2 +- 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/src/components/author-sidebar/author-sidebar.module.css b/src/components/author-sidebar/author-sidebar.module.css index 6cce7d12..afdb47cf 100644 --- a/src/components/author-sidebar/author-sidebar.module.css +++ b/src/components/author-sidebar/author-sidebar.module.css @@ -82,4 +82,20 @@ .blockUser { color: var(--text-primary); cursor: pointer; +} + +.editButtonWrapper { + color: var(--text-info); + font-size: 11px; + font-weight: normal; + font-family: verdana, arial, helvetica, sans-serif; +} + +.editButton { + color: var(--text-primary); + cursor: pointer; +} + +.editButton:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/src/components/author-sidebar/author-sidebar.tsx b/src/components/author-sidebar/author-sidebar.tsx index dfd03b37..db8f3eed 100644 --- a/src/components/author-sidebar/author-sidebar.tsx +++ b/src/components/author-sidebar/author-sidebar.tsx @@ -1,6 +1,9 @@ -import { - // Link, - useLocation, useNavigate, useParams } from 'react-router-dom'; +import { + // Link, + useLocation, + useNavigate, + useParams, +} from 'react-router-dom'; import { useAccount, useAccountComments, @@ -15,9 +18,10 @@ import { import styles from './author-sidebar.module.css'; import { getFormattedDuration } from '../../lib/utils/time-utils'; import { isAuthorView, isProfileView } from '../../lib/utils/view-utils'; -import { - // findAuthorSubplebbits, - estimateAuthorKarma } from '../../lib/utils/user-utils'; +import { + // findAuthorSubplebbits, + estimateAuthorKarma, +} from '../../lib/utils/user-utils'; // import { useDefaultSubplebbitAddresses } from '../../lib/utils/addresses-utils'; import SubscribeButton from '../subscribe-button'; @@ -104,7 +108,16 @@ const AuthorSidebar = () => {
{address} - {isProfilePage && !displayName && } + {isProfilePage && !displayName && ( + + {' '} + ( + + edit + + ) + + )}
{displayName &&
{displayName}
} {isAuthorPage && authorAddress !== profileAccount?.author?.address && ( diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx index 805295da..8f9371eb 100644 --- a/src/components/post/post.tsx +++ b/src/components/post/post.tsx @@ -36,7 +36,11 @@ const PostAuthor = ({ authorAddress, authorRole, cid, displayName, shortAddress, return ( <> - {displayName && {displayName} } + {displayName && ( + + {displayName}{' '} + + )} u/{shortAddress || shortAuthorAddress} u/{shortAuthorAddress} diff --git a/src/components/reply/reply.tsx b/src/components/reply/reply.tsx index cfa84872..f4e40933 100644 --- a/src/components/reply/reply.tsx +++ b/src/components/reply/reply.tsx @@ -36,13 +36,18 @@ const ReplyAuthor = ({ address, authorRole, cid, displayName, shortAuthorAddress return ( <> - {displayName && {displayName} } + {displayName && ( + + {displayName}{' '} + + )} {displayName ? `u/${shortAuthorAddress}` : shortAuthorAddress} {authorRole && ( - {' '}[ + {' '} + [ {authorRoleInitial} diff --git a/src/views/post/post.tsx b/src/views/post/post.tsx index 29f04824..2f562eda 100644 --- a/src/views/post/post.tsx +++ b/src/views/post/post.tsx @@ -68,7 +68,7 @@ const Post = () => {
- {loadingString && loadingString} + {loadingString && loadingString}
{replies.map((reply, index) => ( From 81efaa76954f79ba46add059ebeadbdad5bdc643 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Tue, 19 Dec 2023 15:54:22 +0100 Subject: [PATCH 04/12] fix(reply): show parent of pending reply --- src/components/reply/reply.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/reply/reply.tsx b/src/components/reply/reply.tsx index f4e40933..a2d2f5f8 100644 --- a/src/components/reply/reply.tsx +++ b/src/components/reply/reply.tsx @@ -1,5 +1,5 @@ import { useMemo, useState } from 'react'; -import { Comment, useAuthorAddress, useComment, useSubplebbit } from '@plebbit/plebbit-react-hooks'; +import { Comment, useAccountComment, useAuthorAddress, useComment, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import { flattenCommentsPages } from '@plebbit/plebbit-react-hooks/dist/lib/utils'; import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; @@ -102,8 +102,12 @@ const ReplyMedia = ({ commentMediaInfo, content, expanded, hasThumbnail, link, l ); }; -const ParentLink = ({ reply }: { reply: Comment }) => { - const parent = useComment({ commentCid: reply.postCid }); +type ParentLinkProps = { + parentCid: string; +}; + +const ParentLink = ({ parentCid }: ParentLinkProps) => { + const parent = useComment({ commentCid: parentCid }); const { author, cid, content, title, subplebbitAddress } = parent || {}; const { t } = useTranslation(); const postTitle = (title?.length > 300 ? title?.slice(0, 300) + '...' : title) || (content?.length > 300 ? content?.slice(0, 300) + '...' : content); @@ -134,7 +138,7 @@ interface ReplyProps { } const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: ReplyProps) => { - const { author, cid, content, downvoteCount, flair, link, linkHeight, linkWidth, markedAsRead, removed, spoiler, state, subplebbitAddress, timestamp, upvoteCount } = + const { author, cid, content, downvoteCount, flair, link, linkHeight, linkWidth, markedAsRead, postCid, removed, spoiler, state, subplebbitAddress, timestamp, upvoteCount } = reply || {}; const subplebbit = useSubplebbit({ subplebbitAddress }); @@ -173,9 +177,11 @@ const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: Repl const childrenCount = unnestedReplies.length; const childrenString = childrenCount === 1 ? t('child', { childrenCount }) : t('children', { childrenCount }); + const pendingReply = useAccountComment({commentIndex: reply?.index}); + return (
- {isSingle && } + {isSingle && }
1 && styles.nested} ${ isNotification && !markedAsRead ? styles.unreadNotification : '' From 1f61472fab0045934e0f6662dc7366bf723f0a67 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Tue, 19 Dec 2023 16:30:31 +0100 Subject: [PATCH 05/12] Update reply.tsx --- src/components/reply/reply.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/reply/reply.tsx b/src/components/reply/reply.tsx index a2d2f5f8..5a56b5d0 100644 --- a/src/components/reply/reply.tsx +++ b/src/components/reply/reply.tsx @@ -178,10 +178,11 @@ const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: Repl const childrenString = childrenCount === 1 ? t('child', { childrenCount }) : t('children', { childrenCount }); const pendingReply = useAccountComment({commentIndex: reply?.index}); + const parentOfPendingReply = useComment({commentCid: pendingReply?.parentCid}); return (
- {isSingle && } + {isSingle && }
1 && styles.nested} ${ isNotification && !markedAsRead ? styles.unreadNotification : '' From e4acdc657a9d6f62e3202be28a16b2f6743cf7f5 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Tue, 19 Dec 2023 17:36:54 +0100 Subject: [PATCH 06/12] chore(package.json): add commitizen --- package.json | 6 ++++++ src/components/reply/reply.tsx | 32 ++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 0efad20c..aa958fe6 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,13 @@ }, "husky": { "hooks": { + "prepare-commit-msg": "exec < /dev/tty && cz --hook || true", "pre-commit": "lint-staged" } + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } } } diff --git a/src/components/reply/reply.tsx b/src/components/reply/reply.tsx index 5a56b5d0..6e76ab13 100644 --- a/src/components/reply/reply.tsx +++ b/src/components/reply/reply.tsx @@ -103,11 +103,11 @@ const ReplyMedia = ({ commentMediaInfo, content, expanded, hasThumbnail, link, l }; type ParentLinkProps = { - parentCid: string; + postCid: string; }; -const ParentLink = ({ parentCid }: ParentLinkProps) => { - const parent = useComment({ commentCid: parentCid }); +const ParentLink = ({ postCid }: ParentLinkProps) => { + const parent = useComment({ commentCid: postCid }); const { author, cid, content, title, subplebbitAddress } = parent || {}; const { t } = useTranslation(); const postTitle = (title?.length > 300 ? title?.slice(0, 300) + '...' : title) || (content?.length > 300 ? content?.slice(0, 300) + '...' : content); @@ -138,8 +138,24 @@ interface ReplyProps { } const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: ReplyProps) => { - const { author, cid, content, downvoteCount, flair, link, linkHeight, linkWidth, markedAsRead, postCid, removed, spoiler, state, subplebbitAddress, timestamp, upvoteCount } = - reply || {}; + const { + author, + cid, + content, + downvoteCount, + flair, + link, + linkHeight, + linkWidth, + markedAsRead, + postCid, + removed, + spoiler, + state, + subplebbitAddress, + timestamp, + upvoteCount, + } = reply || {}; const subplebbit = useSubplebbit({ subplebbitAddress }); const authorRole = subplebbit?.roles?.[reply.author?.address]?.role; @@ -177,12 +193,12 @@ const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: Repl const childrenCount = unnestedReplies.length; const childrenString = childrenCount === 1 ? t('child', { childrenCount }) : t('children', { childrenCount }); - const pendingReply = useAccountComment({commentIndex: reply?.index}); - const parentOfPendingReply = useComment({commentCid: pendingReply?.parentCid}); + const pendingReply = useAccountComment({ commentIndex: reply?.index }); + const parentOfPendingReply = useComment({ commentCid: pendingReply?.parentCid }); return (
- {isSingle && } + {isSingle && }
1 && styles.nested} ${ isNotification && !markedAsRead ? styles.unreadNotification : '' From b93a72ebb5e4f698ebe720fd12169cfeb2c874f9 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Tue, 19 Dec 2023 17:38:56 +0100 Subject: [PATCH 07/12] fix(profile settings): signer can be undefined --- .../settings/profile-settings/profile-settings.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/settings/profile-settings/profile-settings.tsx b/src/views/settings/profile-settings/profile-settings.tsx index b80c785f..9a49a3a1 100644 --- a/src/views/settings/profile-settings/profile-settings.tsx +++ b/src/views/settings/profile-settings/profile-settings.tsx @@ -70,10 +70,10 @@ const ProfileSettings = () => { let resolveString = ''; let resolveClass = ''; - if (resolvedAddress && resolvedAddress === account?.signer.address) { + if (resolvedAddress && resolvedAddress === account?.signer?.address) { resolveString = `crypto address belongs to this account, address: ${getShortAddress(resolvedAddress)}`; resolveClass = styles.green; - } else if (resolvedAddress && resolvedAddress !== account?.signer.address) { + } else if (resolvedAddress && resolvedAddress !== account?.signer?.address) { resolveString = `crypto address belongs to another account, address: ${getShortAddress(resolvedAddress)}`; resolveClass = styles.red; } else { @@ -86,7 +86,7 @@ const ProfileSettings = () => { resolveClass: resolveClass, showResolvingMessage: false, })); - }, [resolvedAddress, account?.signer.address]); + }, [resolvedAddress, account?.signer?.address]); const cryptoAddressInfo = () => { alert( @@ -98,13 +98,13 @@ const ProfileSettings = () => { if (!cryptoState.cryptoAddress || !cryptoState.cryptoAddress.includes('.')) { alert('Please enter a crypto address.'); return; - } else if (resolvedAddress && resolvedAddress !== account?.signer.address) { + } else if (resolvedAddress && resolvedAddress !== account?.signer?.address) { alert(`Cannot save resolved crypto address, it belongs to another account, address: ${resolvedAddress}`); return; } else if (cryptoState.cryptoAddress && !resolvedAddress) { alert('Please wait, crypto address is not resolved yet.'); return; - } else if (resolvedAddress && resolvedAddress === account?.signer.address) { + } else if (resolvedAddress && resolvedAddress === account?.signer?.address) { try { await setAccount({ ...account, author: { ...account?.author, address: cryptoState.cryptoAddress } }); setCryptoState((prevState) => ({ From 44d6dec5e655d6abd5c6ab8ca56002c1c70544dd Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Tue, 19 Dec 2023 20:44:57 +0100 Subject: [PATCH 08/12] style(topbar): raise contrast of separator gray color for dark mode --- src/components/topbar/topbar.module.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/topbar/topbar.module.css b/src/components/topbar/topbar.module.css index e48ab3af..9fd49473 100644 --- a/src/components/topbar/topbar.module.css +++ b/src/components/topbar/topbar.module.css @@ -76,7 +76,7 @@ } .separator { - color: var(--border-text); + color: var(--gray-contrast); cursor: default; } From 158aefe13cd49a5cd4aa262a8ec6f68c6983cddc Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 20 Dec 2023 11:34:06 +0100 Subject: [PATCH 09/12] feat(reply form): allow posting replies with a link and no content --- src/components/reply-form/reply-form.tsx | 4 ++-- src/hooks/use-reply.ts | 27 +++++++++++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/components/reply-form/reply-form.tsx b/src/components/reply-form/reply-form.tsx index 6d3d259e..030f561f 100644 --- a/src/components/reply-form/reply-form.tsx +++ b/src/components/reply-form/reply-form.tsx @@ -47,8 +47,8 @@ const ReplyForm = ({ cid, isReplyingToReply, hideReplyForm }: ReplyFormProps) => const currentContent = textRef.current?.value || ''; const currentUrl = urlRef.current?.value || ''; - if (!currentContent.trim()) { - alert(`missing content`); + if (!currentContent.trim() && !currentUrl) { + alert(`missing content or url`); return; } diff --git a/src/hooks/use-reply.ts b/src/hooks/use-reply.ts index 6686de78..322ede73 100644 --- a/src/hooks/use-reply.ts +++ b/src/hooks/use-reply.ts @@ -85,9 +85,30 @@ const useReply = (comment: Comment) => { const setContent = useMemo( () => ({ - content: (newContent: string) => setReplyStore({ subplebbitAddress, parentCid, content: newContent, link: link || undefined, spoiler: spoiler || false }), - link: (newLink: string) => setReplyStore({ subplebbitAddress, parentCid, content: content, link: newLink || undefined, spoiler: spoiler || false }), - spoiler: (newSpoiler: boolean) => setReplyStore({ subplebbitAddress, parentCid, content: content, link: link || undefined, spoiler: newSpoiler }), + content: (newContent: string) => + setReplyStore({ + subplebbitAddress, + parentCid, + content: newContent === '' ? undefined : newContent, + link: link || undefined, + spoiler: spoiler || false, + }), + link: (newLink: string) => + setReplyStore({ + subplebbitAddress, + parentCid, + content: content, + link: newLink || undefined, + spoiler: spoiler || false, + }), + spoiler: (newSpoiler: boolean) => + setReplyStore({ + subplebbitAddress, + parentCid, + content: content, + link: link || undefined, + spoiler: newSpoiler, + }), }), [subplebbitAddress, parentCid, setReplyStore, content, link, spoiler], ); From 5e3ee7d1d198a368d3a767d8416fd073baf59009 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 20 Dec 2023 16:14:42 +0100 Subject: [PATCH 10/12] chore(author siebar): add comment --- src/components/author-sidebar/author-sidebar.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/author-sidebar/author-sidebar.tsx b/src/components/author-sidebar/author-sidebar.tsx index db8f3eed..a7081c36 100644 --- a/src/components/author-sidebar/author-sidebar.tsx +++ b/src/components/author-sidebar/author-sidebar.tsx @@ -25,6 +25,8 @@ import { // import { useDefaultSubplebbitAddresses } from '../../lib/utils/addresses-utils'; import SubscribeButton from '../subscribe-button'; +// TODO: uncomment when useSubplebbits({fetch: false}) is implemented, because fetching all subs for this is too expensive + // interface AuthorModeratingListProps { // accountSubplebbits: AccountSubplebbit[]; // authorSubplebbits: string[]; From 69408d331ee8bfbf0b781cade6ae4f8dd3742b98 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 20 Dec 2023 17:15:29 +0100 Subject: [PATCH 11/12] style(mod tools): improve UI --- .../hide-tools/hide-tools.module.css | 2 +- .../mod-tools/mod-tools.module.css | 32 +++++++++++++++++-- .../comment-tools/mod-tools/mod-tools.tsx | 5 ++- src/themes.css | 6 ++-- .../account-settings.module.css | 2 +- .../profile-settings.module.css | 2 +- 6 files changed, 40 insertions(+), 9 deletions(-) diff --git a/src/components/post/comment-tools/hide-tools/hide-tools.module.css b/src/components/post/comment-tools/hide-tools/hide-tools.module.css index 1509cf9a..ebd1f9af 100644 --- a/src/components/post/comment-tools/hide-tools/hide-tools.module.css +++ b/src/components/post/comment-tools/hide-tools/hide-tools.module.css @@ -30,7 +30,7 @@ .menuItem input[type="text"] { padding: 2px; - box-shadow: var(--box-shadow); + box-shadow: var(--box-shadow-input); margin-top: 2px; } diff --git a/src/components/post/comment-tools/mod-tools/mod-tools.module.css b/src/components/post/comment-tools/mod-tools/mod-tools.module.css index 5e35102c..6fa82808 100644 --- a/src/components/post/comment-tools/mod-tools/mod-tools.module.css +++ b/src/components/post/comment-tools/mod-tools/mod-tools.module.css @@ -13,16 +13,29 @@ color: var(--text-info); font-weight: bold; border: 1px solid var(--border-text); + box-shadow: var(--box-shadow-modal); + width: 200px; +} + +.modalTitle { + background: var(--background-primary); + padding-bottom: 2px; + margin-bottom: 6px; + text-align: center; + color: var(--text-primary); + font-size: 13px; } .modal input[type="checkbox"] { margin-right: 3px; outline: none; + cursor: pointer; } .menuItem { padding-bottom: 5px; text-transform: lowercase; + cursor: pointer; } .menuReason { @@ -31,10 +44,23 @@ .menuItem input[type="text"] { padding: 2px; - box-shadow: var(--box-shadow); + box-shadow: var(--box-shadow-input); margin-top: 2px; + width: calc(100% - 6px); + margin-bottom: 2px; } -.menuItem button { - text-transform: capitalize; +.bottom { + border-top: solid 1px gray; + clear: both; + display: block; + padding-top: 8px; + text-align: center; + padding-bottom: 3px; +} + +.bottom button { + text-transform: lowercase; + cursor: pointer; + padding: 2px 6px 3px; } \ No newline at end of file diff --git a/src/components/post/comment-tools/mod-tools/mod-tools.tsx b/src/components/post/comment-tools/mod-tools/mod-tools.tsx index e9ace893..27eba2ae 100644 --- a/src/components/post/comment-tools/mod-tools/mod-tools.tsx +++ b/src/components/post/comment-tools/mod-tools/mod-tools.tsx @@ -72,6 +72,7 @@ const ModTools = ({ cid }: ModToolsProps) => {
+
select mod action
- +
+
+
diff --git a/src/themes.css b/src/themes.css index 6d0c9478..2dc9362e 100644 --- a/src/themes.css +++ b/src/themes.css @@ -7,6 +7,8 @@ --gray-overlay: #F7F7F7; --gray-border: #ddd; --gray-light: #CCCCCA; + --box-shadow-modal: 4px 4px 4px #ccc; + --box-shadow-input: inset 0px 1px 1px rgba(0,0,0,0.3),0px 1px 0px rgba(255,255,255,0.6); --filter80: brightness(100%); --filter90: brightness(100%); --background: white; @@ -40,7 +42,6 @@ --button-large-hover: url('/public/assets/buttons/button-large-hover.png'); --button-large-nub: url('/public/assets/buttons/button-large-nub.png'); --button-large-hover-nub: url('/public/assets/buttons/button-large-nub-hover.png'); - --box-shadow: inset 0px 1px 1px rgba(0,0,0,0.3),0px 1px 0px rgba(255,255,255,0.6); --account-dropdown-arrow: url("/public/assets/buttons/droparrowblue.gif"); } @@ -53,6 +54,8 @@ --gray-overlay: #1f1f1f; --gray-border: #3e3e3e; --gray-light: #3e3e3e9d; + --box-shadow-modal: 4px 4px 4px #000; + --box-shadow-input: none; --filter80: brightness(80%); --filter90: brightness(90%); --background: #0f0f0f; @@ -86,6 +89,5 @@ --button-large-hover: url('/public/assets/buttons/button-large-hover-dark.png'); --button-large-nub: url('/public/assets/buttons/button-large-nub-dark.png'); --button-large-hover-nub: url('/public/assets/buttons/button-large-nub-hover-dark.png'); - --box-shadow: none; --account-dropdown-arrow: url("/public/assets/buttons/droparrowgray.gif"); } \ No newline at end of file diff --git a/src/views/settings/account-settings/account-settings.module.css b/src/views/settings/account-settings/account-settings.module.css index a631ffad..de92b257 100644 --- a/src/views/settings/account-settings/account-settings.module.css +++ b/src/views/settings/account-settings/account-settings.module.css @@ -1,5 +1,5 @@ .accountData textarea { - box-shadow: var(--box-shadow); + box-shadow: var(--box-shadow-input); } .accountButtons { diff --git a/src/views/settings/profile-settings/profile-settings.module.css b/src/views/settings/profile-settings/profile-settings.module.css index 1e1940e3..7048584c 100644 --- a/src/views/settings/profile-settings/profile-settings.module.css +++ b/src/views/settings/profile-settings/profile-settings.module.css @@ -13,7 +13,7 @@ .usernameInput input { width: 200px; padding: 2px; - box-shadow: var(--box-shadow); + box-shadow: var(--box-shadow-input); } .saved { From 875ddc5fbe213a78c7ea25b41da4258ff845ddb4 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 20 Dec 2023 17:15:42 +0100 Subject: [PATCH 12/12] chore: rename translations --- public/translations/ar/default.json | 4 ++-- public/translations/bn/default.json | 4 ++-- public/translations/cs/default.json | 4 ++-- public/translations/da/default.json | 4 ++-- public/translations/de/default.json | 4 ++-- public/translations/el/default.json | 4 ++-- public/translations/en/default.json | 4 ++-- public/translations/es/default.json | 4 ++-- public/translations/fa/default.json | 4 ++-- public/translations/fi/default.json | 4 ++-- public/translations/fil/default.json | 4 ++-- public/translations/fr/default.json | 4 ++-- public/translations/he/default.json | 4 ++-- public/translations/hi/default.json | 4 ++-- public/translations/hu/default.json | 4 ++-- public/translations/id/default.json | 4 ++-- public/translations/it/default.json | 4 ++-- public/translations/ja/default.json | 4 ++-- public/translations/ko/default.json | 4 ++-- public/translations/mr/default.json | 4 ++-- public/translations/nl/default.json | 4 ++-- public/translations/no/default.json | 4 ++-- public/translations/pl/default.json | 4 ++-- public/translations/pt/default.json | 4 ++-- public/translations/ro/default.json | 4 ++-- public/translations/ru/default.json | 4 ++-- public/translations/sq/default.json | 4 ++-- public/translations/sv/default.json | 4 ++-- public/translations/te/default.json | 4 ++-- public/translations/th/default.json | 4 ++-- public/translations/tr/default.json | 4 ++-- public/translations/uk/default.json | 4 ++-- public/translations/ur/default.json | 4 ++-- public/translations/vi/default.json | 4 ++-- public/translations/zh/default.json | 4 ++-- src/components/post/comment-tools/comment-tools.tsx | 6 +++--- src/components/reply-form/reply-form.tsx | 2 +- 37 files changed, 74 insertions(+), 74 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 0bff30cb..b4558e62 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -22,8 +22,8 @@ "post_comment": "تعليق", "post_comments": "تعليقات", "post_share": "مشاركة", - "post_save": "حفظ", - "post_unsave": "إلغاء الحفظ", + "save": "حفظ", + "unsave": "إلغاء الحفظ", "post_hide": "إخفاء", "post_report": "الإبلاغ", "post_crosspost": "نشر متقاطع", diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 16690189..2163a7c5 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -22,8 +22,8 @@ "post_comment": "মন্তব্য", "post_comments": "মন্তব্যগুলি", "post_share": "শেয়ার", - "post_save": "সংরক্ষণ", - "post_unsave": "অসংরক্ষণ", + "save": "সংরক্ষণ", + "unsave": "অসংরক্ষণ", "post_hide": "লুকান", "post_report": "রিপোর্ট", "post_crosspost": "ক্রসপোস্ট", diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index eab54a8e..e73526be 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -22,8 +22,8 @@ "post_comment": "Komentář", "post_comments": "Komentáře", "post_share": "Sdílet", - "post_save": "Uložit", - "post_unsave": "Zrušit uložení", + "save": "Uložit", + "unsave": "Zrušit uložení", "post_hide": "Skrýt", "post_report": "Nahlásit", "post_crosspost": "Crosspost", diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 6bd4ebb3..30c2b1be 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -22,8 +22,8 @@ "post_comment": "Kommentar", "post_comments": "Kommentarer", "post_share": "Del", - "post_save": "Gem", - "post_unsave": "Fjern gem", + "save": "Gem", + "unsave": "Fjern gem", "post_hide": "Skjul", "post_report": "Rapporter", "post_crosspost": "Krydspost", diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 07c54144..46e33d09 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -22,8 +22,8 @@ "post_comment": "Kommentar", "post_comments": "Kommentare", "post_share": "Weitersagen", - "post_save": "Speichern", - "post_unsave": "Nicht speichern", + "save": "Speichern", + "unsave": "Nicht speichern", "post_hide": "Ausblenden", "post_report": "melden", "post_crosspost": "crosspost", diff --git a/public/translations/el/default.json b/public/translations/el/default.json index b2d831d4..9bccc687 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -22,8 +22,8 @@ "post_comment": "Σχόλιο", "post_comments": "Σχόλια", "post_share": "Μοιραστείτε", - "post_save": "Αποθήκευση", - "post_unsave": "Αφαίρεση αποθήκευσης", + "save": "Αποθήκευση", + "unsave": "Αφαίρεση αποθήκευσης", "post_hide": "Απόκρυψη", "post_report": "Αναφορά", "post_crosspost": "Διασταυρούμενη δημοσίευση", diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 201ebf67..1bbc9a88 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -22,8 +22,8 @@ "post_comment": "comment", "post_comments": "comments", "post_share": "share", - "post_save": "save", - "post_unsave": "unsave", + "save": "save", + "unsave": "unsave", "post_hide": "hide", "post_report": "report", "post_crosspost": "crosspost", diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 7f3dda31..240871c1 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -22,8 +22,8 @@ "post_comment": "comentario", "post_comments": "comentarios", "post_share": "compartir", - "post_save": "guardar", - "post_unsave": "desguardar", + "save": "guardar", + "unsave": "desguardar", "post_hide": "ocultar", "post_report": "reportar", "post_crosspost": "crosspost", diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index eeb92ce9..31277b5b 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -22,8 +22,8 @@ "post_comment": "نظر", "post_comments": "نظرات", "post_share": "اشتراک گذاری", - "post_save": "ذخیره", - "post_unsave": "حذف از ذخیره", + "save": "ذخیره", + "unsave": "حذف از ذخیره", "post_hide": "پنهان کردن", "post_report": "گزارش", "post_crosspost": "پست مشترک", diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 94016364..d18f74dd 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -22,8 +22,8 @@ "post_comment": "Kommentti", "post_comments": "Kommentit", "post_share": "Jaa", - "post_save": "Tallenna", - "post_unsave": "Poista tallennus", + "save": "Tallenna", + "unsave": "Poista tallennus", "post_hide": "Piilota", "post_report": "Ilmoita", "post_crosspost": "Ristipostitus", diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 9aae84b7..637e8116 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -22,8 +22,8 @@ "post_comment": "Komento", "post_comments": "Mga Komento", "post_share": "Ibahagi", - "post_save": "I-save", - "post_unsave": "Huwag I-save", + "save": "I-save", + "unsave": "Huwag I-save", "post_hide": "Itago", "post_report": "I-ulat", "post_crosspost": "Crosspost", diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 6ad93947..08138935 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -22,8 +22,8 @@ "post_comment": "commentaire", "post_comments": "commentaires", "post_share": "partager", - "post_save": "enregistrer", - "post_unsave": "libérer", + "save": "enregistrer", + "unsave": "libérer", "post_hide": "masquer", "post_report": "signaler", "post_crosspost": "crosspost", diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 59031eec..fdc87f55 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -22,8 +22,8 @@ "post_comment": "תגובה", "post_comments": "תגובות", "post_share": "שתף", - "post_save": "שמור", - "post_unsave": "בטל שמירה", + "save": "שמור", + "unsave": "בטל שמירה", "post_hide": "הסתר", "post_report": "דווח", "post_crosspost": "פוסט משולב", diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 19644943..414619c4 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -22,8 +22,8 @@ "post_comment": "टिप्पणी", "post_comments": "टिप्पणियां", "post_share": "शेयर करें", - "post_save": "सहेजें", - "post_unsave": "असहेजें", + "save": "सहेजें", + "unsave": "असहेजें", "post_hide": "छिपाएं", "post_report": "रिपोर्ट करें", "post_crosspost": "क्रॉसपोस्ट", diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index c7d9256a..8bf8123f 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -22,8 +22,8 @@ "post_comment": "Hozzászólás", "post_comments": "Hozzászólások", "post_share": "Megosztás", - "post_save": "Mentés", - "post_unsave": "Mentés visszavonása", + "save": "Mentés", + "unsave": "Mentés visszavonása", "post_hide": "Elrejtés", "post_report": "Jelentés", "post_crosspost": "Keresztposzt", diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 3cc7596f..1b74b75b 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -22,8 +22,8 @@ "post_comment": "Komentar", "post_comments": "Komentar", "post_share": "Bagikan", - "post_save": "Simpan", - "post_unsave": "Tidak Disimpan", + "save": "Simpan", + "unsave": "Tidak Disimpan", "post_hide": "Sembunyikan", "post_report": "Laporkan", "post_crosspost": "Crosspost", diff --git a/public/translations/it/default.json b/public/translations/it/default.json index a306ad1d..bb30c646 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -22,8 +22,8 @@ "post_comment": "commento", "post_comments": "commenti", "post_share": "condividi", - "post_save": "salva", - "post_unsave": "elimina", + "save": "salva", + "unsave": "elimina", "post_hide": "nascondi", "post_report": "segnala", "post_crosspost": "crosspost", diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index d9d76a0a..0e90c064 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -22,8 +22,8 @@ "post_comment": "コメント", "post_comments": "コメント数", "post_share": "シェア", - "post_save": "保存", - "post_unsave": "保存解除", + "save": "保存", + "unsave": "保存解除", "post_hide": "非表示", "post_report": "報告", "post_crosspost": "クロスポスト", diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index b7aa3e8d..cefa732e 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -22,8 +22,8 @@ "post_comment": "댓글", "post_comments": "댓글들", "post_share": "공유", - "post_save": "저장", - "post_unsave": "저장 취소", + "save": "저장", + "unsave": "저장 취소", "post_hide": "숨기기", "post_report": "신고", "post_crosspost": "크로스포스트", diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 43b46622..7d659cc1 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -22,8 +22,8 @@ "post_comment": "टिप्पणी", "post_comments": "टिप्पण्या", "post_share": "सामायिक करा", - "post_save": "जतन करा", - "post_unsave": "जतन काढा", + "save": "जतन करा", + "unsave": "जतन काढा", "post_hide": "लपवा", "post_report": "अहवाल", "post_crosspost": "क्रॉसपोस्ट", diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 18e2c688..63572ae9 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -22,8 +22,8 @@ "post_comment": "Reactie", "post_comments": "Reacties", "post_share": "Delen", - "post_save": "Opslaan", - "post_unsave": "Niet opslaan", + "save": "Opslaan", + "unsave": "Niet opslaan", "post_hide": "Verbergen", "post_report": "Rapporteren", "post_crosspost": "Crosspost", diff --git a/public/translations/no/default.json b/public/translations/no/default.json index a3c4f7cf..50af3047 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -22,8 +22,8 @@ "post_comment": "Kommentar", "post_comments": "Kommentarer", "post_share": "Del", - "post_save": "Lagre", - "post_unsave": "Fjern lagring", + "save": "Lagre", + "unsave": "Fjern lagring", "post_hide": "Skjul", "post_report": "Rapporter", "post_crosspost": "Krysspost", diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 7254db69..c613b113 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -22,8 +22,8 @@ "post_comment": "Komentarz", "post_comments": "Komentarze", "post_share": "Udostępnij", - "post_save": "Zapisz", - "post_unsave": "Usuń zapis", + "save": "Zapisz", + "unsave": "Usuń zapis", "post_hide": "Ukryj", "post_report": "Zgłoś", "post_crosspost": "Crosspost", diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index c90be072..aad15737 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -22,8 +22,8 @@ "post_comment": "comentário", "post_comments": "comentários", "post_share": "compartilhar", - "post_save": "salvar", - "post_unsave": "desfazer", + "save": "salvar", + "unsave": "desfazer", "post_hide": "ocultar", "post_report": "denunciar", "post_crosspost": "crosspost", diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 60624412..27b1fbd5 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -22,8 +22,8 @@ "post_comment": "Comentariu", "post_comments": "Comentarii", "post_share": "Distribuie", - "post_save": "Salvează", - "post_unsave": "Anulează salvare", + "save": "Salvează", + "unsave": "Anulează salvare", "post_hide": "Ascunde", "post_report": "Raportează", "post_crosspost": "Crosspost", diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 7ea5b46b..78344a4d 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -22,8 +22,8 @@ "post_comment": "Комментарий", "post_comments": "Комментарии", "post_share": "Поделиться", - "post_save": "Сохранить", - "post_unsave": "Убрать", + "save": "Сохранить", + "unsave": "Убрать", "post_hide": "Скрыть", "post_report": "Пожаловаться", "post_crosspost": "Кросспост", diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 21785ad2..6758ece6 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -22,8 +22,8 @@ "post_comment": "Koment", "post_comments": "Komentet", "post_share": "Shpërndaje", - "post_save": "Ruaj", - "post_unsave": "Hiq", + "save": "Ruaj", + "unsave": "Hiq", "post_hide": "Fshih", "post_report": "Raporto", "post_crosspost": "Crosspost", diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index b9fe7ce3..d1759f6f 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -22,8 +22,8 @@ "post_comment": "Kommentar", "post_comments": "Kommentarer", "post_share": "Dela", - "post_save": "Spara", - "post_unsave": "Ta bort", + "save": "Spara", + "unsave": "Ta bort", "post_hide": "Dölj", "post_report": "Rapportera", "post_crosspost": "Korsposta", diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 99788b73..5707b51e 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -22,8 +22,8 @@ "post_comment": "కామెంట్", "post_comments": "కామెంట్లు", "post_share": "షేర్", - "post_save": "సేవ్", - "post_unsave": "ఉన్‌సేవ్", + "save": "సేవ్", + "unsave": "ఉన్‌సేవ్", "post_hide": "దాచు", "post_report": "నివేదించు", "post_crosspost": "క్రాస్‌పోస్ట్", diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 42a5813a..3d28355b 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -22,8 +22,8 @@ "post_comment": "ความคิดเห็น", "post_comments": "ความคิดเห็น", "post_share": "แชร์", - "post_save": "บันทึก", - "post_unsave": "ยกเลิกการบันทึก", + "save": "บันทึก", + "unsave": "ยกเลิกการบันทึก", "post_hide": "ซ่อน", "post_report": "รายงาน", "post_crosspost": "โพสต์ร่วม", diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index c012a214..e61935a3 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -22,8 +22,8 @@ "post_comment": "Yorum", "post_comments": "Yorumlar", "post_share": "Paylaş", - "post_save": "Kaydet", - "post_unsave": "Kaydı Kaldır", + "save": "Kaydet", + "unsave": "Kaydı Kaldır", "post_hide": "Gizle", "post_report": "Rapor Et", "post_crosspost": "Çapraz Gönderi", diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 37315fcb..12814780 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -22,8 +22,8 @@ "post_comment": "Коментар", "post_comments": "Коментарі", "post_share": "Поділитися", - "post_save": "Зберегти", - "post_unsave": "Видалити", + "save": "Зберегти", + "unsave": "Видалити", "post_hide": "Приховати", "post_report": "Поскаржитися", "post_crosspost": "Кроспост", diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index e1f8e62e..6c83867d 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -22,8 +22,8 @@ "post_comment": "کومنٹ", "post_comments": "کومنٹس", "post_share": "شیئر کریں", - "post_save": "محفوظ کریں", - "post_unsave": "محفوظ نہیں کریں", + "save": "محفوظ کریں", + "unsave": "محفوظ نہیں کریں", "post_hide": "چھپائیں", "post_report": "رپورٹ کریں", "post_crosspost": "کراس پوسٹ", diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index bb8f1f6a..462276bd 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -22,8 +22,8 @@ "post_comment": "Bình luận", "post_comments": "Bình luận", "post_share": "Chia sẻ", - "post_save": "Lưu", - "post_unsave": "Bỏ lưu", + "save": "Lưu", + "unsave": "Bỏ lưu", "post_hide": "Ẩn", "post_report": "Báo cáo", "post_crosspost": "Đăng chéo", diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 133d3ffc..97000cbe 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -22,8 +22,8 @@ "post_comment": "评论", "post_comments": "评论", "post_share": "分享", - "post_save": "保存", - "post_unsave": "取消保存", + "save": "保存", + "unsave": "取消保存", "post_hide": "隐藏", "post_report": "举报", "post_crosspost": "跨贴", diff --git a/src/components/post/comment-tools/comment-tools.tsx b/src/components/post/comment-tools/comment-tools.tsx index a6fb7edd..08a8bbf7 100644 --- a/src/components/post/comment-tools/comment-tools.tsx +++ b/src/components/post/comment-tools/comment-tools.tsx @@ -50,7 +50,7 @@ const PostTools = ({ author, cid, hasLabel, subplebbitAddress, replyCount = 0 }:
  • - {t('post_save')} + {t('save')}
  • @@ -74,7 +74,7 @@ const ReplyTools = ({ cid, hasLabel, showReplyForm, subplebbitAddress }: Comment {t('reply_embed')}
  • - {t('post_save')} + {t('save')}
  • {t('post_report')} @@ -96,7 +96,7 @@ const SingleReplyTools = ({ cid, hasLabel, parentCid, subplebbitAddress }: Comme {t('reply_permalink')}
  • - {t('post_save')} + {t('save')}
  • context diff --git a/src/components/reply-form/reply-form.tsx b/src/components/reply-form/reply-form.tsx index 030f561f..7777e4a2 100644 --- a/src/components/reply-form/reply-form.tsx +++ b/src/components/reply-form/reply-form.tsx @@ -84,7 +84,7 @@ const ReplyForm = ({ cid, isReplyingToReply, hideReplyForm }: ReplyFormProps) =>
  • {isReplyingToReply && (