From 1b0150b719808070dfd161982e0aae9baf8067f1 Mon Sep 17 00:00:00 2001 From: neoapps-dev Date: Sun, 14 Jun 2026 21:11:38 +0300 Subject: [PATCH] feat: skin viewer in skin changing menu --- src/components/common/SkinViewer.tsx | 71 ++++++++++++++------------- src/components/views/SettingsView.tsx | 1 - src/components/views/SkinsView.tsx | 23 +++++++-- 3 files changed, 56 insertions(+), 39 deletions(-) diff --git a/src/components/common/SkinViewer.tsx b/src/components/common/SkinViewer.tsx index c069726..a47f833 100644 --- a/src/components/common/SkinViewer.tsx +++ b/src/components/common/SkinViewer.tsx @@ -15,9 +15,10 @@ interface SkinViewerProps { setActiveView: (view: string) => void; isFocusedSection: boolean; onNavigateRight: () => void; + hideControls?: boolean; } -const SkinViewer = memo(function SkinViewer({ username, setUsername, playPressSound, skinUrl, capeUrl, setActiveView, isFocusedSection, onNavigateRight }: SkinViewerProps) { +const SkinViewer = memo(function SkinViewer({ username, setUsername, playPressSound, skinUrl, capeUrl, setActiveView, isFocusedSection, onNavigateRight, hideControls }: SkinViewerProps) { const mountRef = useRef(null); const containerRef = useRef(null); const [focusIndex, setFocusIndex] = useState(0); @@ -263,7 +264,7 @@ const SkinViewer = memo(function SkinViewer({ username, setUsername, playPressSo transition={{ duration: useConfig().animationsEnabled ? 0.3 : 0 }} className={`absolute ${legacyMode ? 'left-[calc(50vw-340px)]' : 'left-16'} ${legacyMode ? 'top-1/2' : 'top-[40%]'} -translate-y-1/2 flex flex-col items-center gap-1 outline-none z-10`} > - {!legacyMode && ( + {!hideControls && !legacyMode && (
)} -
- - - -
+ {!hideControls && ( +
+ + + +
+ )} ); diff --git a/src/components/views/SettingsView.tsx b/src/components/views/SettingsView.tsx index d4144be..fa3f51f 100644 --- a/src/components/views/SettingsView.tsx +++ b/src/components/views/SettingsView.tsx @@ -861,7 +861,6 @@ const SettingsView = memo(function SettingsView() {
{settingsItems.map((item, index) => { if (item.id === "back") return null; - if (item.type === "slider") { return (
+
+ {}} + playPressSound={playPressSound} + skinUrl={skinUrl} + setSkinUrl={setSkinUrl} + capeUrl={capeUrl} + setActiveView={setActiveView} + isFocusedSection={false} + onNavigateRight={() => {}} + hideControls + /> +
+