mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
fully load local maps, and prepare bsaver map infos
This commit is contained in:
@@ -16,10 +16,6 @@ export function AvailableVersionsSlide(props: {year: string}) {
|
||||
});
|
||||
}, [])
|
||||
|
||||
//w-full max-w-full max-h-full flex items-start justify-center overflow-x-hidden overflow-y-scroll content-start scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900
|
||||
|
||||
//relative left-[2px] flex justify-center items-start content-start flex-wrap max-w-6xl
|
||||
|
||||
return (
|
||||
<ol className="w-full flex items-start justify-center gap-6 shrink-0 content-start flex-wrap p-4 overflow-x-hidden overflow-y-scroll scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900">
|
||||
{availableVersions.map((version, index) =>
|
||||
|
||||
@@ -25,8 +25,8 @@ export function AvailableVersionsSlider() {
|
||||
<div className="w-full h-fit max-h-full flex flex-col items-center grow min-h-0">
|
||||
<TabNavBar className="mb-3" tabsText={availableYears} onTabChange={setSelectedYear}/>
|
||||
<ol className="w-full min-h-0 flex transition-transform duration-300" style={{transform: `translate(${-(yearIndex * 100)}%, 0)`}}>
|
||||
{ availableYears.map((year, index) =>
|
||||
<AvailableVersionsSlide key={index} year={year}></AvailableVersionsSlide>
|
||||
{ availableYears.map(year =>
|
||||
<AvailableVersionsSlide key={year} year={year}/>
|
||||
)}
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
+16
-6
@@ -1,25 +1,35 @@
|
||||
import { useState } from "react"
|
||||
import { useObservable } from "renderer/hooks/use-observable.hook"
|
||||
import { MapsManagerService } from "renderer/services/maps-manager.service"
|
||||
import { BSVersion } from "shared/bs-version.interface"
|
||||
import { TabNavBar } from "../shared/tab-nav-bar.component"
|
||||
|
||||
type Props = {
|
||||
oneBlock?: boolean,
|
||||
version?: BSVersion
|
||||
}
|
||||
|
||||
export function MapsPlaylistsPanel({version}: Props) {
|
||||
export function MapsPlaylistsPanel({version, oneBlock = false}: Props) {
|
||||
|
||||
const mapsManager = MapsManagerService.getInstance();
|
||||
|
||||
const [tabIndex, setTabIndex] = useState(0);
|
||||
const maps = useObservable(mapsManager.getMaps(version));
|
||||
|
||||
console.log(tabIndex);
|
||||
console.log(maps);
|
||||
|
||||
return (
|
||||
<>
|
||||
{!oneBlock && <TabNavBar className="mb-8 w-72" tabsText={["Maps", "Playlists"]} onTabChange={setTabIndex}/>}
|
||||
<div className="w-full h-full bg-main-color-1 rounded-md shadow-black shadow-md overflow-hidden">
|
||||
<TabNavBar className="!rounded-none shadow-sm" tabsText={["Maps", "Playlists"]} onTabChange={setTabIndex}/>
|
||||
<div className="w-full h-full flex flex-row items-center transition-transform duration-300" style={{transform: `translate(${-(tabIndex * 100)}%, 0)`}}>
|
||||
<div className="w-full h-full grow bg-red-300 shrink-0">a</div>
|
||||
<div className="w-full h-full bg-green-300 shrink-0">b</div>
|
||||
{oneBlock && <TabNavBar className="!rounded-none shadow-sm" tabsText={["Maps", "Playlists"]} onTabChange={setTabIndex}/>}
|
||||
<div className="w-full h-full min-h-0 flex flex-row items-center transition-transform duration-300" style={{transform: `translate(${-(tabIndex * 100)}%, 0)`}}>
|
||||
<div className="w-full h-full grow bg-red-300 shrink-0 overflow-y-scroll">
|
||||
a
|
||||
</div>
|
||||
<div className="w-full h-full grow bg-green-300 shrink-0">b</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user