Update code to deal with new paths under src

This commit is contained in:
Alex Gleason
2023-09-18 16:37:15 -05:00
parent efdec35d98
commit dd97a46a03
21 changed files with 69 additions and 41 deletions

View File

@ -37,7 +37,7 @@ export const isRemote = (account: Pick<Account, 'acct'>): boolean => !isLocal(ac
const DEFAULT_HEADERS: string[] = [
'/headers/original/missing.png', // Mastodon
'/images/banner.png', // Pleroma
require('assets/images/header-missing.png'), // header not provided by backend
require('soapbox/assets/images/header-missing.png'), // header not provided by backend
];
/** Check if the avatar is a default avatar */
@ -49,7 +49,7 @@ export const isDefaultHeader = (url: string) => {
const DEFAULT_AVATARS = [
'/avatars/original/missing.png', // Mastodon
'/images/avi.png', // Pleroma
require('assets/images/avatar-missing.png'), // avatar not provided by backend
require('soapbox/assets/images/avatar-missing.png'), // avatar not provided by backend
];
/** Check if the avatar is a default avatar */

View File

@ -1,6 +1,6 @@
import { execSync } from 'node:child_process';
import pkg from '../../../package.json';
import pkg from '../../package.json';
const { CI_COMMIT_TAG, CI_COMMIT_REF_NAME, CI_COMMIT_SHA } = process.env;

View File

@ -35,21 +35,21 @@ const play = (audio: HTMLAudioElement): void => {
const soundCache: Record<Sounds, HTMLAudioElement> = {
boop: createAudio([
{
src: require('../../assets/sounds/boop.ogg'),
src: require('../assets/sounds/boop.ogg'),
type: 'audio/ogg',
},
{
src: require('../../assets/sounds/boop.mp3'),
src: require('../assets/sounds/boop.mp3'),
type: 'audio/mpeg',
},
]),
chat: createAudio([
{
src: require('../../assets/sounds/chat.oga'),
src: require('../assets/sounds/chat.oga'),
type: 'audio/ogg',
},
{
src: require('../../assets/sounds/chat.mp3'),
src: require('../assets/sounds/chat.mp3'),
type: 'audio/mpeg',
},
]),