From d9e65dceb38cdb8dc4e464d388755f9456620566 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 16 May 2021 17:07:58 +0200 Subject: ui: Restructure OpenDC frontend This change updates the structure of the OpenDC frontend in order to improve the maintainability of the frontend. --- opendc-web/opendc-web-ui/src/components/app/map/groups/WallGroup.js | 2 +- .../opendc-web-ui/src/components/app/sidebars/Sidebar.module.scss | 4 ++-- .../opendc-web-ui/src/components/home/ContentSection.module.scss | 2 +- opendc-web/opendc-web-ui/src/components/navigation/Navbar.js | 2 +- opendc-web/opendc-web-ui/src/components/navigation/Navbar.module.scss | 4 ++-- opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'opendc-web/opendc-web-ui/src/components') diff --git a/opendc-web/opendc-web-ui/src/components/app/map/groups/WallGroup.js b/opendc-web/opendc-web-ui/src/components/app/map/groups/WallGroup.js index 855d444f..c73a95a7 100644 --- a/opendc-web/opendc-web-ui/src/components/app/map/groups/WallGroup.js +++ b/opendc-web/opendc-web-ui/src/components/app/map/groups/WallGroup.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import React from 'react' import { Group } from 'react-konva' -import { Tile } from '../../../../shapes/index' +import { Tile } from '../../../../shapes' import { deriveWallLocations } from '../../../../util/tile-calculations' import WallSegment from '../elements/WallSegment' diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/Sidebar.module.scss b/opendc-web/opendc-web-ui/src/components/app/sidebars/Sidebar.module.scss index d6be4d9b..19c6a97f 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/Sidebar.module.scss +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/Sidebar.module.scss @@ -1,5 +1,5 @@ -@import '../../../style-globals/_variables.scss'; -@import '../../../style-globals/_mixins.scss'; +@import 'src/style/_variables.scss'; +@import 'src/style/_mixins.scss'; .collapseButton { position: absolute; diff --git a/opendc-web/opendc-web-ui/src/components/home/ContentSection.module.scss b/opendc-web/opendc-web-ui/src/components/home/ContentSection.module.scss index 3d150c93..d27a0ce0 100644 --- a/opendc-web/opendc-web-ui/src/components/home/ContentSection.module.scss +++ b/opendc-web/opendc-web-ui/src/components/home/ContentSection.module.scss @@ -1,4 +1,4 @@ -@import '../../style-globals/_variables.scss'; +@import 'src/style/_variables.scss'; .contentSection { padding-top: 50px; diff --git a/opendc-web/opendc-web-ui/src/components/navigation/Navbar.js b/opendc-web/opendc-web-ui/src/components/navigation/Navbar.js index 025d33a1..f16a3feb 100644 --- a/opendc-web/opendc-web-ui/src/components/navigation/Navbar.js +++ b/opendc-web/opendc-web-ui/src/components/navigation/Navbar.js @@ -15,7 +15,7 @@ import Login from '../../containers/auth/Login' import Logout from '../../containers/auth/Logout' import ProfileName from '../../containers/auth/ProfileName' import { login, navbar, opendcBrand } from './Navbar.module.scss' -import { useIsLoggedIn } from '../../auth/hook' +import { useIsLoggedIn } from '../../auth' export const NAVBAR_HEIGHT = 60 diff --git a/opendc-web/opendc-web-ui/src/components/navigation/Navbar.module.scss b/opendc-web/opendc-web-ui/src/components/navigation/Navbar.module.scss index 2ea59a0f..8b9e4c97 100644 --- a/opendc-web/opendc-web-ui/src/components/navigation/Navbar.module.scss +++ b/opendc-web/opendc-web-ui/src/components/navigation/Navbar.module.scss @@ -1,5 +1,5 @@ -@import '../../style-globals/_mixins.scss'; -@import '../../style-globals/_variables.scss'; +@import 'src/style/_mixins.scss'; +@import 'src/style/_variables.scss'; .navbar { border-top: $blue 3px solid; diff --git a/opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js b/opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js index bc63c805..a0aac098 100644 --- a/opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js +++ b/opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js @@ -1,7 +1,7 @@ import classNames from 'classnames' import React from 'react' import ProjectActions from '../../containers/projects/ProjectActions' -import { Authorization } from '../../shapes/index' +import { Authorization } from '../../shapes' import { AUTH_DESCRIPTION_MAP, AUTH_ICON_MAP } from '../../util/authorizations' import { parseAndFormatDateTime } from '../../util/date-time' -- cgit v1.2.3