Skip to content

Commit

Permalink
🎫💦 ↝ [SSG-119 SSG-120 SSM-108]: Bug fixes and a little bit of scope p…
Browse files Browse the repository at this point in the history
…lanning
  • Loading branch information
Gizmotronn committed Feb 7, 2025
1 parent 5593d66 commit 212de34
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 15 deletions.
39 changes: 32 additions & 7 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,36 @@ export default function Home() {
return <LoginPage />;
};

if (activePlanet?.id === 69) {
return (
<EarthScene />
);
};

return planetViews[activePlanet?.id] || <Onboarding />;
return (
<EarthViewLayout>
<div className="w-full">
<Navbar />
<div className="flex flex-row space-y-4"></div>
<div className="py-3">
<div className="py-1">
{/* <EnhancedWeatherEvents /> */}
</div>
<center>
<OrbitalStructuresOnPlanet />
</center>
</div>
</div>
<div className="w-full">
<div className="py-2">
<center>
<AtmosphereStructuresOnPlanet />
</center>
</div>
</div>
<div className="w-full py-2">
<center>
<StructuresOnPlanet />
<AllAutomatonsOnActivePlanet />
</center>
</div>
{/* <div className="w-full py-2"><StructureMissionGuide /> */}
<div className="w-full py-2"><SimpleeMissionGuide />
</div>
</EarthViewLayout>
)
};
4 changes: 4 additions & 0 deletions app/tests/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
"use client";

import { BasicPopupModal } from "@/components/Layout/Modal";
import { useSession } from "@supabase/auth-helpers-react";

export default function TestPage() {
const session = useSession();

return (
// <StarnetLayout>
<>
<BasicPopupModal />
<p>{session?.user.id}</p>
</>
// {/* </StarnetLayout> */}
);
Expand Down
3 changes: 2 additions & 1 deletion components/Projects/Auto/AI4Mars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,9 @@ export function AiForMarsProject({
anomalyType="automaton-aiForMars"
missionNumber={200000062}
assetMentioned={imageUrl}
structureItemId={3102}
structureItemId={3102}
annotationType="AI4M"
parentPlanetLocation={anomalyid?.toString()}
/>
{/* <ClassificationForm
Expand Down
1 change: 1 addition & 0 deletions components/Projects/Lidar/JovianVortexHunter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export function LidarJVHSatellite({ anomalyid }: SelectedAnomProps) {
structureItemId={3105}
initialImageUrl={imageUrl}
annotationType="AI4M"//JVH"
parentPlanetLocation='Null'
/>
{/* <ClassificationForm
anomalyId={anomaly.id.toString()}
Expand Down
1 change: 1 addition & 0 deletions components/Projects/Telescopes/Transiting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export function StarterTelescopeTess({ anomalyid }: SelectedAnomProps) {
annotationType='PH'
initialImageUrl={imageUrls[1]}
anomalyId={selectedAnomaly.id.toString()}
//parentPlanetLocation...
/>
// <ClassificationForm
// anomalyId={selectedAnomaly.id.toString()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ interface Mission {
title: string;
description: string;
icon: React.ElementType;
points: number;
completedCount: number;
points?: number;
completedCount?: number;
internalComponent?: React.ElementType | (() => JSX.Element);
color: string;
};
Expand Down Expand Up @@ -158,8 +158,6 @@ const AI4M = () => {
description:
"This mission will get you up to speed with how your rovers should be trained and how we can find anomalies from their photos",
icon: HelpCircle,
points: 0,
completedCount: 0,
internalComponent: () => {
return <StarterAiForMars anomalyid={69592674} />
},
Expand Down
32 changes: 30 additions & 2 deletions components/Structures/Missions/BasePlate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ const MissionShell = ({
<div className="ml-4">
<h2 className={`text-lg font-bold ${mission.color}`}>{mission.title}</h2>
<p className={`text-sm ${mission.color}`}>{mission.description}</p>
<p className={`text-sm ${mission.color}`}>Points: {mission.points}</p>
{mission.points && (
<p className={`text-sm ${mission.color}`}>Points: {mission.points}</p>
)}
</div>
<div className="ml-auto text-right">
<p className="text-xs">Completed: {completedCount}</p>
Expand All @@ -114,6 +116,32 @@ const MissionShell = ({
);
};

const renderTutorialMission = (mission: MissionConfig) => {
const completedCount = mission.completedCount ?? 0;

return (
<div
key={mission.id}
className={`flex items-center p-6 rounded-2xl cursor-pointer${
mission.id > 2
? "bg-[#74859A]"
: mission.id < 3
? "bg-gray-000"
: completedCount > 0
? "bg-gray-700"
: ""
}`}
onClick={() => setSelectedMission(mission)}
>
<mission.icon className={`w-10 h-10 ${mission.color}`} />
<div className="ml-4">
<h2 className={`text-lg font-bold ${mission.color}`}>{mission.title}</h2>
<p className={`text-sm ${mission.color}`}>{mission.description}</p>
</div>
</div>
);
};

const pointsForNextChapter = currentChapter * 9;

if (!firstName) {
Expand Down Expand Up @@ -174,7 +202,7 @@ const MissionShell = ({
{/* Display tutorial mission when Chapter 1 is selected */}
{currentChapter === 1 && tutorialMission && !selectedMission && (
<div className="mt-6">
{renderMission(tutorialMission)}
{renderTutorialMission(tutorialMission)}
</div>
)}

Expand Down
2 changes: 1 addition & 1 deletion components/Structures/Missions/PickVehicle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const automatons: Vehicle[] = [
},
cost: 1,
quantity: 0,
},
}, //points also show storms/clouds
];

export default function PickAutomatonForPickPlanet({
Expand Down

0 comments on commit 212de34

Please sign in to comment.