Organize fonts,images,icon,sounds into 'assets' folder
This commit is contained in:
@ -97,7 +97,7 @@ const SidebarNavigation = () => {
|
||||
if (features.publicTimeline && features.federating) {
|
||||
menu.push({
|
||||
to: '/timeline/fediverse',
|
||||
icon: require('icons/fediverse.svg'),
|
||||
icon: require('assets/icons/fediverse.svg'),
|
||||
text: intl.formatMessage(messages.fediverse),
|
||||
});
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
||||
{features.federating && (
|
||||
<SidebarLink
|
||||
to='/timeline/fediverse'
|
||||
icon={require('icons/fediverse.svg')}
|
||||
icon={require('assets/icons/fediverse.svg')}
|
||||
text={<FormattedMessage id='tabs_bar.fediverse' defaultMessage='Fediverse' />}
|
||||
onClick={onClose}
|
||||
/>
|
||||
|
||||
@ -18,8 +18,8 @@ const SiteLogo: React.FC<ISiteLogo> = ({ className, theme, ...rest }) => {
|
||||
|
||||
/** Soapbox logo. */
|
||||
const soapboxLogo = darkMode
|
||||
? require('images/soapbox-logo-white.svg')
|
||||
: require('images/soapbox-logo.svg');
|
||||
? require('assets/images/soapbox-logo-white.svg')
|
||||
: require('assets/images/soapbox-logo.svg');
|
||||
|
||||
// Use the right logo if provided, then use fallbacks.
|
||||
const getSrc = () => {
|
||||
|
||||
@ -18,7 +18,7 @@ const VerificationBadge: React.FC<IVerificationBadge> = ({ className }) => {
|
||||
const soapboxConfig = useSoapboxConfig();
|
||||
|
||||
// Prefer a custom icon if found
|
||||
const icon = soapboxConfig.verifiedIcon || require('icons/verified.svg');
|
||||
const icon = soapboxConfig.verifiedIcon || require('assets/icons/verified.svg');
|
||||
|
||||
// Render component based on file extension
|
||||
const Element = icon.endsWith('.svg') ? Icon : 'img';
|
||||
|
||||
@ -39,21 +39,21 @@ export default function soundsMiddleware(): ThunkMiddleware {
|
||||
const soundCache: Record<string, HTMLAudioElement> = {
|
||||
boop: createAudio([
|
||||
{
|
||||
src: require('../../sounds/boop.ogg'),
|
||||
src: require('../../assets/sounds/boop.ogg'),
|
||||
type: 'audio/ogg',
|
||||
},
|
||||
{
|
||||
src: require('../../sounds/boop.mp3'),
|
||||
src: require('../../assets/sounds/boop.mp3'),
|
||||
type: 'audio/mpeg',
|
||||
},
|
||||
]),
|
||||
chat: createAudio([
|
||||
{
|
||||
src: require('../../sounds/chat.oga'),
|
||||
src: require('../../assets/sounds/chat.oga'),
|
||||
type: 'audio/ogg',
|
||||
},
|
||||
{
|
||||
src: require('../../sounds/chat.mp3'),
|
||||
src: require('../../assets/sounds/chat.mp3'),
|
||||
type: 'audio/mpeg',
|
||||
},
|
||||
]),
|
||||
|
||||
@ -2,8 +2,8 @@ import { Record as ImmutableRecord, fromJS } from 'immutable';
|
||||
|
||||
import { normalizeAccount } from '../account';
|
||||
|
||||
const AVATAR_MISSING = require('images/avatar-missing.png');
|
||||
const HEADER_MISSING = require('images/header-missing.png');
|
||||
const AVATAR_MISSING = require('assets/images/avatar-missing.png');
|
||||
const HEADER_MISSING = require('assets/images/header-missing.png');
|
||||
|
||||
describe('normalizeAccount()', () => {
|
||||
it('adds base fields', () => {
|
||||
|
||||
@ -98,7 +98,7 @@ const normalizePleromaLegacyFields = (account: ImmutableMap<string, any>) => {
|
||||
const normalizeAvatar = (account: ImmutableMap<string, any>) => {
|
||||
const avatar = account.get('avatar');
|
||||
const avatarStatic = account.get('avatar_static');
|
||||
const missing = require('images/avatar-missing.png');
|
||||
const missing = require('assets/images/avatar-missing.png');
|
||||
|
||||
return account.withMutations(account => {
|
||||
account.set('avatar', avatar || avatarStatic || missing);
|
||||
@ -110,7 +110,7 @@ const normalizeAvatar = (account: ImmutableMap<string, any>) => {
|
||||
const normalizeHeader = (account: ImmutableMap<string, any>) => {
|
||||
const header = account.get('header');
|
||||
const headerStatic = account.get('header_static');
|
||||
const missing = require('images/header-missing.png');
|
||||
const missing = require('assets/images/header-missing.png');
|
||||
|
||||
return account.withMutations(account => {
|
||||
account.set('header', header || headerStatic || missing);
|
||||
|
||||
@ -180,21 +180,21 @@ const handlePush = (event: PushEvent) => {
|
||||
/** Native action to open a status on the device. */
|
||||
const actionExpand = (preferred_locale: string) => ({
|
||||
action: 'expand',
|
||||
icon: `/${require('../../images/web-push/web-push-icon_expand.png')}`,
|
||||
icon: `/${require('../../assets/images/web-push/web-push-icon_expand.png')}`,
|
||||
title: formatMessage('status.show_more', preferred_locale),
|
||||
});
|
||||
|
||||
/** Native action to repost status. */
|
||||
const actionReblog = (preferred_locale: string) => ({
|
||||
action: 'reblog',
|
||||
icon: `/${require('../../images/web-push/web-push-icon_reblog.png')}`,
|
||||
icon: `/${require('../../assets/images/web-push/web-push-icon_reblog.png')}`,
|
||||
title: formatMessage('status.reblog', preferred_locale),
|
||||
});
|
||||
|
||||
/** Native action to like status. */
|
||||
const actionFavourite = (preferred_locale: string) => ({
|
||||
action: 'favourite',
|
||||
icon: `/${require('../../images/web-push/web-push-icon_favourite.png')}`,
|
||||
icon: `/${require('../../assets/images/web-push/web-push-icon_favourite.png')}`,
|
||||
title: formatMessage('status.favourite', preferred_locale),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user