Upgrade Tabler to v1.73.0, use new import paths, remove Webpack hack
This commit is contained in:
@@ -270,14 +270,14 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
} else if (this.props.privacy === 'direct') {
|
||||
publishText = (
|
||||
<>
|
||||
<Icon src={require('@tabler/icons/icons/mail.svg')} />
|
||||
<Icon src={require('@tabler/icons/mail.svg')} />
|
||||
{intl.formatMessage(messages.message)}
|
||||
</>
|
||||
);
|
||||
} else if (this.props.privacy === 'private') {
|
||||
publishText = (
|
||||
<>
|
||||
<Icon src={require('@tabler/icons/icons/lock.svg')} />
|
||||
<Icon src={require('@tabler/icons/lock.svg')} />
|
||||
{intl.formatMessage(messages.publish)}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -365,7 +365,7 @@ class EmojiPickerDropdown extends React.PureComponent {
|
||||
'pulse-loading': active && loading,
|
||||
})}
|
||||
alt='😀'
|
||||
src={require('@tabler/icons/icons/mood-happy.svg')}
|
||||
src={require('@tabler/icons/mood-happy.svg')}
|
||||
title={title}
|
||||
aria-label={title}
|
||||
aria-expanded={active}
|
||||
|
||||
@@ -18,7 +18,7 @@ const MarkdownButton: React.FC<IMarkdownButton> = ({ active, onClick }) => {
|
||||
|
||||
return (
|
||||
<ComposeFormButton
|
||||
icon={require('@tabler/icons/icons/markdown.svg')}
|
||||
icon={require('@tabler/icons/markdown.svg')}
|
||||
title={intl.formatMessage(active ? messages.marked : messages.unmarked)}
|
||||
active={active}
|
||||
onClick={onClick}
|
||||
|
||||
@@ -24,7 +24,7 @@ const PollButton: React.FC<IPollButton> = ({ active, unavailable, disabled, onCl
|
||||
|
||||
return (
|
||||
<ComposeFormButton
|
||||
icon={require('@tabler/icons/icons/chart-bar.svg')}
|
||||
icon={require('@tabler/icons/chart-bar.svg')}
|
||||
title={intl.formatMessage(active ? messages.remove_poll : messages.add_poll)}
|
||||
active={active}
|
||||
disabled={disabled}
|
||||
|
||||
@@ -161,10 +161,10 @@ const PrivacyDropdown: React.FC<IPrivacyDropdown> = ({
|
||||
const [placement, setPlacement] = useState('bottom');
|
||||
|
||||
const options = [
|
||||
{ icon: require('@tabler/icons/icons/world.svg'), value: 'public', text: intl.formatMessage(messages.public_short), meta: intl.formatMessage(messages.public_long) },
|
||||
{ icon: require('@tabler/icons/icons/lock-open.svg'), value: 'unlisted', text: intl.formatMessage(messages.unlisted_short), meta: intl.formatMessage(messages.unlisted_long) },
|
||||
{ icon: require('@tabler/icons/icons/lock.svg'), value: 'private', text: intl.formatMessage(messages.private_short), meta: intl.formatMessage(messages.private_long) },
|
||||
{ icon: require('@tabler/icons/icons/mail.svg'), value: 'direct', text: intl.formatMessage(messages.direct_short), meta: intl.formatMessage(messages.direct_long) },
|
||||
{ icon: require('@tabler/icons/world.svg'), value: 'public', text: intl.formatMessage(messages.public_short), meta: intl.formatMessage(messages.public_long) },
|
||||
{ icon: require('@tabler/icons/lock-open.svg'), value: 'unlisted', text: intl.formatMessage(messages.unlisted_short), meta: intl.formatMessage(messages.unlisted_long) },
|
||||
{ icon: require('@tabler/icons/lock.svg'), value: 'private', text: intl.formatMessage(messages.private_short), meta: intl.formatMessage(messages.private_long) },
|
||||
{ icon: require('@tabler/icons/mail.svg'), value: 'direct', text: intl.formatMessage(messages.direct_short), meta: intl.formatMessage(messages.direct_long) },
|
||||
];
|
||||
|
||||
const handleToggle: React.MouseEventHandler<HTMLButtonElement> = (e) => {
|
||||
|
||||
@@ -26,7 +26,7 @@ const ReplyIndicator: React.FC<IReplyIndicator> = ({ status, hideActions, onCanc
|
||||
if (!hideActions && onCancel) {
|
||||
actions = {
|
||||
onActionClick: handleClick,
|
||||
actionIcon: require('@tabler/icons/icons/x.svg'),
|
||||
actionIcon: require('@tabler/icons/x.svg'),
|
||||
actionAlignment: 'top',
|
||||
actionTitle: 'Dismiss',
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ const ScheduleButton: React.FC<IScheduleButton> = ({ active, unavailable, disabl
|
||||
|
||||
return (
|
||||
<ComposeFormButton
|
||||
icon={require('@tabler/icons/icons/calendar-stats.svg')}
|
||||
icon={require('@tabler/icons/calendar-stats.svg')}
|
||||
title={intl.formatMessage(active ? messages.remove_schedule : messages.add_schedule)}
|
||||
active={active}
|
||||
disabled={disabled}
|
||||
|
||||
@@ -72,7 +72,7 @@ const ScheduleForm: React.FC = () => {
|
||||
<IconButton
|
||||
iconClassName='w-4 h-4'
|
||||
className='bg-transparent text-gray-400 hover:text-gray-600'
|
||||
src={require('@tabler/icons/icons/x.svg')}
|
||||
src={require('@tabler/icons/x.svg')}
|
||||
onClick={handleRemove}
|
||||
title={intl.formatMessage(messages.remove)}
|
||||
/>
|
||||
|
||||
@@ -105,7 +105,7 @@ const Search = (props: ISearch) => {
|
||||
const makeMenu = () => [
|
||||
{
|
||||
text: intl.formatMessage(messages.action, { query: value }),
|
||||
icon: require('@tabler/icons/icons/search.svg'),
|
||||
icon: require('@tabler/icons/search.svg'),
|
||||
action: handleSubmit,
|
||||
},
|
||||
];
|
||||
@@ -140,12 +140,12 @@ const Search = (props: ISearch) => {
|
||||
onClick={handleClear}
|
||||
>
|
||||
<SvgIcon
|
||||
src={require('@tabler/icons/icons/search.svg')}
|
||||
src={require('@tabler/icons/search.svg')}
|
||||
className={classNames('h-4 w-4 text-gray-400', { hidden: hasValue })}
|
||||
/>
|
||||
|
||||
<SvgIcon
|
||||
src={require('@tabler/icons/icons/x.svg')}
|
||||
src={require('@tabler/icons/x.svg')}
|
||||
className={classNames('h-4 w-4 text-gray-400', { hidden: !hasValue })}
|
||||
aria-label={intl.formatMessage(messages.placeholder)}
|
||||
/>
|
||||
|
||||
@@ -18,7 +18,7 @@ const SpoilerButton: React.FC<ISpoilerButton> = ({ active, onClick }) => {
|
||||
|
||||
return (
|
||||
<ComposeFormButton
|
||||
icon={require('@tabler/icons/icons/alert-triangle.svg')}
|
||||
icon={require('@tabler/icons/alert-triangle.svg')}
|
||||
title={intl.formatMessage(active ? messages.marked : messages.unmarked)}
|
||||
active={active}
|
||||
onClick={onClick}
|
||||
|
||||
@@ -12,13 +12,13 @@ import Motion from '../../ui/util/optional_motion';
|
||||
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
const bookIcon = require('@tabler/icons/icons/book.svg');
|
||||
const fileAnalyticsIcon = require('@tabler/icons/icons/file-analytics.svg');
|
||||
const fileCodeIcon = require('@tabler/icons/icons/file-code.svg');
|
||||
const fileTextIcon = require('@tabler/icons/icons/file-text.svg');
|
||||
const fileZipIcon = require('@tabler/icons/icons/file-zip.svg');
|
||||
const defaultIcon = require('@tabler/icons/icons/paperclip.svg');
|
||||
const presentationIcon = require('@tabler/icons/icons/presentation.svg');
|
||||
const bookIcon = require('@tabler/icons/book.svg');
|
||||
const fileAnalyticsIcon = require('@tabler/icons/file-analytics.svg');
|
||||
const fileCodeIcon = require('@tabler/icons/file-code.svg');
|
||||
const fileTextIcon = require('@tabler/icons/file-text.svg');
|
||||
const fileZipIcon = require('@tabler/icons/file-zip.svg');
|
||||
const defaultIcon = require('@tabler/icons/paperclip.svg');
|
||||
const presentationIcon = require('@tabler/icons/presentation.svg');
|
||||
|
||||
export const MIMETYPE_ICONS: Record<string, string> = {
|
||||
'application/x-freearc': fileZipIcon,
|
||||
@@ -157,7 +157,7 @@ const Upload: React.FC<IUpload> = (props) => {
|
||||
<div className={classNames('compose-form__upload__actions', { active })}>
|
||||
<IconButton
|
||||
onClick={handleUndoClick}
|
||||
src={require('@tabler/icons/icons/x.svg')}
|
||||
src={require('@tabler/icons/x.svg')}
|
||||
text={<FormattedMessage id='upload_form.undo' defaultMessage='Delete' />}
|
||||
/>
|
||||
|
||||
@@ -165,7 +165,7 @@ const Upload: React.FC<IUpload> = (props) => {
|
||||
{(mediaType !== 'unknown' && Boolean(props.media.get('url'))) && (
|
||||
<IconButton
|
||||
onClick={handleOpenModal}
|
||||
src={require('@tabler/icons/icons/zoom-in.svg')}
|
||||
src={require('@tabler/icons/zoom-in.svg')}
|
||||
text={<FormattedMessage id='upload_form.preview' defaultMessage='Preview' />}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -48,8 +48,8 @@ const UploadButton: React.FC<IUploadButton> = ({
|
||||
}
|
||||
|
||||
const src = onlyImages(attachmentTypes)
|
||||
? require('@tabler/icons/icons/photo.svg')
|
||||
: require('@tabler/icons/icons/paperclip.svg');
|
||||
? require('@tabler/icons/photo.svg')
|
||||
: require('@tabler/icons/paperclip.svg');
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user