mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-09-24 17:11:00 +00:00
feat: initial new notif ui, and repair version option
This commit is contained in:
@@ -114,23 +114,15 @@ export function AchievementToast({
|
||||
}
|
||||
className={`fixed top-6 right-6 z-[9999] ${onClick ? "cursor-pointer" : ""}`}
|
||||
>
|
||||
<div
|
||||
className="flex items-center gap-4 p-4 min-w-[300px] max-w-[450px]"
|
||||
style={{
|
||||
backgroundImage: "url('/images/notification.png')",
|
||||
backgroundSize: "100% 100%",
|
||||
backgroundRepeat: "no-repeat",
|
||||
imageRendering: "pixelated",
|
||||
}}
|
||||
>
|
||||
<div className="w-12 h-12 flex-shrink-0 flex items-center justify-center bg-[#3F3F3F] border-2 border-[#1A1A1A]">
|
||||
<div className="flex items-center gap-3 p-3 min-w-[260px] max-w-[380px] mc-options-bg">
|
||||
<div className="w-10 h-10 flex-shrink-0 flex items-center justify-center bg-[#3F3F3F] border-2 border-[#1A1A1A]">
|
||||
{getIcon()}
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<span className="text-[#FFFF55] text-lg font-bold mc-text-shadow leading-tight">
|
||||
<span className="text-[#333333] text-[20px] leading-tight font-normal">
|
||||
{displayTitle}
|
||||
</span>
|
||||
<span className="text-white text-base mc-text-shadow leading-tight break-words">
|
||||
<span className="text-[#333333] text-[13px] leading-tight break-words font-normal">
|
||||
{message}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -95,8 +95,7 @@ const VersionsView = memo(function VersionsView() {
|
||||
const { isAndroid } = usePlatform();
|
||||
const visibleEditions = editions.filter(
|
||||
(e) =>
|
||||
e.url !== HIDDEN_INSTANCE_URL ||
|
||||
installedVersions.includes(e.instanceId),
|
||||
e.url !== HIDDEN_INSTANCE_URL || installedVersions.includes(e.instanceId),
|
||||
);
|
||||
const [focusIndex, setFocusIndex] = useState<number>(0);
|
||||
const [focusBtn, setFocusBtn] = useState<number>(0);
|
||||
@@ -326,7 +325,9 @@ const VersionsView = memo(function VersionsView() {
|
||||
};
|
||||
|
||||
const handleImportWorld = (instanceId: string) => {
|
||||
const edition = visibleEditions.find((e: Edition) => e.instanceId === instanceId);
|
||||
const edition = visibleEditions.find(
|
||||
(e: Edition) => e.instanceId === instanceId,
|
||||
);
|
||||
setImportWorldTarget({ id: instanceId, name: edition?.name ?? instanceId });
|
||||
setIsImportWorldModalOpen(true);
|
||||
};
|
||||
@@ -583,7 +584,7 @@ const VersionsView = memo(function VersionsView() {
|
||||
className="w-full text-left px-3 py-1.5 text-xs text-[#ffff55] hover:text-white hover:bg-[#ffff55]/20 flex items-center gap-2 group transition-colors mc-text-shadow font-bold border-b border-white/5 mb-1"
|
||||
>
|
||||
<img
|
||||
src="/images/Download_Icon.png"
|
||||
src="/images/Update_Icon.png"
|
||||
alt=""
|
||||
className="w-3 h-3 object-contain"
|
||||
style={{ imageRendering: "pixelated" }}
|
||||
@@ -591,7 +592,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
{t("versions.updateAvailable")}
|
||||
</button>
|
||||
)}
|
||||
{!isAndroid && !isInstalled && ( <button
|
||||
{!isAndroid && !isInstalled && (
|
||||
<button
|
||||
onClick={async (e) => {
|
||||
e.stopPropagation();
|
||||
playPressSound();
|
||||
@@ -673,7 +675,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
</svg>
|
||||
{t("versions.downloadDlc")}
|
||||
</button>
|
||||
) : null} {argsSchemas[edition.instanceId] && (
|
||||
) : null}{" "}
|
||||
{argsSchemas[edition.instanceId] && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -728,6 +731,23 @@ const VersionsView = memo(function VersionsView() {
|
||||
</button>
|
||||
)}
|
||||
<div className="h-[1px] bg-white/5 my-0.5 mx-1" />
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
playPressSound();
|
||||
toggleInstall(edition.instanceId);
|
||||
setOpenMenuId(null);
|
||||
}}
|
||||
className="w-full text-left px-3 py-1.5 text-xs text-[#dddddd] hover:bg-[#ffff55]/20 flex items-center gap-2 group transition-colors mc-text-shadow font-bold border-b border-white/5 mb-1"
|
||||
>
|
||||
<img
|
||||
src="/images/tools/pck.png" //neo: i have no other image to use lol
|
||||
alt=""
|
||||
className="w-3 h-3 object-contain"
|
||||
style={{ imageRendering: "pixelated" }}
|
||||
/>
|
||||
{t("versions.repair")}
|
||||
</button>
|
||||
{!isAndroid && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
@@ -748,7 +768,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
/>
|
||||
{t("versions.openFolder")}
|
||||
</button>
|
||||
)} {!isAndroid && (
|
||||
)}{" "}
|
||||
{!isAndroid && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -783,7 +804,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
/>
|
||||
{t("versions.addToSteam")}
|
||||
</button>
|
||||
)} {!isAndroid && (
|
||||
)}{" "}
|
||||
{!isAndroid && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -808,7 +830,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
</svg>
|
||||
{t("versions.importWorld")}
|
||||
</button>
|
||||
)} {!isAndroid && (
|
||||
)}{" "}
|
||||
{!isAndroid && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -837,7 +860,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
</svg>
|
||||
{t("versions.backup")}
|
||||
</button>
|
||||
)} {!isAndroid && (
|
||||
)}{" "}
|
||||
{!isAndroid && (
|
||||
<button
|
||||
onClick={async (e) => {
|
||||
e.stopPropagation();
|
||||
@@ -865,7 +889,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
</svg>
|
||||
{t("versions.restore")}
|
||||
</button>
|
||||
)} {!isAndroid && (
|
||||
)}{" "}
|
||||
{!isAndroid && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -889,7 +914,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
</svg>
|
||||
{t("versions.customize")}
|
||||
</button>
|
||||
)} <button
|
||||
)}{" "}
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
playPressSound();
|
||||
@@ -912,7 +938,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
<circle cx="12" cy="7" r="4"></circle>
|
||||
</svg>
|
||||
{t("versions.setUid")}
|
||||
</button> {isCustom ? (
|
||||
</button>{" "}
|
||||
{isCustom ? (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -936,7 +963,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
</svg>
|
||||
{t("versions.editCustom")}
|
||||
</button>
|
||||
) : null} <div className="h-[2px] bg-[#555] my-0.5 mx-1" />
|
||||
) : null}{" "}
|
||||
<div className="h-[2px] bg-[#555] my-0.5 mx-1" />
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -956,7 +984,9 @@ const VersionsView = memo(function VersionsView() {
|
||||
className="w-3.5 h-3.5 object-contain"
|
||||
style={{ imageRendering: "pixelated" }}
|
||||
/>
|
||||
{isCustom ? t("versions.removeCustom") : t("versions.uninstall")}
|
||||
{isCustom
|
||||
? t("versions.removeCustom")
|
||||
: t("versions.uninstall")}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
@@ -1053,7 +1083,8 @@ const VersionsView = memo(function VersionsView() {
|
||||
}}
|
||||
>
|
||||
{t("common.done")}
|
||||
</button> </div>
|
||||
</button>{" "}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<CustomTUModal
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"ok": "OK",
|
||||
"next": "Next",
|
||||
"finish": "Finish",
|
||||
"error": "Error!",
|
||||
"error": "Error",
|
||||
"on": "ON",
|
||||
"off": "OFF",
|
||||
"enabled": "Enabled",
|
||||
@@ -143,6 +143,7 @@
|
||||
"title": "Versions",
|
||||
"custom": "Custom",
|
||||
"updateAvailable": "Update Available!",
|
||||
"repair": "Repair",
|
||||
"downloadToCustomPath": "Download to custom path",
|
||||
"downloadDlc": "Download DLC",
|
||||
"options": "Options",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"ok": "OK",
|
||||
"next": "Suivant",
|
||||
"finish": "Fini",
|
||||
"error": "Erreur!",
|
||||
"error": "Erreur",
|
||||
"on": "ON",
|
||||
"off": "OFF",
|
||||
"enabled": "Activé",
|
||||
@@ -143,6 +143,7 @@
|
||||
"title": "Versions",
|
||||
"custom": "Modifié",
|
||||
"updateAvailable": "Mise à jour disponible!",
|
||||
"repair": "Réparer",
|
||||
"downloadToCustomPath": "Téléchargement pour le chemin designé",
|
||||
"downloadDlc": "Télecharger DLC",
|
||||
"options": "Options",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"ok": "ОК",
|
||||
"next": "След.",
|
||||
"finish": "Конец",
|
||||
"error": "Ошибка!",
|
||||
"error": "Ошибка",
|
||||
"on": "ON",
|
||||
"off": "OFF",
|
||||
"enabled": "Включено",
|
||||
@@ -143,6 +143,7 @@
|
||||
"title": "Версии",
|
||||
"custom": "Кастомные",
|
||||
"updateAvailable": "Доступно обновление!",
|
||||
"repair": "Ремонт",
|
||||
"downloadToCustomPath": "Скачать в указанную папку",
|
||||
"downloadDlc": "Скачать DLC",
|
||||
"options": "Параметры",
|
||||
|
||||
Reference in New Issue
Block a user