Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
772bda4
feat: make map center,. zoom in, and zoom out buttons functional
ptrn23 Mar 23, 2026
31e6257
feat: use `react-google-maps` instead for zooming instead
ptrn23 Mar 23, 2026
a6a65e3
fix: unhide `zone-left` for mobile
ptrn23 Mar 23, 2026
d43d620
feat: create `Sidebar`
ptrn23 Mar 23, 2026
a663975
fix: snap top left buttons to bottom right when on mobile to reduce c…
ptrn23 Mar 23, 2026
7f68d05
chore: format `globals.css`
ptrn23 Mar 23, 2026
3b9d7b7
fix: use `nowrap` for meta values
ptrn23 Mar 23, 2026
fd70e3b
feat: auto-scroll for long meta values
ptrn23 Mar 23, 2026
2132cbc
fix: indicate "NO IMAGES AVAILABLE" for pins with no images uploaded yet
ptrn23 Mar 23, 2026
782ed72
fix: include `transit` in `TopBar`
ptrn23 Mar 23, 2026
2c2fa61
fix: adjust `search-block` to `zone-center`
ptrn23 Mar 23, 2026
f1a7293
fix: beautify pin verification status field
ptrn23 Mar 23, 2026
b1928ab
feat: add edit button
ptrn23 Mar 23, 2026
9d70b9f
fix: hide top left buttons and bottom right buttons when selecting a …
ptrn23 Mar 23, 2026
040253a
feat: create unified `pin-categories`
ptrn23 Mar 23, 2026
f91131a
refactor: use `pin-categories` for `TopBar`
ptrn23 Mar 23, 2026
456c1e1
refactor: use `pin-categories` for `ExpandedPinView`
ptrn23 Mar 23, 2026
5a04c55
refactor: use `pin-categories` for `PinDetailsCard`
ptrn23 Mar 23, 2026
304bfc8
refactor: use `pin-categories` for `NeonPin`
ptrn23 Mar 23, 2026
b5979fb
refactor: use CSS variables for a darker palette of pins
ptrn23 Mar 23, 2026
032fcdf
refactor: use dark pin palette for `AddPinModal`
ptrn23 Mar 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
313 changes: 217 additions & 96 deletions apps/web/app/globals.css

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { MapCursor } from "@/components/MapCursor";
import { TargetLine } from "@/components/TargetLine";
import { Polyline } from "@/components/Polyline";
import { Polygon } from "@/components/Polygon";
import { Sidebar } from "@/components/Sidebar";
import { JEEPNEY_ROUTES, CAMPUS_ZONES, ZONE_CATEGORIES } from "@/data/map-layers";
import { useState, useEffect, useRef, useMemo, useCallback } from "react";
import { useTheme } from "@/lib/ThemeContext";
Expand Down Expand Up @@ -69,6 +70,9 @@ export default function Home() {
});
}, []);

const mockUserLocation = { lat: 14.6549, lng: 121.0645 };
const mockHeading = 45;

const { theme } = useTheme();

const [pendingPinCoords, setPendingPinCoords] = useState<{
Expand Down Expand Up @@ -102,9 +106,6 @@ export default function Home() {
return () => window.removeEventListener("mousemove", handleMouseMove);
}, [isAddingPin]);

const mockUserLocation = { lat: 14.6549, lng: 121.0645 };
const mockHeading = 45;

return (
<APIProvider apiKey={process.env.NEXT_PUBLIC_GOOGLE_MAPS_KEY || ""}>
<main
Expand Down Expand Up @@ -237,6 +238,8 @@ export default function Home() {
onToggleRoute={handleToggleRoute}
activeZoneCategories={activeZoneCategories}
onToggleZoneCategory={handleToggleZoneCategory}
userLocation={mockUserLocation}
hideControls={!!selectedPinId}
/>

{/* TARGETING CROSSHAIR (Only visible when armed) */}
Expand Down Expand Up @@ -290,6 +293,11 @@ export default function Home() {
}}
/>

<Sidebar
isOpen={mode === "MENU"}
onClose={toggleMenu}
/>

{pendingPinCoords && (
<AddPinModal
coords={pendingPinCoords}
Expand Down
65 changes: 35 additions & 30 deletions apps/web/components/AddPinModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { useEffect } from "react";
import z from "zod";
import { fileSchema } from "@repo/api/schemas";
import { getPinColor } from "@/data/pin-categories";

type Pin = Omit<PinRouterInputs["userCreate"], "ownerId">;

Expand Down Expand Up @@ -129,29 +130,40 @@ export function AddPinModal({ coords, onSave, onCancel }: AddPinModalProps) {
</div>

<div className="input-group">
<span>PIN TYPES (select all that apply)</span>
<div className="type-selector">
{tagsData?.map((t) => (
<button
key={t.id}
type="button"
className={`type-btn ${tags.includes(t.id) ? "active" : ""}`}
onClick={() => {
if (tags.includes(t.id)) {
formMethods.setValue(
"tags",
tags.filter((tag) => tag !== t.id),
);
} else {
formMethods.setValue("tags", [...tags, t.id]);
}
}}
>
{t.title.toUpperCase()}
</button>
))}
</div>
</div>
<span>PIN TYPES (select all that apply)</span>
<div className="type-selector">
{tagsData?.map((t) => {
const isActive = tags.includes(t.id);
const tagColor = getPinColor(t.title);

return (
<button
key={t.id}
type="button"
className="type-btn"
onClick={() => {
if (isActive) {
formMethods.setValue(
"tags",
tags.filter((tag) => tag !== t.id),
);
} else {
formMethods.setValue("tags", [...tags, t.id]);
}
}}
style={isActive ? {
backgroundColor: `color-mix(in srgb, ${tagColor} 25%, transparent)`,
borderColor: tagColor,
color: tagColor,
boxShadow: `inset 0 0 10px color-mix(in srgb, ${tagColor} 40%, transparent)`
} : {}}
>
{t.title.toUpperCase()}
</button>
);
})}
</div>
</div>

<input
type="file"
Expand Down Expand Up @@ -269,13 +281,6 @@ export function AddPinModal({ coords, onSave, onCancel }: AddPinModalProps) {
color: var(--text-primary);
}

.type-btn.active {
background: rgba(0, 229, 255, 0.15);
border-color: var(--neon-blue, #00E5FF);
color: var(--neon-blue, #00E5FF);
box-shadow: inset 0 0 8px var(--shadow-glow);
}

.action-row {
display: flex;
gap: 12px;
Expand Down
Loading
Loading