From 53623fad76274e39206b8e073e371775ea96946b Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 17 May 2021 12:16:10 +0200 Subject: ui: Migrate to FontAwesome 5 React library This change updates the frontend to use the FontAwesome 5 React library that renders SVG icons as opposed to CSS icon fonts. This migration resolves a couple of issues we had with server-side rendering of the previous FontAwesome icons. --- .../app/sidebars/topology/machine/DeleteMachineContainer.js | 4 +++- .../containers/app/sidebars/topology/rack/DeleteRackContainer.js | 4 +++- .../containers/app/sidebars/topology/room/DeleteRoomContainer.js | 4 +++- .../src/containers/app/sidebars/topology/room/EditRoomContainer.js | 6 ++++-- opendc-web/opendc-web-ui/src/containers/auth/Login.js | 4 +++- .../opendc-web-ui/src/containers/projects/NewProjectContainer.js | 4 +++- 6 files changed, 19 insertions(+), 7 deletions(-) (limited to 'opendc-web/opendc-web-ui/src/containers') diff --git a/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/DeleteMachineContainer.js b/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/DeleteMachineContainer.js index f3344424..54e406f4 100644 --- a/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/DeleteMachineContainer.js +++ b/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/DeleteMachineContainer.js @@ -3,6 +3,8 @@ import { useDispatch } from 'react-redux' import ConfirmationModal from '../../../../../components/modals/ConfirmationModal' import { deleteMachine } from '../../../../../redux/actions/topology/machine' import { Button } from 'reactstrap' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faTrash } from '@fortawesome/free-solid-svg-icons' const DeleteMachineContainer = () => { const dispatch = useDispatch() @@ -16,7 +18,7 @@ const DeleteMachineContainer = () => { return ( <> { const dispatch = useDispatch() @@ -16,7 +18,7 @@ const DeleteRackContainer = () => { return ( <> { const dispatch = useDispatch() @@ -16,7 +18,7 @@ const DeleteRoomContainer = () => { return ( <> { const isEditing = useSelector((state) => state.construction.currentRoomInConstruction !== '-1') @@ -13,7 +15,7 @@ const EditRoomContainer = () => { return isEditing ? ( ) : ( @@ -24,7 +26,7 @@ const EditRoomContainer = () => { disabled={isInRackConstructionMode} onClick={() => (isInRackConstructionMode ? undefined : onEdit())} > - + Edit the tiles of this room ) diff --git a/opendc-web/opendc-web-ui/src/containers/auth/Login.js b/opendc-web/opendc-web-ui/src/containers/auth/Login.js index 8459ef5f..d8083d89 100644 --- a/opendc-web/opendc-web-ui/src/containers/auth/Login.js +++ b/opendc-web/opendc-web-ui/src/containers/auth/Login.js @@ -1,6 +1,8 @@ import React from 'react' import { Button } from 'reactstrap' import { useAuth } from '../../auth' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faSignInAlt } from '@fortawesome/free-solid-svg-icons' function Login({ visible, className }) { const { loginWithRedirect } = useAuth() @@ -11,7 +13,7 @@ function Login({ visible, className }) { return ( ) } diff --git a/opendc-web/opendc-web-ui/src/containers/projects/NewProjectContainer.js b/opendc-web/opendc-web-ui/src/containers/projects/NewProjectContainer.js index a0e607b2..e03b5c07 100644 --- a/opendc-web/opendc-web-ui/src/containers/projects/NewProjectContainer.js +++ b/opendc-web/opendc-web-ui/src/containers/projects/NewProjectContainer.js @@ -3,6 +3,8 @@ import { useDispatch } from 'react-redux' import { addProject } from '../../redux/actions/projects' import TextInputModal from '../../components/modals/TextInputModal' import { Button } from 'reactstrap' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlus } from '@fortawesome/free-solid-svg-icons' /** * A container for creating a new project. @@ -21,7 +23,7 @@ const NewProjectContainer = () => { <>
-- cgit v1.2.3