mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-09-23 08:32:51 +00:00
fix: black screen when opening server plugins (#88)
This commit is contained in:
@@ -24,6 +24,8 @@
|
|||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
"react-markdown": "^10.1.0",
|
"react-markdown": "^10.1.0",
|
||||||
|
"rehype-raw": "^7.0.0",
|
||||||
|
"rehype-sanitize": "^6.0.0",
|
||||||
"remark-gfm": "^4.0.1",
|
"remark-gfm": "^4.0.1",
|
||||||
"three": "^0.183.2"
|
"three": "^0.183.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import React, {
|
|||||||
import { motion, AnimatePresence } from "framer-motion";
|
import { motion, AnimatePresence } from "framer-motion";
|
||||||
import ReactMarkdown from "react-markdown";
|
import ReactMarkdown from "react-markdown";
|
||||||
import remarkGfm from "remark-gfm";
|
import remarkGfm from "remark-gfm";
|
||||||
|
import rehypeRaw from "rehype-raw";
|
||||||
|
import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
|
||||||
import {
|
import {
|
||||||
useUI,
|
useUI,
|
||||||
useAudio,
|
useAudio,
|
||||||
@@ -101,7 +103,7 @@ interface LCEOnlineAddon {
|
|||||||
downloads: number;
|
downloads: number;
|
||||||
download_url: string;
|
download_url: string;
|
||||||
file_size: number;
|
file_size: number;
|
||||||
icon_url: string;
|
icon: string;
|
||||||
has_icon: boolean;
|
has_icon: boolean;
|
||||||
author: string;
|
author: string;
|
||||||
}
|
}
|
||||||
@@ -233,7 +235,7 @@ const WorkshopView = memo(function WorkshopView({
|
|||||||
description: a.short_description,
|
description: a.short_description,
|
||||||
extended_description: a.description,
|
extended_description: a.description,
|
||||||
category: [a.category],
|
category: [a.category],
|
||||||
thumbnail: a.icon_url,
|
thumbnail: a.icon || "",
|
||||||
version: "1.0",
|
version: "1.0",
|
||||||
likes: a.likes,
|
likes: a.likes,
|
||||||
download_count: a.downloads,
|
download_count: a.downloads,
|
||||||
@@ -259,7 +261,7 @@ const WorkshopView = memo(function WorkshopView({
|
|||||||
description: s.ip,
|
description: s.ip,
|
||||||
extended_description: `**Server:** ${s.type}\n**Version:** ${s.version}\n**Owner:** ${s.owner}`,
|
extended_description: `**Server:** ${s.type}\n**Version:** ${s.version}\n**Owner:** ${s.owner}`,
|
||||||
category: [s.type],
|
category: [s.type],
|
||||||
thumbnail: s.icon,
|
thumbnail: s.icon || "",
|
||||||
version: s.version,
|
version: s.version,
|
||||||
server_address: s.ip,
|
server_address: s.ip,
|
||||||
server_discord: s.discord ?? "",
|
server_discord: s.discord ?? "",
|
||||||
@@ -1464,7 +1466,7 @@ function PackageModal({
|
|||||||
Description
|
Description
|
||||||
</span>
|
</span>
|
||||||
<div className="text-sm text-white mc-text-shadow leading-relaxed workshop-markdown">
|
<div className="text-sm text-white mc-text-shadow leading-relaxed workshop-markdown">
|
||||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>
|
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw, [rehypeSanitize, defaultSchema]]}>
|
||||||
{pkg.extended_description}
|
{pkg.extended_description}
|
||||||
</ReactMarkdown>
|
</ReactMarkdown>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user