Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0094839
added and initialized three.js
Apr 29, 2022
3e79c6d
added sphere with contorls and net on it (wireframe)
Apr 29, 2022
1dbf5eb
fixed issues with main
Apr 29, 2022
2c88d96
added coordinates and word components, but there is context loss in w…
Apr 29, 2022
d1fd7f1
added link to source in Coordinates component
Apr 30, 2022
19f6861
added arc 3d function
Apr 30, 2022
e987771
added SpherePath component
Apr 30, 2022
d769f4c
added 15-af.pmd path (slightly reinfoced: changed M050 IStrat from -1…
May 1, 2022
3b5c5d4
added custom spherical points component
May 1, 2022
0e61519
merged with main
May 1, 2022
8f1a92b
added theme mode to sphere (changing sphere net color by theme)
May 1, 2022
ac87597
added pmtools logo
May 3, 2022
ce21c1e
modified logo and dynamicLogo; added about text (raw)
May 3, 2022
a07fd51
divided MainPage and App
May 4, 2022
65da53c
created new components file structure
May 4, 2022
0dbd943
modified MainPage part 1
May 4, 2022
020096d
added new navPanel but with problem with svg files
May 4, 2022
0cafe31
added new navPanel with fixed logo (png with high quality)
May 4, 2022
e3b179d
fixed currentPage for AppSettings; changed scrollbar style
May 5, 2022
ebf981f
added About component with Start button
May 6, 2022
c08ddd4
merged with updated main
May 7, 2022
d4bd3e1
again changed scroll
May 7, 2022
d51e48c
added Description component
May 7, 2022
ae60481
added theme and language buttons to NavPanel
May 7, 2022
ab73e73
added featuresCards
May 10, 2022
e3f5ded
changed raw assets
May 10, 2022
bbbffcd
deleted raw assets for features
May 10, 2022
ff9e07d
added footer
May 10, 2022
4ced4b8
changed navPanel 'references' to 'authors and references', merged wit…
May 10, 2022
06a0c52
changed images to small size versions
May 11, 2022
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
1,169 changes: 751 additions & 418 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@react-three/drei": "^8.20.2",
"@react-three/fiber": "^7.0.26",
"@reduxjs/toolkit": "^1.7.1",
"@svgr/webpack": "^6.2.1",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
Expand Down Expand Up @@ -68,6 +69,7 @@
"devDependencies": {
"@types/deep-equal": "^1.0.1",
"@types/three": "^0.139.0",
"file-loader": "^6.2.0",
"sass": "^1.51.0"
}
}
12 changes: 7 additions & 5 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import styles from './App.module.scss';
import { Route, Routes } from 'react-router-dom';
import Layout from '../Layout/Layout';
import { MainPage, DIRPage, PCAPage, NotFoundPage } from '../../pages';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import { useAppSelector } from '../../services/store/hooks';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import { MainPageLayout, AppLayout } from '../Layouts';
import { MainPage, DIRPage, PCAPage, NotFoundPage } from '../../pages';

function App() {

Expand All @@ -19,12 +19,14 @@ function App() {
return (
<ThemeProvider theme={theme}>
<Routes>
<Route path='/' element={<Layout />}>
<Route path='/' element={<MainPageLayout />}>
<Route index element={<MainPage />}/>
</Route>
<Route path='/app' element={<AppLayout />}>
<Route path='pca' element={<PCAPage />}/>
<Route path='dir' element={<DIRPage />}/>
<Route path='*' element={<NotFoundPage />}/>
</Route>
<Route path='*' element={<NotFoundPage />}/>
</Routes>
</ThemeProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import getInterpretationIDs from "../../../utils/graphs/formatters/getInterpreta
import CoordinateSystem from "../../Sub/Graphs/CoordinateSystem/CoordinateSystem";
import dataToStereoDIR from "../../../utils/graphs/formatters/stereo/dataToStereoDIR";

export interface IStereoGraph extends IGraph {
export interface IStereoGraphDIR extends IGraph {
data: IDirData;
};

const StereoGraphDIR: FC<IStereoGraph> = ({ graphId, width, height, data }) => {
const StereoGraphDIR: FC<IStereoGraphDIR> = ({ graphId, width, height, data }) => {

// ToDo:
// 1. менять viewBox в зависимости от размера группы data (horizontal-data + vertical-data) || STOPPED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import CoordinateSystem from "../../Sub/Graphs/CoordinateSystem/CoordinateSystem
import dataToStereoDIR from "../../../utils/graphs/formatters/stereo/dataToStereoDIR";
import dataToStereoVGP from "../../../utils/graphs/formatters/stereo/dataToStereoVGP";

export interface IStereoGraph extends IGraph {
export interface IStereoGraphVGP extends IGraph {
data: VGPData;
};

const StereoGraphVGP: FC<IStereoGraph> = ({ graphId, width, height, data }) => {
const StereoGraphVGP: FC<IStereoGraphVGP> = ({ graphId, width, height, data }) => {

// ToDo:
// 1. менять viewBox в зависимости от размера группы data (horizontal-data + vertical-data) || STOPPED
Expand Down
19 changes: 19 additions & 0 deletions src/components/AppGraphs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import MagGraph from "./MagGraph/MagGraph";
import StereoGraph from "./StereoGraph/StereoGraph";
import ZijdGraph from "./ZijdGraph/ZijdGraph";
import StereoGraphDIR from "./StereoGraphDIR/StereoGraphDIR";
import StereoGraphVGP from "./StereoGraphDIR/StereoGraphVGP";

import { IZijdGraph } from "./ZijdGraph/ZijdGraph";
import { IStereoGraph } from "./StereoGraph/StereoGraph";
import { IMagGraph } from "./MagGraph/MagGraph";

export {
MagGraph,
StereoGraph,
ZijdGraph,
StereoGraphDIR,
StereoGraphVGP,
};

export type { IZijdGraph, IStereoGraph, IMagGraph };
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ const AppNavigation: FC = ({}) => {
<div className={styles.navButtons}>
<NavButton
label={isSmallScreen ? 'PCA' : 'Магнитные чистки (PCA)'}
to={'pca'}
to={'/app/pca'}
/>
<NavButton
label={isSmallScreen ? 'DIR' : 'Статистика направлений (DIR)'}
to={'dir'}
to={'/app/dir'}
/>
<NavButton
label={'Репозиторий проекта'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useWindowSize } from '../../../../utils/GlobalHooks';
import GraphsSkeleton from './GraphsSkeleton';
import { FoldTestResult, IDirData } from '../../../../utils/GlobalTypes';
import { foldTestBootstrap } from '../../../../utils/statistics/PMTests';
import FoldTestGraph from '../../../Graph/FoldTestGraph/FoldTestGraph';
import FoldTestGraph from '../../../AppGraphs/FoldTestGraph/FoldTestGraph';
import { Button, Typography } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styles from './VGP.module.scss';
import { useWindowSize } from '../../../utils/GlobalHooks';
import { VGPData } from '../../../utils/GlobalTypes';
import GraphsSkeleton from './GraphsSkeleton';
import StereoGraphVGP from '../../../components/Graph/StereoGraphDIR/StereoGraphVGP';
import { StereoGraphVGP } from '../../AppGraphs';
import { useAppDispatch, useAppSelector } from "../../../services/store/hooks";

// interface IGraphs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import StatisticsDataTableDIR from "./DataTablesDIR/StatisticsDataTable/Statisti
import ToolsPMD from "./ToolsPMD/ToolsPMD";
import ToolsDIR from "./ToolsDIR/ToolsDIR";

import DynamicLogo from "./DynamicLogo/DynamicLogo";

export {
AppSettings,
AppNavigation,
Expand All @@ -20,5 +18,4 @@ export {
StatisticsDataTableDIR,
ToolsPMD,
ToolsDIR,
DynamicLogo,
};
9 changes: 0 additions & 9 deletions src/components/Graph/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
import React, { FC, useCallback, useEffect, useState } from "react";
import styles from "./Layout.module.scss";
import React, { FC, useCallback } from "react";
import styles from "./AppLayout.module.scss";
import { Outlet, RouteProps, useLocation, } from "react-router-dom";
import { AppSettings, AppNavigation } from "../Main";
import { useAppDispatch } from "../../../services/store/hooks";
import { addDirStatFiles, addTreatmentFiles } from "../../../services/reducers/files";
import { AppSettings, AppNavigation } from "../../AppLogic";
import { useDropzone } from "react-dropzone";
import { useTheme } from '@mui/material/styles';
import {
bgColorMain,
bgColorBlocks,
boxShadowStyle,
textColor
} from '../../utils/ThemeConstants';
import { useAppDispatch } from "../../services/store/hooks";
import { addDirStatFiles, addInputFiles, addTreatmentFiles, setDirStatFiles, setInputFiles, setTreatmentFiles } from "../../services/reducers/files";
import { useDropzone } from "react-dropzone";
} from '../../../utils/ThemeConstants';

const Layout: FC<RouteProps> = () => {
const AppLayout: FC<RouteProps> = () => {

const dispatch = useAppDispatch();
const location = useLocation();
const theme = useTheme();
const currentPage = location.pathname.slice(1, location.pathname.length);
const currentPage = location.pathname.split('/').pop() || location.pathname;

const handleFileUpload = (event: any, files?: Array<File>) => {;
const acceptedFiles = files ? files : Array.from(event.currentTarget.files);
if (currentPage === 'pca') dispatch(addTreatmentFiles(acceptedFiles));
if (currentPage === 'dir') dispatch(addDirStatFiles(acceptedFiles));
// dispatch(addInputFiles(acceptedFiles));
};

const onDrop = useCallback(acceptedFiles => {
Expand Down Expand Up @@ -98,4 +97,4 @@ const Layout: FC<RouteProps> = () => {
);
};

export default Layout;
export default AppLayout;
16 changes: 16 additions & 0 deletions src/components/Layouts/MainPageLayout/MainPageLayout.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.container {
position: relative;

width: 100%;
height: 100%;

display: flex;
flex-direction: column;

overflow-y: auto !important;
}

::-webkit-scrollbar {
width: 8px;
height: 8px;
}
28 changes: 28 additions & 0 deletions src/components/Layouts/MainPageLayout/MainPageLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React, { FC } from "react";
import styles from "./MainPageLayout.module.scss";
import { Outlet, RouteProps } from "react-router-dom";
import { useTheme } from '@mui/material/styles';
import {
bgColorMain,
bgColorBlocks,
boxShadowStyle,
textColor
} from '../../../utils/ThemeConstants';

const MainPageLayout: FC<RouteProps> = () => {

const theme = useTheme();

return (
<div
className={`${styles.container} ${styles[theme.palette.mode]}`}
style={{
backgroundColor: bgColorMain(theme.palette.mode),
}}
>
<Outlet />
</div>
);
};

export default MainPageLayout;
7 changes: 7 additions & 0 deletions src/components/Layouts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import MainPageLayout from "./MainPageLayout/MainPageLayout";
import AppLayout from "./AppLayout/AppLayout";

export {
MainPageLayout,
AppLayout,
};
9 changes: 9 additions & 0 deletions src/components/MainPage/About/About.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.container {
padding: 0 24px;
margin-bottom: 24px;

display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
45 changes: 45 additions & 0 deletions src/components/MainPage/About/About.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

import React from 'react';
import styles from './About.module.scss';
import { Typography, Button } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import { textColor } from '../../../utils/ThemeConstants';
import { NavLink } from 'react-router-dom';

const About = () => {

const theme = useTheme();

return (
<div className={styles.container}>
<Typography variant='h3' color={textColor(theme.palette.mode)} textAlign='center' mb='16px'>
Работайте с результатами палеомагнитных исследований.
</Typography>
<Typography variant='h4' color={textColor(theme.palette.mode)} textAlign='center' mb='16px'>
В любое время, в любом месте, с любого устройства.
</Typography>
<Typography variant='h4' color={textColor(theme.palette.mode)} textAlign='center'>
И не беспокойтесь о защите данных.
</Typography>

<NavLink to={'/app/pca'} style={{textDecoration: 'none'}}>
<Button
variant="contained"
color="primary"
sx={{
textTransform: 'none',
fontSize: '18px',
borderRadius: '4px',
padding: '8px 24px',
width: 'fit-content',
mt: '42px',
}}
>
Приступить к работе
</Button>
</NavLink>
</div>
);
};

export default About;
71 changes: 71 additions & 0 deletions src/components/MainPage/Description/Description.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.container {
position: relative;
padding: 72px 240px 52px 240px;
margin: 48px 0;

display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.tabs {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;

width: 100%;
min-height: 120px;
}

.icon {
position: absolute;
top: -60px;
left: calc(50% - 36px);

width: 72px;
height: 72px;

display: flex;
justify-content: center;
align-items: center;

border-radius: 12px;

background-color: #fff;
}

.indicator {
position: absolute;
width: 100%;
height: 10px;

display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;

padding: 0 168px;
bottom: -32px;
box-sizing: border-box;

&:hover {
& .indicatorItem {
height: 9px;
}
}

& .indicatorItem {
height: 7px;
border-radius: 4px;

&:hover {
cursor: pointer;
}
}

& .active {
box-shadow: 0px 0px 5px 1px #119dff;
}
}
Loading