Skip to content

Commit

Permalink
added multi hubs support, restructured & renamed all legacy namings t…
Browse files Browse the repository at this point in the history
…o hub and autid, other refactoring of state management and styling improvements
  • Loading branch information
mrtmeeseeks committed Sep 3, 2024
1 parent bd953ac commit a0dae7d
Show file tree
Hide file tree
Showing 86 changed files with 7,721 additions and 9,732 deletions.
3,351 changes: 1,701 additions & 1,650 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 10 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nova-os",
"name": "aut-os",
"version": "0.1.0",
"private": true,
"scripts": {
Expand Down Expand Up @@ -30,21 +30,17 @@
]
},
"resolutions": {
"react-query": "4.0.0-beta.23",
"**/react": "18.2.0",
"**/react-dom": "18.2.0"
"**/react-dom": "18.2.0",
"react-query": "4.0.0-beta.23"
},
"dependencies": {
"@apollo/client": "^3.9.1",
"@aut-labs/abi-types": "^0.0.77-dev",
"@apollo/client": "^3.11.5",
"@aut-labs/connector": "^0.0.93",
"@aut-labs/d-aut": "^1.0.166-dev",
"@aut-labs/sdk": "^0.0.162-dev",
"@aut-labs/d-aut": "^1.0.187-dev",
"@aut-labs/sdk": "^0.0.169-dev",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@leenguyen/react-flip-clock-countdown": "^1.5.0",
"@lottiefiles/lottie-player": "^2.0.3",
"@lottiefiles/react-lottie-player": "^3.5.3",
"@marker.io/browser": "^0.19.0",
"@mui/icons-material": "^5.15.7",
"@mui/lab": "^5.0.0-alpha.163",
Expand All @@ -53,30 +49,28 @@
"@reduxjs/toolkit": "^2.1.0",
"axios": "^1.6.7",
"buffer": "^6.0.3",
"caniuse-lite": "^1.0.30001655",
"clsx": "^2.1.0",
"d3-force": "^3.0.0",
"date-fns": "^3.3.1",
"ethers": "^6.10.0",
"framer-motion": "^11.0.3",
"graphql": "^16.8.1",
"moment": "^2.30.1",
"flatted": "^3.3.1",
"graphql": "^16.9.0",
"react": "^18.2.0",
"react-copy-to-clipboard": "^5.1.0",
"react-countdown": "^2.3.5",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-force-graph-2d": "^1.25.3",
"react-hook-form": "^7.49.3",
"react-lines-ellipsis": "^0.15.4",
"react-lottie-player": "^2.1.0",
"react-perfect-scrollbar": "^1.5.8",
"react-redux": "^9.1.0",
"react-router-dom": "^6.21.3",
"react-scripts": "^5.0.1",
"react-share": "~5.0.3",
"react-step-wizard": "^5.3.11",
"sass": "^1.70.0",
"swiper": "^11.0.5",
"three": "^0.161.0",
"util": "^0.12.5",
"viem": "^2.7.1",
Expand Down
23 changes: 7 additions & 16 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import { Suspense, useEffect, useMemo, useState } from "react";
import { lazy, Suspense, useEffect, useMemo, useState } from "react";
import { Route, Routes, Navigate } from "react-router-dom";
import { Box, useMediaQuery, useTheme } from "@mui/material";
import { useAppDispatch } from "@store/store.model";
import { updateWalletProviderState } from "@store/WalletProvider/WalletProvider";
import AutLoading from "@components/AutLoading";
import Web3DautConnect from "@api/ProviderFactory/web3-daut-connect";
import AutHolder from "./pages/AutHolder/AutHolder";
import Web3DautConnect from "@components/DAutConnect";
import SWSnackbar from "./components/snackbar";
import { environment } from "@api/environment";
import { getAppConfig } from "@api/aut.api";
import AutSDK from "@aut-labs/sdk";
import AutCommunityEdit from "./pages/AutCommunity/AutNova";
import AutProfileEdit from "./pages/AutHolder/AutLeft/AutProfileEdit";
import AutHome from "./pages/AutHome";
import Callback from "./pages/Oauth2/Callback";
import "./App.scss";

const AutID = lazy(() => import("./pages/AutID"));
const Callback = lazy(() => import("./pages/Oauth2/Callback"));
const AutHome = lazy(() => import("./pages/AutHome"));

function App() {
const dispatch = useAppDispatch();
const [appLoading, setAppLoading] = useState(true);
Expand Down Expand Up @@ -69,15 +68,7 @@ function App() {
<Routes>
<Route path="/" element={<AutHome />} />
<Route path="callback" element={<Callback />} />
<Route path="/:holderAddress/*" element={<AutHolder />} />
<Route
path="/:holderAddress/edit-community/:communityAddress"
element={<AutCommunityEdit />}
/>
<Route
path="/:holderAddress/edit-profile"
element={<AutProfileEdit />}
/>
<Route path="/:autAddress/*" element={<AutID />} />
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</Suspense>
Expand Down
38 changes: 26 additions & 12 deletions src/MainBackground/Faces.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { AutOSAutID } from "@api/models/aut.model";
import { Bubble } from "@components/UserBubbles";

const AvatarCircle = ({ user, x, y, circleDimension }: any) => {
interface AvatarCircleProps {
user: AutOSAutID;
x: number;
y: number;
circleDimension: number;
}

const AvatarCircle = ({ user, x, y, circleDimension }: AvatarCircleProps) => {
return (
<foreignObject
x={x - circleDimension / 2}
Expand All @@ -18,7 +26,13 @@ const AvatarCircle = ({ user, x, y, circleDimension }: any) => {
);
};

const Faces = ({ dimensions, users, setPopoverEl }: any) => {
interface FacesProps {
dimensions: { width: number; height: number };
users: AutOSAutID[];
setPopoverEl: any;
}

const Faces = ({ dimensions, users, setPopoverEl }: FacesProps) => {
const designWidth = 1440;
const designHeight = 800;
const circleDimension = 64;
Expand Down Expand Up @@ -47,7 +61,7 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
strokeWidth={1.33}
/> */}
<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={331.5}
y={359}
circleDimension={circleDimension}
Expand Down Expand Up @@ -75,14 +89,14 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
/>

<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={90}
y={451}
circleDimension={circleDimension}
user={users[1]}
/>

{/*
{/*
bottom empty circle, removed
<circle
cx={179}
Expand All @@ -104,7 +118,7 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
/>

<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={160}
y={200}
circleDimension={circleDimension}
Expand All @@ -122,7 +136,7 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
/>

<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={301}
y={592.167}
circleDimension={circleDimension}
Expand All @@ -139,7 +153,7 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
strokeWidth={1.33}
/>
<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={510}
y={182}
circleDimension={circleDimension}
Expand All @@ -156,7 +170,7 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
strokeWidth={1.33}
/>
<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={946}
y={626}
circleDimension={circleDimension}
Expand All @@ -174,7 +188,7 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
strokeWidth={1.33}
/>
<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={1232}
y={454}
circleDimension={circleDimension}
Expand All @@ -191,7 +205,7 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
strokeWidth={1.33}
/>
<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={1357}
y={92}
circleDimension={circleDimension}
Expand All @@ -207,7 +221,7 @@ const Faces = ({ dimensions, users, setPopoverEl }: any) => {
strokeWidth={1.33}
/>
<AvatarCircle
setPopoverEl={setPopoverEl}
// setPopoverEl={setPopoverEl}
x={873}
y={88}
circleDimension={circleDimension}
Expand Down
13 changes: 12 additions & 1 deletion src/MainBackground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ import GridLines from "./GridLines";
import Dots from "./Dots";
import Faces from "./Faces";
import map from "@assets/autos/background.png";
import { AutOSAutID } from "@api/models/aut.model";

const MainBackground = ({ dimensions, faces, setPopoverEl }: any) => {
interface MainBackgroundProps {
dimensions: { width: number; height: number };
faces: AutOSAutID[];
setPopoverEl?: any;
}

const MainBackground = ({
dimensions,
faces,
setPopoverEl = () => {}
}: MainBackgroundProps) => {
return (
<svg
style={{
Expand Down
3 changes: 1 addition & 2 deletions src/api/aut.api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable max-len */
import axios from "axios";
import { environment } from "./environment";
import { NetworkConfig } from "./ProviderFactory/network.config";
import { NetworkConfig } from "./models/network.config";
import { extractDomain } from "@utils/helpers";
import { useAutConnector } from "@aut-labs/connector";
import { useEffect, useState } from "react";
Expand Down
Loading

0 comments on commit a0dae7d

Please sign in to comment.