wip dark mode

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-03-29 15:40:02 +02:00
parent 7006af2803
commit dbeb292009
15 changed files with 25 additions and 21 deletions

View file

@ -257,7 +257,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
<Textarea <Textarea
ref={this.setTextarea} ref={this.setTextarea}
className={classNames('dark:bg-slate-800 px-0 border-0 text-gray-800 dark:text-white placeholder:text-color-400 resize-none w-full focus:shadow-none focus:border-0 focus:ring-0', { className={classNames('dark:bg-slate-800 px-0 border-0 text-gray-800 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 resize-none w-full focus:shadow-none focus:border-0 focus:ring-0', {
'min-h-[100px]': !condensed, 'min-h-[100px]': !condensed,
})} })}
id={id} id={id}

View file

@ -43,10 +43,10 @@ const ListItem = ({ label, hint, children, onClick }) => {
{...linkProps} {...linkProps}
> >
<div className='flex flex-col py-1.5 pr-4'> <div className='flex flex-col py-1.5 pr-4'>
<LabelComp htmlFor={domId}>{label}</LabelComp> <LabelComp className='text-black dark:text-white' htmlFor={domId}>{label}</LabelComp>
{hint ? ( {hint ? (
<span className='text-sm text-gray-500'>{hint}</span> <span className='text-sm text-gray-500 dark:text-gray-400'>{hint}</span>
) : null} ) : null}
</div> </div>

View file

@ -276,7 +276,7 @@ class ScrollableList extends PureComponent {
<div className={classNames('mt-2', className)} ref={this.setRef}> <div className={classNames('mt-2', className)} ref={this.setRef}>
{alwaysPrepend && prepend} {alwaysPrepend && prepend}
<div className='bg-primary-50 mt-2 rounded-lg text-center p-8'> <div className='bg-primary-50 dark:bg-slate-700 mt-2 rounded-lg text-center p-8'>
<Text>{emptyMessage}</Text> <Text>{emptyMessage}</Text>
</div> </div>
</div> </div>

View file

@ -381,7 +381,7 @@ class Status extends ImmutablePureComponent {
defaultMessage='{name} reposted' defaultMessage='{name} reposted'
values={{ values={{
name: <bdi className='max-w-[100px] truncate pr-1'> name: <bdi className='max-w-[100px] truncate pr-1'>
<strong className='text-gray-800' dangerouslySetInnerHTML={displayNameHtml} /> <strong className='text-gray-800 dark:text-gray-200' dangerouslySetInnerHTML={displayNameHtml} />
</bdi>, </bdi>,
}} }}
/> />

View file

@ -99,12 +99,16 @@ class ThumbNavigation extends React.PureComponent {
<NavLink to='/chats' className='thumb-navigation__link'> <NavLink to='/chats' className='thumb-navigation__link'>
<IconWithCounter <IconWithCounter
src={require('@tabler/icons/icons/messages.svg')} src={require('@tabler/icons/icons/messages.svg')}
className={classNames({ 'svg-icon--active': location.pathname === '/chats' })} className={classNames({
'h-5 w-5': true,
'text-gray-600': location.pathname !== '/chats',
'text-primary-600': location.pathname === '/chats',
})}
count={chatsCount} count={chatsCount}
/> />
<span> <Text tag='span' size='xs'>
<FormattedMessage id='navigation.chats' defaultMessage='Chats' /> <FormattedMessage id='navigation.chats' defaultMessage='Chats' />
</span> </Text>
</NavLink> </NavLink>
) : ( ) : (
<NavLink to='/messages' className='thumb-navigation__link'> <NavLink to='/messages' className='thumb-navigation__link'>

View file

@ -24,12 +24,12 @@ const FormGroup: React.FC<IFormGroup> = (props) => {
<div> <div>
<label <label
htmlFor={formFieldId} htmlFor={formFieldId}
className='block text-sm font-medium text-gray-700' className='block text-sm font-medium text-gray-700 dark:text-gray-400'
> >
{labelText} {labelText}
</label> </label>
<div className='mt-1'> <div className='mt-1 dark:text-white'>
{firstChild} {firstChild}
{inputChildren.filter((_, i) => i !== 0)} {inputChildren.filter((_, i) => i !== 0)}

View file

@ -46,11 +46,11 @@ const Modal: React.FC<IModal> = ({
}, [buttonRef]); }, [buttonRef]);
return ( return (
<div className='block w-full max-w-xl p-6 mx-auto overflow-hidden text-left align-middle transition-all transform bg-white shadow-xl rounded-2xl pointer-events-auto'> <div className='block w-full max-w-xl p-6 mx-auto overflow-hidden text-left align-middle transition-all transform bg-white dark:bg-slate-800 shadow-xl rounded-2xl pointer-events-auto'>
<div className='sm:flex sm:items-start w-full justify-between'> <div className='sm:flex sm:items-start w-full justify-between'>
<div className='w-full'> <div className='w-full'>
<div className='w-full flex flex-row justify-between items-center'> <div className='w-full flex flex-row justify-between items-center'>
<h3 className='text-lg leading-6 font-medium text-gray-900'> <h3 className='text-lg leading-6 font-medium text-gray-900 dark:text-white'>
{title} {title}
</h3> </h3>

View file

@ -12,9 +12,9 @@
[data-reach-tab] { [data-reach-tab] {
@apply flex-1 flex justify-center py-4 px-1 text-center font-medium text-sm @apply flex-1 flex justify-center py-4 px-1 text-center font-medium text-sm
text-gray-500 hover:text-gray-700; text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200;
} }
[data-reach-tab][data-selected] { [data-reach-tab][data-selected] {
@apply text-gray-900; @apply text-gray-900 dark:text-white;
} }

View file

@ -40,7 +40,7 @@ const AnimatedTabs: React.FC<IAnimatedInterface> = ({ children, ...rest }) => {
ref={ref} ref={ref}
> >
<div <div
className='w-full h-[3px] bg-primary-200 absolute' className='w-full h-[3px] bg-primary-200 dark:bg-slate-600 absolute'
style={{ top }} style={{ top }}
/> />
<div <div

View file

@ -40,7 +40,7 @@ class AudioToggle extends React.PureComponent {
render() { render() {
const { intl, checked, showLabel } = this.props; const { intl, checked, showLabel } = this.props;
const id ='chats-audio-toggle'; const id = 'chats-audio-toggle';
const label = intl.formatMessage(checked ? messages.switchOff : messages.switchOn); const label = intl.formatMessage(checked ? messages.switchOff : messages.switchOn);
return ( return (

View file

@ -43,7 +43,7 @@ export default class ReplyIndicator extends ImmutablePureComponent {
} }
return ( return (
<Stack space={2} className='p-4 rounded-lg bg-gray-100'> <Stack space={2} className='p-4 rounded-lg bg-gray-100 dark:bg-slate-700'>
<AccountContainer <AccountContainer
{...actions} {...actions}
id={status.getIn(['account', 'id'])} id={status.getIn(['account', 'id'])}

View file

@ -27,7 +27,7 @@ function FormattedMessageFixed(props) {
const buildLink = (account) => ( const buildLink = (account) => (
<bdi> <bdi>
<Permalink <Permalink
className='text-gray-800 font-bold hover:underline' className='text-gray-800 dark:text-gray-200 font-bold hover:underline'
href={`/@${account.get('acct')}`} href={`/@${account.get('acct')}`}
title={account.get('acct')} title={account.get('acct')}
to={`/@${account.get('acct')}`} to={`/@${account.get('acct')}`}

View file

@ -216,7 +216,7 @@ class Notifications extends React.PureComponent {
onScrollToTop={this.handleScrollToTop} onScrollToTop={this.handleScrollToTop}
onScroll={this.handleScroll} onScroll={this.handleScroll}
className={classNames({ className={classNames({
'divide-y divide-gray-200 divide-solid': notificationsToRender.size > 0, 'divide-y divide-gray-200 dark:divide-gray-600 divide-solid': notificationsToRender.size > 0,
'space-y-2': notificationsToRender.size === 0, 'space-y-2': notificationsToRender.size === 0,
})} })}
> >

View file

@ -63,7 +63,7 @@ class ConfirmationModal extends React.PureComponent {
secondaryText={secondary} secondaryText={secondary}
sectondaryAction={this.handleSecondary} sectondaryAction={this.handleSecondary}
> >
<p className='text-gray-600'>{message}</p> <p className='text-gray-600 dark:text-gray-300'>{message}</p>
<div className='mt-2'> <div className='mt-2'>
{checkbox && <div className='confirmation-modal__checkbox'> {checkbox && <div className='confirmation-modal__checkbox'>

View file

@ -10,7 +10,7 @@
.status__display-name, .status__display-name,
.account__display-name { .account__display-name {
strong { strong {
color: var(--primary-text-color); @apply text-gray-800 dark:text-gray-200;
} }
} }