Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b83c75c
add policies and data page, remove citing page, use pdf reviewer to d…
erinz2020 Jan 19, 2026
5a72df6
get param from url
erinz2020 Jan 20, 2026
8e4cb9b
Bump brace-expansion from 1.1.11 to 1.1.12 in /frontend
dependabot[bot] Sep 10, 2025
224460b
Bump http-proxy-middleware from 2.0.7 to 2.0.9 in /frontend
dependabot[bot] Apr 29, 2025
778c0ac
Bump lodash from 4.17.21 to 4.17.23 in /frontend
dependabot[bot] Jan 21, 2026
162db7f
Bump lodash-es from 4.17.21 to 4.17.23 in /frontend
dependabot[bot] Jan 21, 2026
31e8db6
Bump @babel/helpers from 7.23.9 to 7.27.0 in /frontend
dependabot[bot] Apr 1, 2025
9ec951e
Bump @babel/runtime from 7.25.9 to 7.27.0 in /frontend
dependabot[bot] Apr 1, 2025
651ff68
Bump on-headers and compression in /frontend
dependabot[bot] Jul 17, 2025
e7cffaa
Merge branch 'main' into 1132_policies_and_data
erinz2020 Jan 26, 2026
b07d2ac
i18n
erinz2020 Jan 26, 2026
7a9ea84
update headers
erinz2020 Jan 26, 2026
3211718
add links on login and report encounter page
erinz2020 Jan 26, 2026
a7990dd
add link on submit.jsp
erinz2020 Jan 26, 2026
6db68e9
fix path
erinz2020 Jan 26, 2026
a2a2f42
Merge branch 'main' into 1132_policies_and_data
erinz2020 Jan 27, 2026
498c5f8
Merge branch 'main' into 1132_policies_and_data
erinz2020 Jan 29, 2026
ba175ec
add flag to control show/hide how to photograph page
erinz2020 Feb 3, 2026
9eeaec3
add how to photograph page
erinz2020 Feb 3, 2026
d44a83f
update links
erinz2020 Feb 3, 2026
62ac8ec
i18n
erinz2020 Feb 3, 2026
4e31178
remove duplicate items
erinz2020 Feb 4, 2026
898d872
Merge branch 'main' into 1132_policies_and_data
erinz2020 Feb 4, 2026
0f1b140
update jsp header
erinz2020 Feb 12, 2026
ec3ec7c
update headers, switches, i18n
erinz2020 Feb 12, 2026
5568ac2
Merge branch 'main' into 1132_policies_and_data
erinz2020 Feb 12, 2026
bd04143
3rd header to update
erinz2020 Feb 12, 2026
f6c9899
Merge branch '1132_policies_and_data' of https://github.com/WildMeOrg…
erinz2020 Feb 12, 2026
3e1e812
oops forgot this page
erinz2020 Feb 12, 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
373 changes: 156 additions & 217 deletions frontend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"flow.js": "^0.2.6",
"google-map-react": "^2.2.1",
"js-cookie": "^3.0.5",
"lodash-es": "^4.17.21",
"lodash-es": "^4.17.23",
"mobx": "6.13.3",
"mobx-react-lite": "^4.0.7",
"moment": "^2.30.1",
Expand Down
Binary file added frontend/public/files/privacy_policy_en.pdf
Binary file not shown.
Binary file added frontend/public/files/terms_of_use_en.pdf
Binary file not shown.
12 changes: 10 additions & 2 deletions frontend/src/AuthenticatedSwitch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import NotFound from "./pages/errorPages/NotFound";
import AuthenticatedAppHeader from "./components/AuthenticatedAppHeader";
import Footer from "./components/Footer";
import useGetMe from "./models/auth/users/useGetMe";
import HowToPhotograph from "./pages/HowToPhotograph";
import AboutUs from "./pages/AboutUs";

// Lazy load pages
const Login = lazy(() => import("./pages/Login"));
Expand All @@ -13,7 +15,6 @@ const Home = lazy(() => import("./pages/Home"));
const EncounterSearch = lazy(
() => import("./pages/SearchPages/EncounterSearch"),
);
const Citation = lazy(() => import("./pages/Citation"));
const AdminLogs = lazy(() => import("./pages/AdminLogs"));
const ReportEncounter = lazy(
() => import("./pages/ReportsAndManagamentPages/ReportEncounter"),
Expand All @@ -29,10 +30,14 @@ const BulkImport = lazy(() => import("./pages/BulkImport/BulkImport"));
const BulkImportTask = lazy(() => import("./pages/BulkImport/BulkImportTask"));

const Encounter = lazy(() => import("./pages/Encounter/Encounter"));
const PoliciesAndData = lazy(
() => import("./pages/PoliciesAndData/PoliciesAndData"),
);

export default function AuthenticatedSwitch({
showclassicsubmit,
showClassicEncounterSearch,
showHowToPhotograph,
}) {
const { data } = useGetMe();
const username = data?.username;
Expand All @@ -57,6 +62,7 @@ export default function AuthenticatedSwitch({
avatar={avatar}
showclassicsubmit={showclassicsubmit}
showClassicEncounterSearch={showClassicEncounterSearch}
showHowToPhotograph={showHowToPhotograph}
/>
</div>

Expand All @@ -73,7 +79,9 @@ export default function AuthenticatedSwitch({
<Suspense fallback={<div>Loading...</div>}>
<Routes>
<Route path="/profile" element={<Profile />} />
<Route path="/citation" element={<Citation />} />
<Route path="/policies-and-data" element={<PoliciesAndData />} />
<Route path="/how-to-photograph" element={<HowToPhotograph />} />
<Route path="/about-us" element={<AboutUs />} />
<Route path="/projects/overview" element={<ProjectList />} />
<Route path="/home" element={<Home />} />
<Route path="/report" element={<ReportEncounter />} />
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/FrontDesk.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function FrontDesk() {
const { data } = useGetSiteSettings();
const showclassicsubmit = data?.showClassicSubmit;
const showClassicEncounterSearch = data?.showClassicEncounters;
const showHowToPhotograph = data?.showHowToPhotograph;
const checkLoginStatus = () => {
axios
.head("/api/v3/user")
Expand Down Expand Up @@ -103,6 +104,7 @@ export default function FrontDesk() {
<AuthenticatedSwitch
showclassicsubmit={showclassicsubmit}
showClassicEncounterSearch={showClassicEncounterSearch}
showHowToPhotograph={showHowToPhotograph}
/>
</AuthContext.Provider>
);
Expand All @@ -111,7 +113,10 @@ export default function FrontDesk() {
return (
<AuthContext.Provider value={{ isLoggedIn }}>
<GoogleTagManager />
<UnauthenticatedSwitch showclassicsubmit={showclassicsubmit} />
<UnauthenticatedSwitch
showclassicsubmit={showclassicsubmit}
showHowToPhotograph={showHowToPhotograph}
/>
</AuthContext.Provider>
);
}
18 changes: 14 additions & 4 deletions frontend/src/UnAuthenticatedSwitch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@ import { Routes, Route, Navigate, useLocation } from "react-router-dom";
import Footer from "./components/Footer";
import UnAuthenticatedAppHeader from "./components/UnAuthenticatedAppHeader";
import EncounterPageViewOnly from "./pages/Encounter/EncounterPageViewOnly";
import PoliciesAndData from "./pages/PoliciesAndData/PoliciesAndData";
import HowToPhotograph from "./pages/HowToPhotograph";
import AboutUs from "./pages/AboutUs";

// Lazy load pages
const Login = lazy(() => import("./pages/Login"));
const Unauthorized = lazy(() => import("./pages/errorPages/Unauthorized"));
const Citation = lazy(() => import("./pages/Citation"));
const ReportEncounter = lazy(
() => import("./pages/ReportsAndManagamentPages/ReportEncounter"),
);
const ReportConfirm = lazy(
() => import("./pages/ReportsAndManagamentPages/ReportConfirm"),
);

export default function UnAuthenticatedSwitch({ showclassicsubmit }) {
export default function UnAuthenticatedSwitch({
showclassicsubmit,
showHowToPhotograph,
}) {
const [header, setHeader] = React.useState(true);
const location = useLocation();

Expand All @@ -35,7 +40,10 @@ export default function UnAuthenticatedSwitch({ showclassicsubmit }) {
backgroundColor: "#303336",
}}
>
<UnAuthenticatedAppHeader showclassicsubmit={showclassicsubmit} />
<UnAuthenticatedAppHeader
showclassicsubmit={showclassicsubmit}
showHowToPhotograph={showHowToPhotograph}
/>
</div>

{/* Main Content */}
Expand All @@ -55,7 +63,9 @@ export default function UnAuthenticatedSwitch({ showclassicsubmit }) {
element={<Unauthorized setHeader={setHeader} />}
/>
<Route path="/encounter" element={<EncounterPageViewOnly />} />
<Route path="/citation" element={<Citation />} />
<Route path="/policies-and-data" element={<PoliciesAndData />} />
<Route path="/about-us" element={<AboutUs />} />
<Route path="/how-to-photograph" element={<HowToPhotograph />} />
<Route path="/report" element={<ReportEncounter />} />
<Route path="/reportConfirm" element={<ReportConfirm />} />
<Route path="/login" element={<Login />} />
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/AuthenticatedAppHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function AuthenticatedAppHeader({
avatar,
showclassicsubmit,
showClassicEncounterSearch,
showHowToPhotograph,
}) {
const { visible } = useContext(FooterVisibilityContext);

Expand Down Expand Up @@ -77,6 +78,7 @@ export default function AuthenticatedAppHeader({
username={username}
showclassicsubmit={showclassicsubmit}
showClassicEncounterSearch={showClassicEncounterSearch}
showHowToPhotograph={showHowToPhotograph}
/>
</Nav>
<HeaderQuickSearch />
Expand Down
56 changes: 23 additions & 33 deletions frontend/src/components/UnAuthenticatedAppHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@ import { FormattedMessage } from "react-intl";
import FooterVisibilityContext from "../FooterVisibilityContext";
import Logo from "./svg/Logo";

export default function AuthenticatedAppHeader({ showclassicsubmit }) {
const { visible } = useContext(FooterVisibilityContext);
const [dropdownShows, setDropdownShows] = useState({
dropdown1: false,
dropdown2: false,
dropdown3: false,
});
const [dropdownBorder, setDropdownBorder] = useState("2px solid transparent");
import HeaderDropdownItems from "./header/HeaderDropdownItems";

const handleMouseEnter = (id) => {
setDropdownShows((prev) => ({ ...prev, [id]: true }));
setDropdownBorder((prev) => ({ ...prev, [id]: "2px solid white" }));
};
export default function UnAuthenticatedAppHeader({
showclassicsubmit,
showHowToPhotograph,
}) {
const { visible } = useContext(FooterVisibilityContext);
const [dropdownShows, setDropdownShows] = useState({});
const [dropdownBorder, setDropdownBorder] = useState({});

const handleMouseLeave = (id) => {
setDropdownShows((prev) => ({ ...prev, [id]: false }));
setDropdownBorder((prev) => ({ ...prev, [id]: "2px solid transparent" }));
const handleMouseEnterLeave = (id, isEnter) => {
setDropdownShows((prev) => ({ ...prev, [id]: isEnter }));
setDropdownBorder((prev) => ({
...prev,
[id]: isEnter ? "2px solid white" : "2px solid transparent",
}));
};

return (
Expand Down Expand Up @@ -59,12 +58,11 @@ export default function AuthenticatedAppHeader({ showclassicsubmit }) {
<Navbar.Brand
className="d-flex flex-row align-items-center"
href="/"
style={{}}
>
<Logo />
{process.env.SITE_NAME}
</Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" style={{}} />
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav
className="mr-auto"
Expand All @@ -73,7 +71,10 @@ export default function AuthenticatedAppHeader({ showclassicsubmit }) {
marginLeft: "auto",
}}
>
{unAuthenticatedMenu(showclassicsubmit).map((item, idx) => (
{unAuthenticatedMenu(
showclassicsubmit,
showHowToPhotograph,
).map((item, idx) => (
<Nav key={idx} className="me-auto">
<NavDropdown
title={
Expand All @@ -84,7 +85,7 @@ export default function AuthenticatedAppHeader({ showclassicsubmit }) {
<DownIcon />
</span>
}
id={`basic-nav-dropdown${item}`}
id={`basic-nav-dropdown${idx}`}
style={{
color: "white",
boxSizing: "border-box",
Expand All @@ -95,24 +96,14 @@ export default function AuthenticatedAppHeader({ showclassicsubmit }) {
paddingRight: 5,
}}
onMouseEnter={() =>
handleMouseEnter(`dropdown${idx + 1}`)
handleMouseEnterLeave(`dropdown${idx + 1}`, true)
}
onMouseLeave={() =>
handleMouseLeave(`dropdown${idx + 1}`)
handleMouseEnterLeave(`dropdown${idx + 1}`, false)
}
show={dropdownShows[`dropdown${idx + 1}`]}
>
{Object.values(item)[0].map((subItem) => {
return (
<NavDropdown.Item
key={subItem.name}
href={subItem.href}
style={{ color: "black", fontSize: "0.9rem" }}
>
{subItem.name}
</NavDropdown.Item>
);
})}
<HeaderDropdownItems items={Object.values(item)[0]} />
</NavDropdown>
</Nav>
))}
Expand All @@ -128,7 +119,6 @@ export default function AuthenticatedAppHeader({ showclassicsubmit }) {
width: "100px",
whiteSpace: "nowrap",
padding: 5,
// marginRight: "10%",
}}
href={`${process.env.PUBLIC_URL}/login`}
>
Expand Down
85 changes: 85 additions & 0 deletions frontend/src/components/header/HeaderDropdownItems.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import React, { useState } from "react";
import { NavDropdown } from "react-bootstrap";
import RightIcon from "../svg/RightIcon";

export default function HeaderDropdownItems({
items,
dropdownItemStyle = { color: "black", fontSize: "0.9rem" },
dropdownTitleLinkStyle = {
color: "black",
fontSize: "0.9rem",
textDecoration: "none",
},
}) {
const [openSubKey, setOpenSubKey] = useState(null);
const [subBg, setSubBg] = useState({});

return items.map((subItem, subIndex) => {
const key = subItem.href || `menu-item-${subIndex}`;
const hasSub = Array.isArray(subItem.sub) && subItem.sub.length > 0;
const subKey = `${key}__sub`;

if (!hasSub) {
return (
<NavDropdown.Item
key={key}
href={subItem.href}
style={dropdownItemStyle}
>
{subItem.name}
</NavDropdown.Item>
);
}

return (
<NavDropdown
key={subKey}
className="header-dropdown"
title={
<a
style={dropdownTitleLinkStyle}
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
window.location.href = subItem.href;
}}
href={subItem.href}
>
{subItem.name}
<span style={{ paddingLeft: "34px" }}>
<RightIcon />
</span>
</a>
}
drop="end"
style={{
paddingLeft: 8,
fontSize: "0.9rem",
backgroundColor: subBg[subKey] || "transparent",
}}
onMouseEnter={() => {
setSubBg((prev) => ({ ...prev, [subKey]: "#CCF0FF" }));
setOpenSubKey(subKey);
}}
onMouseLeave={() => {
setSubBg((prev) => ({ ...prev, [subKey]: "white" }));
setOpenSubKey(null);
}}
show={openSubKey === subKey}
>
{subItem.sub.map((leaf, leafIndex) => {
const leafKey = leaf.href || `${subKey}-leaf-${leafIndex}`;
return (
<NavDropdown.Item
key={leafKey}
href={leaf.href}
style={dropdownItemStyle}
>
{leaf.name}
</NavDropdown.Item>
);
})}
</NavDropdown>
);
});
}
Loading
Loading