Merge branch 'black-mode' into 'main'
Minor style improvements See merge request soapbox-pub/soapbox!2962
This commit is contained in:
commit
5ea2e2442c
|
@ -286,9 +286,10 @@ const Account = ({
|
||||||
</Text>
|
</Text>
|
||||||
) : withAccountNote && (
|
) : withAccountNote && (
|
||||||
<Text
|
<Text
|
||||||
|
truncate
|
||||||
size='sm'
|
size='sm'
|
||||||
dangerouslySetInnerHTML={{ __html: account.note_emojified }}
|
dangerouslySetInnerHTML={{ __html: account.note_emojified }}
|
||||||
className='mr-2 rtl:ml-2 rtl:mr-0'
|
className='mr-2 rtl:ml-2 rtl:mr-0 [&_br]:hidden [&_p:first-child]:inline [&_p:first-child]:truncate [&_p]:hidden'
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
|
@ -71,6 +71,8 @@ interface IScrollableList extends VirtuosoProps<any, any> {
|
||||||
onRefresh?: () => Promise<any>;
|
onRefresh?: () => Promise<any>;
|
||||||
/** Extra class names on the Virtuoso element. */
|
/** Extra class names on the Virtuoso element. */
|
||||||
className?: string;
|
className?: string;
|
||||||
|
/** Extra class names on the list element. */
|
||||||
|
listClassName?: string;
|
||||||
/** Class names on each item container. */
|
/** Class names on each item container. */
|
||||||
itemClassName?: string;
|
itemClassName?: string;
|
||||||
/** `id` attribute on the Virtuoso element. */
|
/** `id` attribute on the Virtuoso element. */
|
||||||
|
@ -96,6 +98,7 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
|
||||||
onScrollToTop,
|
onScrollToTop,
|
||||||
onLoadMore,
|
onLoadMore,
|
||||||
className,
|
className,
|
||||||
|
listClassName,
|
||||||
itemClassName,
|
itemClassName,
|
||||||
id,
|
id,
|
||||||
hasMore,
|
hasMore,
|
||||||
|
@ -233,9 +236,10 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
|
||||||
itemContent={renderItem}
|
itemContent={renderItem}
|
||||||
initialTopMostItemIndex={initialIndex}
|
initialTopMostItemIndex={initialIndex}
|
||||||
rangeChanged={handleRangeChange}
|
rangeChanged={handleRangeChange}
|
||||||
|
className={className}
|
||||||
style={style}
|
style={style}
|
||||||
context={{
|
context={{
|
||||||
listClassName: className,
|
listClassName,
|
||||||
itemClassName,
|
itemClassName,
|
||||||
}}
|
}}
|
||||||
components={{
|
components={{
|
||||||
|
|
|
@ -232,7 +232,7 @@ const StatusList: React.FC<IStatusList> = ({
|
||||||
placeholderComponent={() => <PlaceholderStatus variant={divideType === 'border' ? 'slim' : 'rounded'} />}
|
placeholderComponent={() => <PlaceholderStatus variant={divideType === 'border' ? 'slim' : 'rounded'} />}
|
||||||
placeholderCount={20}
|
placeholderCount={20}
|
||||||
ref={node}
|
ref={node}
|
||||||
className={clsx('divide-y divide-solid divide-gray-200 dark:divide-gray-800', {
|
listClassName={clsx('divide-y divide-solid divide-gray-200 dark:divide-gray-800', {
|
||||||
'divide-none': divideType !== 'border',
|
'divide-none': divideType !== 'border',
|
||||||
}, className)}
|
}, className)}
|
||||||
itemClassName={clsx({
|
itemClassName={clsx({
|
||||||
|
|
|
@ -81,7 +81,7 @@ const Accordion: React.FC<IAccordion> = ({ headline, children, menu, expanded =
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
clsx({
|
clsx({
|
||||||
'p-4 rounded-b-lg border-t border-solid border-gray-100 dark:border-primary-900': true,
|
'p-4 rounded-b-lg border-t border-solid border-gray-100 dark:border-primary-900 black:border-black': true,
|
||||||
'h-0 hidden': !expanded,
|
'h-0 hidden': !expanded,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ const Checkbox = React.forwardRef<HTMLInputElement, ICheckbox>((props, ref) => {
|
||||||
{...props}
|
{...props}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
type='checkbox'
|
type='checkbox'
|
||||||
className='h-4 w-4 rounded border-2 border-gray-300 text-primary-600 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900'
|
className='h-4 w-4 rounded border-2 border-gray-300 text-primary-600 focus:ring-primary-500 black:bg-black dark:border-gray-800 dark:bg-gray-900'
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -56,7 +56,7 @@ const ModerationLog = () => {
|
||||||
emptyMessage={intl.formatMessage(messages.emptyMessage)}
|
emptyMessage={intl.formatMessage(messages.emptyMessage)}
|
||||||
hasMore={hasMore}
|
hasMore={hasMore}
|
||||||
onLoadMore={handleLoadMore}
|
onLoadMore={handleLoadMore}
|
||||||
className='divide-y divide-solid divide-gray-200 dark:divide-gray-800'
|
listClassName='divide-y divide-solid divide-gray-200 dark:divide-gray-800'
|
||||||
>
|
>
|
||||||
{items.map(item => item && (
|
{items.map(item => item && (
|
||||||
<LogItem key={item.id} log={item} />
|
<LogItem key={item.id} log={item} />
|
||||||
|
|
|
@ -33,7 +33,7 @@ const AwaitingApproval: React.FC = () => {
|
||||||
showLoading={showLoading}
|
showLoading={showLoading}
|
||||||
scrollKey='awaiting-approval'
|
scrollKey='awaiting-approval'
|
||||||
emptyMessage={intl.formatMessage(messages.emptyMessage)}
|
emptyMessage={intl.formatMessage(messages.emptyMessage)}
|
||||||
className='divide-y divide-solid divide-gray-200 dark:divide-gray-800'
|
listClassName='divide-y divide-solid divide-gray-200 dark:divide-gray-800'
|
||||||
>
|
>
|
||||||
{accountIds.map(id => (
|
{accountIds.map(id => (
|
||||||
<div key={id} className='px-5 py-4'>
|
<div key={id} className='px-5 py-4'>
|
||||||
|
|
|
@ -35,7 +35,7 @@ const Reports: React.FC = () => {
|
||||||
showLoading={showLoading}
|
showLoading={showLoading}
|
||||||
scrollKey='admin-reports'
|
scrollKey='admin-reports'
|
||||||
emptyMessage={intl.formatMessage(messages.emptyMessage)}
|
emptyMessage={intl.formatMessage(messages.emptyMessage)}
|
||||||
className='divide-y divide-solid divide-gray-200 dark:divide-gray-800'
|
listClassName='divide-y divide-solid divide-gray-200 dark:divide-gray-800'
|
||||||
>
|
>
|
||||||
{reports.map(report => report && <Report id={report} key={report} />)}
|
{reports.map(report => report && <Report id={report} key={report} />)}
|
||||||
</ScrollableList>
|
</ScrollableList>
|
||||||
|
|
|
@ -16,7 +16,7 @@ const ConsumersList: React.FC<IConsumersList> = () => {
|
||||||
|
|
||||||
if (providers.length > 0) {
|
if (providers.length > 0) {
|
||||||
return (
|
return (
|
||||||
<Card className='bg-gray-50 p-4 sm:rounded-xl dark:bg-primary-800'>
|
<Card className='bg-gray-50 p-4 black:bg-black sm:rounded-xl dark:bg-primary-800'>
|
||||||
<Text size='xs' theme='muted'>
|
<Text size='xs' theme='muted'>
|
||||||
<FormattedMessage id='oauth_consumers.title' defaultMessage='Other ways to sign in' />
|
<FormattedMessage id='oauth_consumers.title' defaultMessage='Other ways to sign in' />
|
||||||
</Text>
|
</Text>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import clsx from 'clsx';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
@ -57,7 +56,7 @@ const AccountCard: React.FC<IAccountCard> = ({ id }) => {
|
||||||
<Text
|
<Text
|
||||||
truncate
|
truncate
|
||||||
align='left'
|
align='left'
|
||||||
className={clsx('[&_br]:hidden [&_p:first-child]:inline [&_p:first-child]:truncate [&_p]:hidden')}
|
className='[&_br]:hidden [&_p:first-child]:inline [&_p:first-child]:truncate [&_p]:hidden'
|
||||||
dangerouslySetInnerHTML={{ __html: account.note_emojified || ' ' }}
|
dangerouslySetInnerHTML={{ __html: account.note_emojified || ' ' }}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
|
@ -45,7 +45,7 @@ const DomainBlocks: React.FC = () => {
|
||||||
onLoadMore={() => handleLoadMore(dispatch)}
|
onLoadMore={() => handleLoadMore(dispatch)}
|
||||||
hasMore={hasMore}
|
hasMore={hasMore}
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
className='divide-y divide-gray-200 dark:divide-gray-800'
|
listClassName='divide-y divide-gray-200 dark:divide-gray-800'
|
||||||
>
|
>
|
||||||
{domains.map((domain) =>
|
{domains.map((domain) =>
|
||||||
<Domain key={domain} domain={domain} />,
|
<Domain key={domain} domain={domain} />,
|
||||||
|
|
|
@ -35,7 +35,7 @@ const GroupTopics: React.FC<IGroupTopics> = (props) => {
|
||||||
showLoading={!group || isLoading && tags.length === 0}
|
showLoading={!group || isLoading && tags.length === 0}
|
||||||
placeholderComponent={PlaceholderAccount}
|
placeholderComponent={PlaceholderAccount}
|
||||||
placeholderCount={3}
|
placeholderCount={3}
|
||||||
className='divide-y divide-solid divide-gray-300 dark:divide-gray-800'
|
listClassName='divide-y divide-solid divide-gray-300 dark:divide-gray-800'
|
||||||
itemClassName='py-3 last:pb-0'
|
itemClassName='py-3 last:pb-0'
|
||||||
emptyMessage={
|
emptyMessage={
|
||||||
<Stack space={4} className='pt-6' justifyContent='center' alignItems='center'>
|
<Stack space={4} className='pt-6' justifyContent='center' alignItems='center'>
|
||||||
|
|
|
@ -164,7 +164,7 @@ const Notifications = () => {
|
||||||
onLoadMore={handleLoadOlder}
|
onLoadMore={handleLoadOlder}
|
||||||
onScrollToTop={handleScrollToTop}
|
onScrollToTop={handleScrollToTop}
|
||||||
onScroll={handleScroll}
|
onScroll={handleScroll}
|
||||||
className={clsx({
|
listClassName={clsx({
|
||||||
'divide-y divide-gray-200 black:divide-gray-800 dark:divide-primary-800 divide-solid': notifications.size > 0,
|
'divide-y divide-gray-200 black:divide-gray-800 dark:divide-primary-800 divide-solid': notifications.size > 0,
|
||||||
'space-y-2': notifications.size === 0,
|
'space-y-2': notifications.size === 0,
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -79,7 +79,7 @@ const IconPickerMenu: React.FC<IIconPickerMenu> = ({ icons, onClose, onPick, sty
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={clsx('absolute z-[101] -my-0.5')}
|
className='absolute z-[101] -my-0.5'
|
||||||
style={{ transform: 'translateX(calc(-1 * env(safe-area-inset-right)))', ...style }}
|
style={{ transform: 'translateX(calc(-1 * env(safe-area-inset-right)))', ...style }}
|
||||||
ref={setRef}
|
ref={setRef}
|
||||||
>
|
>
|
||||||
|
|
|
@ -31,7 +31,7 @@ const ThreadStatus: React.FC<IThreadStatus> = (props): JSX.Element => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={clsx('absolute left-5 z-[1] hidden w-0.5 bg-gray-200 rtl:left-auto rtl:right-5 dark:bg-primary-800', {
|
className={clsx('absolute left-5 z-[1] hidden w-0.5 bg-gray-200 black:bg-gray-800 rtl:left-auto rtl:right-5 dark:bg-primary-800', {
|
||||||
'!block top-[calc(12px+42px)] h-[calc(100%-42px-8px-1rem)]': isConnectedBottom,
|
'!block top-[calc(12px+42px)] h-[calc(100%-42px-8px-1rem)]': isConnectedBottom,
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -382,7 +382,7 @@ const Thread = (props: IThread) => {
|
||||||
|
|
||||||
{!isUnderReview ? (
|
{!isUnderReview ? (
|
||||||
<>
|
<>
|
||||||
<hr className='-mx-4 mb-2 max-w-[100vw] border-t-2 dark:border-gray-800' />
|
<hr className='-mx-4 mb-2 max-w-[100vw] border-t-2 black:border-t dark:border-gray-800' />
|
||||||
|
|
||||||
<StatusActionBar
|
<StatusActionBar
|
||||||
status={status}
|
status={status}
|
||||||
|
@ -396,7 +396,7 @@ const Thread = (props: IThread) => {
|
||||||
</HotKeys>
|
</HotKeys>
|
||||||
|
|
||||||
{hasDescendants && (
|
{hasDescendants && (
|
||||||
<hr className='-mx-4 mt-2 max-w-[100vw] border-t-2 dark:border-gray-800' />
|
<hr className='-mx-4 mt-2 max-w-[100vw] border-t-2 black:border-t dark:border-gray-800' />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -445,7 +445,7 @@ const Thread = (props: IThread) => {
|
||||||
initialTopMostItemIndex={initialTopMostItemIndex}
|
initialTopMostItemIndex={initialTopMostItemIndex}
|
||||||
useWindowScroll={useWindowScroll}
|
useWindowScroll={useWindowScroll}
|
||||||
itemClassName={itemClassName}
|
itemClassName={itemClassName}
|
||||||
className={
|
listClassName={
|
||||||
clsx({
|
clsx({
|
||||||
'h-full': !useWindowScroll,
|
'h-full': !useWindowScroll,
|
||||||
})
|
})
|
||||||
|
|
|
@ -28,7 +28,7 @@ const BirthdaysModal = ({ onClose }: IBirthdaysModal) => {
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='birthdays'
|
scrollKey='birthdays'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
className='max-w-full'
|
listClassName='max-w-full'
|
||||||
itemClassName='pb-3'
|
itemClassName='pb-3'
|
||||||
>
|
>
|
||||||
{accountIds.map(id =>
|
{accountIds.map(id =>
|
||||||
|
|
|
@ -40,7 +40,7 @@ const DislikesModal: React.FC<IDislikesModal> = ({ onClose, statusId }) => {
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='dislikes'
|
scrollKey='dislikes'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
className='max-w-full'
|
listClassName='max-w-full'
|
||||||
itemClassName='pb-3'
|
itemClassName='pb-3'
|
||||||
>
|
>
|
||||||
{accountIds.map(id =>
|
{accountIds.map(id =>
|
||||||
|
|
|
@ -40,7 +40,7 @@ const EventParticipantsModal: React.FC<IEventParticipantsModal> = ({ onClose, st
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='event_participations'
|
scrollKey='event_participations'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
className='max-w-full'
|
listClassName='max-w-full'
|
||||||
itemClassName='pb-3'
|
itemClassName='pb-3'
|
||||||
>
|
>
|
||||||
{accountIds.map(id =>
|
{accountIds.map(id =>
|
||||||
|
|
|
@ -47,7 +47,7 @@ const FavouritesModal: React.FC<IFavouritesModal> = ({ onClose, statusId }) => {
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='favourites'
|
scrollKey='favourites'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
className='max-w-full'
|
listClassName='max-w-full'
|
||||||
itemClassName='pb-3'
|
itemClassName='pb-3'
|
||||||
style={{ height: '80vh' }}
|
style={{ height: '80vh' }}
|
||||||
useWindowScroll={false}
|
useWindowScroll={false}
|
||||||
|
|
|
@ -41,7 +41,7 @@ const MentionsModal: React.FC<IMentionsModal> = ({ onClose, statusId }) => {
|
||||||
body = (
|
body = (
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='mentions'
|
scrollKey='mentions'
|
||||||
className='max-w-full'
|
listClassName='max-w-full'
|
||||||
itemClassName='pb-3'
|
itemClassName='pb-3'
|
||||||
>
|
>
|
||||||
{accountIds.map(id =>
|
{accountIds.map(id =>
|
||||||
|
|
|
@ -98,9 +98,10 @@ const ReactionsModal: React.FC<IReactionsModal> = ({ onClose, statusId, reaction
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='reactions'
|
scrollKey='reactions'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
className={clsx('max-w-full', {
|
className={clsx({
|
||||||
'mt-4': reactions.size > 0,
|
'mt-4': reactions.size > 0,
|
||||||
})}
|
})}
|
||||||
|
listClassName='max-w-full'
|
||||||
itemClassName='pb-3'
|
itemClassName='pb-3'
|
||||||
>
|
>
|
||||||
{accounts.map((account) =>
|
{accounts.map((account) =>
|
||||||
|
|
|
@ -48,7 +48,7 @@ const ReblogsModal: React.FC<IReblogsModal> = ({ onClose, statusId }) => {
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='reblogs'
|
scrollKey='reblogs'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
className='max-w-full'
|
listClassName='max-w-full'
|
||||||
itemClassName='pb-3'
|
itemClassName='pb-3'
|
||||||
style={{ height: '80vh' }}
|
style={{ height: '80vh' }}
|
||||||
useWindowScroll={false}
|
useWindowScroll={false}
|
||||||
|
|
Loading…
Reference in New Issue