Refactor made changes to file structures
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
|
||||
.idea/
|
||||
Generated
-136
@@ -1,136 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e601b4a6-af0f-4558-b267-11e152fb4728" name="Changes" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/client/src/components/SettingsButton.jsx" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/client/src/store/useDashboardStore.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/client/package-lock.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/client/package.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/App.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/App.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/CanvasComponents/AlertLevelWidget.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Widgets/AlertLevelWidget.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/CanvasComponents/FirstWidgetButton.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Canvas/CanvasComponents/FirstWidgetButton.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/CanvasComponents/SettingsButton.jsx" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/CanvasComponents/Widget.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Widgets/Widget.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/CanvasComponents/WidgetMenu.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Canvas/CanvasComponents/WidgetMenu.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/views/Admin.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Canvas/views/Admin.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/views/Home.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Canvas/views/Home.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/views/HomeTabs/MyDashboard.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Canvas/views/HomeTabs/MyDashboard.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/components/Canvas/views/Volcano.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Canvas/views/Volcano.jsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/constants/widgetRegistry.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/constants/widgetRegistry.jsx" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 7,
|
||||
"fromUser": false
|
||||
}</component>
|
||||
<component name="ProjectId" id="3Cm41UmuQbyMzWIumGVSngrYAr7" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||
"codeWithMe.voiceChat.enabledByDefault": "false",
|
||||
"git-widget-placeholder": "20260605__1123__Hight__updates",
|
||||
"javascript.preferred.runtime.type.id": "node",
|
||||
"last_opened_file_path": "/Users/chight/Documents/Development/website-framework",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"npm.build.executor": "Run",
|
||||
"npm.dev.executor": "Run",
|
||||
"ts.external.directory.path": "/Users/chight/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/client/src/components/Widgets" />
|
||||
<recent name="$PROJECT_DIR$/client/src/components" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration name="dev" type="js.build_tools.npm" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/client/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="dev" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-js-predefined-d6986cc7102b-3bd3a6803838-JavaScript-WS-261.22158.274" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="e601b4a6-af0f-4558-b267-11e152fb4728" name="Changes" comment="" />
|
||||
<created>1776977196451</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1776977196451</updated>
|
||||
<workItem from="1776977197454" duration="13121000" />
|
||||
<workItem from="1777909177585" duration="1804000" />
|
||||
<workItem from="1779808433040" duration="66743000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="RECENT_FILTERS">
|
||||
<map>
|
||||
<entry key="Branch">
|
||||
<value>
|
||||
<list>
|
||||
<RecentGroup>
|
||||
<option name="FILTER_VALUES">
|
||||
<option value="authentication" />
|
||||
</option>
|
||||
</RecentGroup>
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State>
|
||||
<option name="FILTERS">
|
||||
<map>
|
||||
<entry key="branch">
|
||||
<value>
|
||||
<list>
|
||||
<option value="authentication" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
+10
-10
@@ -2,16 +2,16 @@ import 'leaflet/dist/leaflet.css';
|
||||
import { Routes, Route, Navigate, Outlet } from 'react-router-dom';
|
||||
import { useRecipe, Grid, GridItem, useDialog, Flex, Heading } from "@chakra-ui/react";
|
||||
import { createContext } from "react";
|
||||
import Login from "@/Login.jsx";
|
||||
import Sidebar from "./components/Sidebar/Sidebar.jsx";
|
||||
import DialogPopup from "@/components/Canvas/CanvasComponents/DialogPopup.jsx";
|
||||
import Header from "@/components/Header/Header.jsx";
|
||||
import Home from "./components/Canvas/views/Home.jsx";
|
||||
import RegionalMap from "./components/Canvas/views/RegionalMap.jsx";
|
||||
import Volcano from "@/components/Canvas/views/Volcano.jsx";
|
||||
import GlobalMap from "./components/Canvas/views/GlobalMap.jsx";
|
||||
import Admin from "./components/Canvas/views/Admin.jsx";
|
||||
import MyDashboard from "./components/Canvas/views/HomeTabs/MyDashboard.jsx";
|
||||
import Login from "@/pages/auth/Login.jsx";
|
||||
import Sidebar from "./components/layout/Sidebar.jsx";
|
||||
import DialogPopup from "@/components/dashboard/DialogPopup.jsx";
|
||||
import Header from "@/components/layout/Header.jsx";
|
||||
import Home from "./pages/home/Home.jsx";
|
||||
import RegionalMap from "./pages/maps/RegionalMap.jsx";
|
||||
import Volcano from "@/pages/volcano/Volcano.jsx";
|
||||
import GlobalMap from "./pages/maps/GlobalMap.jsx";
|
||||
import Admin from "./pages/admin/Admin.jsx";
|
||||
import MyDashboard from "./pages/home/tabs/MyDashboard.jsx";
|
||||
|
||||
function AppFoundation() {
|
||||
const recipe = useRecipe({ key: "dashboard" });
|
||||
|
||||
+5
-5
@@ -13,21 +13,21 @@ import {
|
||||
HStack
|
||||
} from "@chakra-ui/react";
|
||||
import { Settings, Plus, LayoutGrid, Move, Save, X } from 'lucide-react';
|
||||
import { useDashboardStore } from "../store/useDashboardStore.jsx";
|
||||
import { WIDGET_REGISTRY } from "../constants/widgetRegistry.jsx";
|
||||
import { useDashboardStore } from "../../store/useDashboardStore.jsx";
|
||||
import { WIDGET_REGISTRY } from "../../constants/widgetRegistry.jsx";
|
||||
|
||||
export function SettingsButton() {
|
||||
// 1. ☁️ Store connections
|
||||
// 1. ☁Store connections
|
||||
const isEditing = useDashboardStore(state => state.isEditing);
|
||||
const enterEditMode = useDashboardStore(state => state.enterEditMode);
|
||||
const saveEdit = useDashboardStore(state => state.saveEdit);
|
||||
const cancelEdit = useDashboardStore(state => state.cancelEdit);
|
||||
const addWidget = useDashboardStore(state => state.addWidget);
|
||||
|
||||
// 2. 🎛️ Local state to control the Widget Library popup independently of the dropdown
|
||||
// 2. Local state to control the Widget Library popup independently of the dropdown
|
||||
const [isLibraryOpen, setIsLibraryOpen] = useState(false);
|
||||
|
||||
// 3. 🧠 Categorize widgets for the tabs
|
||||
// 3. Categorize widgets for the tabs
|
||||
const categorizedWidgets = useMemo(() => {
|
||||
return Object.entries(WIDGET_REGISTRY).reduce((acc, [id, widget]) => {
|
||||
const cat = widget.category || 'General';
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
import { Box, Menu, Portal } from '@chakra-ui/react'
|
||||
import WidgetMenu from './WidgetMenu';
|
||||
import AlertLevel from "@/components/Widgets/AlertLevelWidget.jsx";
|
||||
|
||||
export default function FirstWidgetButton({ appendWidget }) {
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { Menu, Portal } from "@chakra-ui/react";
|
||||
import AlertLevel from "../../Widgets/AlertLevelWidget.jsx";
|
||||
import AlertLevel from "../Widgets/AlertLevelWidget.jsx";
|
||||
|
||||
export default function WidgetMenu({appendWidget, triggerItem, positioning}) {
|
||||
return (
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import { useSlotRecipe, Box, Button, IconButton } from "@chakra-ui/react";
|
||||
import { ColorModeButton } from "@/components/ui/color-mode";
|
||||
import { ColorModeButton } from "@/components/ui/color-mode.jsx";
|
||||
import { useState } from "react";
|
||||
import { NavLink } from "react-router-dom";
|
||||
import Tooltip from "../Canvas/CanvasComponents/Tooltip.jsx";
|
||||
import Tooltip from "../ui/Tooltip.jsx";
|
||||
import { Mountain, House, Earth, MapPin, ShieldUser, Menu } from 'lucide-react';
|
||||
|
||||
const SIDEBAR_DEFAULT_BUTTONS = [
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Flex, Tabs, HStack } from '@chakra-ui/react';
|
||||
import { MEDataEntry } from './AdminTabs/MEDataEntry';
|
||||
import { ProjectCollector } from './AdminTabs/ProjectCollector';
|
||||
import { NASApplication } from './AdminTabs/NASApplication';
|
||||
import { IVANS } from './AdminTabs/IVANS'
|
||||
import { SearchBar } from "../CanvasComponents/SearchBar";
|
||||
import { SettingsButton } from "../../SettingsButton.jsx";
|
||||
import { CanvasHeaderTabs } from '../CanvasComponents/CanvasHeaderTabs';
|
||||
import { ADMIN_TABS } from '@/constants/viewKeys';
|
||||
import { MEDataEntry } from './tabs/MEDataEntry.jsx';
|
||||
import { ProjectCollector } from './tabs/ProjectCollector.jsx';
|
||||
import { NASApplication } from './tabs/NASApplication.jsx';
|
||||
import { IVANS } from './tabs/IVANS.jsx'
|
||||
import { SearchBar } from "../../components/dashboard/SearchBar.jsx";
|
||||
import { SettingsButton } from "../../components/dashboard/SettingsButton.jsx";
|
||||
import { CanvasHeaderTabs } from '../../components/dashboard/CanvasHeaderTabs.jsx';
|
||||
import { ADMIN_TABS } from '@/constants/viewKeys.js';
|
||||
|
||||
// TODO - refactor this. Currently Admin doesn't use onEditWidgets or appendWidget
|
||||
export default function Admin({ view, onChangeView, onEditWidgets, appendWidget }) {
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { useState } from 'react';
|
||||
import { Box, Button, ButtonGroup, Text, Input, List, Field, Stack, SimpleGrid, HStack, Table, Checkbox, createListCollection } from "@chakra-ui/react"
|
||||
import DropDownMenu from "../../CanvasComponents/DropDownMenu"
|
||||
import DropDownMenu from "../../../components/dashboard/DropDownMenu.jsx"
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
const startYear = 1970;
|
||||
@@ -1,7 +1,7 @@
|
||||
import { HStack, Flex, Box } from "@chakra-ui/react";
|
||||
import { NavLink, Outlet, useLocation } from "react-router-dom";
|
||||
import { SearchBar } from "../CanvasComponents/SearchBar";
|
||||
import { SettingsButton } from "../../SettingsButton.jsx";
|
||||
import { SearchBar } from "../../components/dashboard/SearchBar.jsx";
|
||||
import { SettingsButton } from "../../components/dashboard/SettingsButton.jsx";
|
||||
|
||||
export default function Home() {
|
||||
const location = useLocation();
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet";
|
||||
import MapButtonControls from "../CanvasComponents/MapButtonControls";
|
||||
import MapSettingsButton from "../CanvasComponents/MapSettingsButton";
|
||||
import MapButtonControls from "../../components/maps/MapButtonControls.jsx";
|
||||
import MapSettingsButton from "../../components/maps/MapSettingsButton.jsx";
|
||||
|
||||
export default function GlobalMap() {
|
||||
const position = [45.61142478054226, -122.49630033167544]; // [latitude, longitude]
|
||||
+9
-9
@@ -1,14 +1,14 @@
|
||||
import { Box, Text, Heading, DataList, Flex, HStack, Tabs } from '@chakra-ui/react';
|
||||
import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet";
|
||||
import { CanvasHeaderTabs } from '../CanvasComponents/CanvasHeaderTabs';
|
||||
import { VOLCANO_TABS } from '@/constants/viewKeys';
|
||||
import { VolcanoHome } from './VolcanoTabs/VolcanoHome';
|
||||
import { PartnerData } from './VolcanoTabs/PartnerData';
|
||||
import { Reports } from './VolcanoTabs/Reports';
|
||||
import { OfficialInstitutions } from './VolcanoTabs/OfficialInstitutions';
|
||||
import { SocialMedia } from './VolcanoTabs/SocialMedia';
|
||||
import { SearchBar } from "../CanvasComponents/SearchBar";
|
||||
import { SettingsButton } from "../../SettingsButton.jsx";
|
||||
import { CanvasHeaderTabs } from '../../components/dashboard/CanvasHeaderTabs.jsx';
|
||||
import { VOLCANO_TABS } from '@/constants/viewKeys.js';
|
||||
import { VolcanoHome } from './tabs/VolcanoHome.jsx';
|
||||
import { PartnerData } from './tabs/PartnerData.jsx';
|
||||
import { Reports } from './tabs/Reports.jsx';
|
||||
import { OfficialInstitutions } from './tabs/OfficialInstitutions.jsx';
|
||||
import { SocialMedia } from './tabs/SocialMedia.jsx';
|
||||
import { SearchBar } from "../../components/dashboard/SearchBar.jsx";
|
||||
import { SettingsButton } from "../../components/dashboard/SettingsButton.jsx";
|
||||
|
||||
export default function Volcano() {
|
||||
return (
|
||||
Reference in New Issue
Block a user