fix: build process, static assets

This commit is contained in:
Isaac
2024-06-22 02:07:37 +01:00
parent 4f7ad214ad
commit 9883f28717
46 changed files with 96 additions and 121 deletions

View File

@@ -29,7 +29,7 @@ export function getOfflineImage(type) {
lastImage = randomImage;
const object = {
url: `src/assets/offline-images/${randomImage}.webp`,
url: `offline-images/${randomImage}.webp`,
type,
photoInfo: {
offline: true,

View File

@@ -1,6 +1,5 @@
import variables from 'config/variables';
import { useEffect, useState } from 'react';
import placeholderIcon from 'assets/icons/marketplace-placeholder.png';
import { useTab } from 'components/Elements/MainModal/backend/TabContext';
import { useMarketData } from 'features/marketplace/api/MarketplaceDataContext';
import { MdCheckCircle, MdOpenInNew } from 'react-icons/md';
@@ -47,7 +46,7 @@ function ItemCard({ item, type, onCollection, isCurator, cardStyle }) {
src={item.icon_url}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;
e.target.src = '/icons/marketplace-placeholder.png';
}}
/>
<div className="flex flex-col">
@@ -142,7 +141,7 @@ function ItemCard({ item, type, onCollection, isCurator, cardStyle }) {
src={item.icon_url}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;
e.target.src = '/icons/marketplace-placeholder.png';
}}
/>
<div className="absolute top-3 right-3">{isItemInstalled(item.name) && <MdCheckCircle style={{ color: `${item.colour}` }} className="h-8 w-8" />}</div>

View File

@@ -1,7 +1,6 @@
import variables from 'config/variables';
import React, { memo } from 'react';
import { MdAutoFixHigh, MdOutlineArrowForward, MdOutlineOpenInNew } from 'react-icons/md';
import placeholderIcon from 'assets/icons/marketplace-placeholder.png';
import { motion } from 'framer-motion';
import { Button } from 'components/Elements';
@@ -33,7 +32,7 @@ function ItemCard({ item, toggleFunction, type, onCollection, isCurator }) {
src={item.icon_url}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;
e.target.src = '/icons/marketplace-placeholder.png';
}}
aria-hidden="true"
/>
@@ -44,7 +43,7 @@ function ItemCard({ item, toggleFunction, type, onCollection, isCurator }) {
src={item.icon_url}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;
e.target.src = '/icons/marketplace-placeholder.png';
}}
/>
<div className="card-details">

View File

@@ -1,5 +1,4 @@
import variables from 'config/variables';
import placeholderIcon from 'assets/icons/marketplace-placeholder.png';
import { useEffect, useState } from 'react';
import { ShareModal } from 'components/Elements';
import {
@@ -227,7 +226,7 @@ const ItemPage = () => {
src={selectedItem.icon_url}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;
e.target.src = '/icons/marketplace-placeholder.png';
}}
/>
{localStorage.getItem('welcomePreview') !== 'true' ? (
@@ -395,7 +394,7 @@ const ItemPage = () => {
src={selectedItem.screenshot_url}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;
e.target.src = '/icons/marketplace-placeholder.png';
}}
/>
)}

View File

@@ -21,7 +21,6 @@ import { Button } from 'components/Elements';
import { Carousel } from '../components/Elements/Carousel';
import { ShareModal } from 'components/Elements';
import placeholderIcon from 'assets/icons/marketplace-placeholder.png';
import { Items } from '../components/Items/OldItems';
import Markdown from 'markdown-to-jsx';
@@ -270,7 +269,7 @@ class ItemPage extends PureComponent {
src={iconsrc}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;
e.target.src = '/icons/marketplace-placeholder.png';
}}
/>
)}
@@ -386,7 +385,7 @@ class ItemPage extends PureComponent {
src={this.props.data.data.icon_url}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;
e.target.src = '/icons/marketplace-placeholder.png';
}}
/>
{localStorage.getItem('welcomePreview') !== 'true' ? (

View File

@@ -135,7 +135,7 @@ class About extends PureComponent {
<img
draggable={false}
className="aboutLogo"
src={'src/assets/icons/mue_about.png'}
src={'icons/mue_about.png'}
alt="Logo"
/>
<div className="aboutText">

View File

@@ -1,11 +1,11 @@
const images = [
'/src/assets/icons/undraw_celebration.svg',
'/src/assets/icons/undraw_around_the_world_modified.svg',
'/src/assets/icons/undraw_add_files_modified.svg',
'/src/assets/icons/undraw_dark_mode.svg',
'/src/assets/icons/undraw_making_art.svg',
'/src/assets/icons/undraw_private_data_modified.svg',
'/src/assets/icons/undraw_upgrade_modified.svg',
'/icons/undraw_celebration.svg',
'/icons/undraw_around_the_world_modified.svg',
'/icons/undraw_add_files_modified.svg',
'/icons/undraw_dark_mode.svg',
'/icons/undraw_making_art.svg',
'/icons/undraw_private_data_modified.svg',
'/icons/undraw_upgrade_modified.svg',
];
function AsideImage({ currentTab }) {

View File

@@ -40,7 +40,7 @@ function Intro() {
const ShareYourMue = (
<div className="examples">
<img
src={`/src/assets/welcome-images/example${welcomeImage + 1}.webp`}
src={`/welcome-images/example${welcomeImage + 1}.webp`}
alt="Example Mue setup"
draggable={false}
/>