diff --git a/src/components/common/SkinViewer.tsx b/src/components/common/SkinViewer.tsx index 4cd49bf..2c2f606 100644 --- a/src/components/common/SkinViewer.tsx +++ b/src/components/common/SkinViewer.tsx @@ -433,7 +433,9 @@ const SkinViewer = memo(function SkinViewer({ renderer.domElement.addEventListener("mousedown", onMouseDown); window.addEventListener("mousemove", onMouseMove); window.addEventListener("mouseup", onMouseUp); - renderer.domElement.addEventListener("touchstart", onTouchStart, { passive: true }); + renderer.domElement.addEventListener("touchstart", onTouchStart, { + passive: true, + }); window.addEventListener("touchmove", onTouchMove, { passive: false }); window.addEventListener("touchend", onTouchEnd); return () => { @@ -692,20 +694,22 @@ const SkinViewer = memo(function SkinViewer({ data-focus="0" tabIndex={0} > - setUsername(e.target.value)} - onKeyDown={(e) => { - if (e.key === "Enter") { - e.currentTarget.blur(); - e.stopPropagation(); - } - }} - className="bg-transparent text-white focus:text-[#FFFF55] outline-none border-none text-center font-[var(--font-base)] mc-text-shadow tracking-widest text-xl cursor-text" - /> +
+ setUsername(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Enter") { + e.currentTarget.blur(); + e.stopPropagation(); + } + }} + className="text-white focus:text-[#FFFF55] outline-none text-center font-[var(--font-base)] tracking-widest text-xl cursor-text" + /> +
)} {!legacyMode && ( diff --git a/src/components/modals/CustomTUModal.tsx b/src/components/modals/CustomTUModal.tsx index cd016a8..f5a5c4e 100644 --- a/src/components/modals/CustomTUModal.tsx +++ b/src/components/modals/CustomTUModal.tsx @@ -144,6 +144,7 @@ export default function CustomTUModal({ +
setName(e.target.value)} onFocus={() => setFocusIndex(0)} placeholder={t("modals.customTu.namePlaceholder")} - className="w-full h-10 px-3 bg-black/40 border-2 border-[#373737] text-white text-base outline-none font-[var(--font-base)]" + className="mc-textinput w-full h-10 px-3 text-white text-base outline-none font-[var(--font-base)]" style={{ imageRendering: "pixelated" }} /> +
+
setDesc(e.target.value)} onFocus={() => setFocusIndex(1)} placeholder={t("modals.customTu.descPlaceholder")} - className="w-full h-10 px-3 bg-black/40 border-2 border-[#373737] text-white text-base outline-none font-[var(--font-base)]" + className="mc-textinput w-full h-10 px-3 text-white text-base outline-none font-[var(--font-base)]" style={{ imageRendering: "pixelated" }} /> +
+
setUrl(e.target.value)} onFocus={() => setFocusIndex(2)} placeholder={t("modals.customTu.urlPlaceholder")} - className="w-full h-10 px-3 bg-black/40 border-2 border-[#373737] text-white text-base outline-none font-[var(--font-base)]" + className="mc-textinput w-full h-10 px-3 text-white text-base outline-none font-[var(--font-base)]" style={{ imageRendering: "pixelated" }} /> +
{path && ( @@ -191,13 +197,15 @@ export default function CustomTUModal({ +
+
)} diff --git a/src/components/modals/OptionsModal.tsx b/src/components/modals/OptionsModal.tsx index 8f04ddc..55ddad7 100644 --- a/src/components/modals/OptionsModal.tsx +++ b/src/components/modals/OptionsModal.tsx @@ -255,6 +255,7 @@ export default function OptionsModal({ case "int": case "number": return ( +
{ inputRefs.current[index] = el; @@ -273,14 +274,16 @@ export default function OptionsModal({ })); }} onFocus={() => setFocusIndex(index)} - className={`w-24 h-8 bg-black/40 border-2 border-[#373737] text-white text-sm px-2 outline-none text-center font-[var(--font-base)] focus:border-[#FFFF55] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none ${ + className={`mc-textinput w-full h-10 px-3 text-white text-sm outline-none text-center font-[var(--font-base)] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none ${ disabled ? "opacity-40 cursor-not-allowed" : "" }`} style={{ imageRendering: "pixelated" }} /> +
); case "string": return ( +
{ inputRefs.current[index] = el; @@ -293,11 +296,12 @@ export default function OptionsModal({ setValues((prev) => ({ ...prev, [option.id]: e.target.value })); }} onFocus={() => setFocusIndex(index)} - className={`w-44 h-8 bg-black/40 border-2 border-[#373737] text-white text-sm px-2 outline-none font-[var(--font-base)] focus:border-[#FFFF55] ${ + className={`mc-textinput w-full h-10 px-3 text-white text-sm outline-none font-[var(--font-base)] ${ disabled ? "opacity-40 cursor-not-allowed" : "" }`} style={{ imageRendering: "pixelated" }} /> +
); case "choice": return ( diff --git a/src/components/modals/SetUidModal.tsx b/src/components/modals/SetUidModal.tsx index a0b95a1..adeb3b7 100644 --- a/src/components/modals/SetUidModal.tsx +++ b/src/components/modals/SetUidModal.tsx @@ -183,6 +183,7 @@ export default function SetUidModal({ +
setUid(e.target.value)} onFocus={() => setFocusIndex(2)} placeholder="0xFF02F0C87E8AC1F2" - className={`w-full h-10 px-3 bg-black/40 border-2 ${focusIndex === 2 ? 'border-white' : 'border-[#373737]'} text-white text-base outline-none font-[var(--font-base)] text-center`} + className="mc-textinput w-full h-10 px-3 text-white text-base outline-none font-[var(--font-base)] text-center" style={{ imageRendering: "pixelated", filter: focusIndex === 2 ? 'brightness(1.2)' : 'none' }} /> +
) : (
diff --git a/src/components/views/ArcEditorView.tsx b/src/components/views/ArcEditorView.tsx index 9bf6ce9..1b6feff 100644 --- a/src/components/views/ArcEditorView.tsx +++ b/src/components/views/ArcEditorView.tsx @@ -387,13 +387,15 @@ export const ArcEditorView: React.FC = () => {
+
setSearchTerm(e.target.value)} - className="flex-1 bg-black/40 border-2 border-[#373737] text-white px-4 py-2 outline-none focus:border-[#FFFF55] transition-colors" + className="mc-textinput w-full h-10 px-3 text-white text-base outline-none font-[var(--font-base)]" /> +
@@ -338,6 +350,7 @@ export default function ColEditorView() { }} className="w-6 h-6 p-0 cursor-pointer shrink-0 border border-[#373737] rounded-sm bg-transparent" /> +
>> 0); } }} - className="bg-black/40 border border-[#373737] w-20 px-2 py-1 outline-none focus:border-[#FFFF55] text-white font-mono text-xs uppercase" + className="mc-textinput w-full h-10 px-3 text-white font-mono text-xs uppercase outline-none font-[var(--font-base)]" maxLength={8} /> +
diff --git a/src/components/views/GoldMapperView.tsx b/src/components/views/GoldMapperView.tsx index 30b53c1..4f49c88 100644 --- a/src/components/views/GoldMapperView.tsx +++ b/src/components/views/GoldMapperView.tsx @@ -354,7 +354,7 @@ const GoldMapperView = memo(function GoldMapperView() { ? handleToggleEnabled : () => openBind(row.id) } - className={`w-full h-10 flex items-center pl-6 pr-4 outline-none border-none shrink-0 transition-colors ${ + className={`w-full h-10 flex items-center ${!isEnable ? "pl-6" : "pl-2"} pr-4 outline-none border-none shrink-0 transition-colors ${ focused ? "text-[#ffff00]" : isEnable @@ -386,7 +386,7 @@ const GoldMapperView = memo(function GoldMapperView() {
)} @@ -425,9 +425,9 @@ const GoldMapperView = memo(function GoldMapperView() {
))} @@ -985,6 +989,7 @@ function BoxEditModal({ {axis} +
+
))} @@ -1011,6 +1017,7 @@ function BoxEditModal({ {axis} +
+
))} @@ -1038,6 +1046,7 @@ function BoxEditModal({ {axis} +
+
))} @@ -1057,13 +1067,15 @@ function BoxEditModal({ +
setInflate(parseFloat(e.target.value) || 0)} - className="w-20 bg-black/40 border border-[#373737] text-white px-2 py-1 outline-none focus:border-[#FFFF55] text-sm" + className="mc-textinput w-full h-10 px-3 text-white text-sm outline-none font-[var(--font-base)]" /> +
); }) @@ -779,18 +787,20 @@ const SkinsView = memo(function SkinsView() { > - - handleCapeNameChange(cape.id, e.target.value) - } - className={`bg-transparent text-center outline-none border-none text-base mc-text-shadow w-full truncate transition-colors relative z-10 ${isActive || isFocused ? "text-[#FFFF55]" : "text-white"} ${isDefaultCape(cape.id) ? "pointer-events-none" : ""}`} - onClick={(e) => e.stopPropagation()} - spellCheck={false} - readOnly={isDefaultCape(cape.id)} - /> +
+ + handleCapeNameChange(cape.id, e.target.value) + } + className={`mc-textinput w-full h-10 px-3 text-base text-center truncate outline-none relative z-10 font-[var(--font-base)] ${isActive || isFocused ? "text-[#FFFF55]" : "text-white"} ${isDefaultCape(cape.id) ? "pointer-events-none" : ""}`} + onClick={(e) => e.stopPropagation()} + spellCheck={false} + readOnly={isDefaultCape(cape.id)} + /> +
); })} @@ -896,16 +906,18 @@ const SkinsView = memo(function SkinsView() { ) : importMode === "username" ? (
- setImportUsername(e.target.value)} - onFocus={() => setModalFocusIndex(0)} - autoFocus - spellCheck={false} - className={`w-full h-12 bg-black/50 border-2 text-white px-4 text-xl outline-none transition-colors relative z-10 ${modalFocusIndex === 0 ? "border-[#FFFF55]" : "border-[#373737]"}`} - /> +
+ setImportUsername(e.target.value)} + onFocus={() => setModalFocusIndex(0)} + autoFocus + spellCheck={false} + className="mc-textinput w-full h-10 px-3 text-white text-xl outline-none font-[var(--font-base)]" + /> +
{importError && ( diff --git a/src/components/views/SwfView.tsx b/src/components/views/SwfView.tsx index a8be279..0ec1e24 100644 --- a/src/components/views/SwfView.tsx +++ b/src/components/views/SwfView.tsx @@ -218,13 +218,15 @@ export default function SwfView() {
+
setSearchTerm(e.target.value)} - className="w-full bg-black/40 border-2 border-[#373737] text-white px-4 py-2 outline-none focus:border-[#FFFF55] transition-colors" + className="mc-textinput w-full h-10 px-3 text-white text-base outline-none font-[var(--font-base)]" /> +
{filteredImages.map(img => ( diff --git a/src/components/views/WorkshopView.tsx b/src/components/views/WorkshopView.tsx index edf8813..27fdff9 100644 --- a/src/components/views/WorkshopView.tsx +++ b/src/components/views/WorkshopView.tsx @@ -843,46 +843,41 @@ const WorkshopView = memo(function WorkshopView({ {showSearch ? (
-
- { - setSearch(e.target.value); - setFocusedIdx(null); - }} - placeholder={ - isInstalledTab - ? t("workshop.filterInstalled") - : isVersionTab - ? t("workshop.filterVersions") - : isPluginTab - ? t("workshop.filterPlugins") - : activeTab === "Server Plugins" +
+
+ { + setSearch(e.target.value); + setFocusedIdx(null); + }} + placeholder={ + isInstalledTab + ? t("workshop.filterInstalled") + : isVersionTab + ? t("workshop.filterVersions") + : isPluginTab ? t("workshop.filterPlugins") - : activeTab === "Server" - ? t("workshop.filterServers") - : t("workshop.enterKeywords") - } - spellCheck={false} - autoFocus={isSearchTab} - className="bg-transparent border-none outline-none text-white text-lg mc-text-shadow w-full placeholder-white/40 font-[var(--font-base)] tracking-widest" - /> + : activeTab === "Server Plugins" + ? t("workshop.filterPlugins") + : activeTab === "Server" + ? t("workshop.filterServers") + : t("workshop.enterKeywords") + } + spellCheck={false} + autoFocus={isSearchTab} + className="mc-textinput w-full h-10 px-3 text-white text-base outline-none font-[var(--font-base)] placeholder-white/40 tracking-widest" + /> +
{search && ( @@ -901,7 +896,9 @@ const WorkshopView = memo(function WorkshopView({ : "text-[#A0A0A0] bg-black/30 border-[#444] hover:text-white hover:border-[#888]" }`} > - {cat === "all" ? t("common.all").toUpperCase() : cat.toUpperCase()} + {cat === "all" + ? t("common.all").toUpperCase() + : cat.toUpperCase()} ))}
@@ -918,7 +915,9 @@ const WorkshopView = memo(function WorkshopView({ : "text-[#A0A0A0] bg-black/30 border-[#444] hover:text-white hover:border-[#888]" }`} > - {cat === "all" ? t("common.all").toUpperCase() : cat.toUpperCase()} + {cat === "all" + ? t("common.all").toUpperCase() + : cat.toUpperCase()} ))}
diff --git a/src/css/index.css b/src/css/index.css index 16e5172..551d5b4 100644 --- a/src/css/index.css +++ b/src/css/index.css @@ -453,7 +453,8 @@ body { image-rendering: pixelated; } -.mc-textinput-outer:focus-within { +.mc-textinput-outer:focus-within, +:focus > .mc-textinput-outer { border: 2px solid #ffff00; } diff --git a/src/pages/App.tsx b/src/pages/App.tsx index 4a4e19b..bfea49c 100644 --- a/src/pages/App.tsx +++ b/src/pages/App.tsx @@ -1,11 +1,6 @@ import { useEffect, useState, useMemo, useCallback, useRef } from "react"; import { useTranslation } from "react-i18next"; -import { - motion, - AnimatePresence, - MotionConfig, - getDefaultTransition, -} from "framer-motion"; +import { motion, AnimatePresence, MotionConfig } from "framer-motion"; import "../css/App.css"; import HomeView from "../components/views/HomeView"; import SettingsView from "../components/views/SettingsView";