Skip to content

Commit

Permalink
Merge pull request #240 from JdeRobot/add-unibotics-logo
Browse files Browse the repository at this point in the history
Add unibotics logo
  • Loading branch information
javizqh authored Dec 20, 2024
2 parents 5f5b912 + 84c47ff commit fa3d225
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 4 deletions.
4 changes: 3 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { OptionsContext } from "./components/options/Options";
import TerminalViewer from "./components/vnc_viewer/TerminalViewer";
import StatusBar from "./components/status_bar/StatusBar";

const App = () => {
const App = ({ isUnibotics }: { isUnibotics: boolean }) => {
const [fileBrowserWidth, setFileBrowserWidth] = useState<number>(300);
const [editorWidth, setEditorWidth] = useState<number>(800);
const [currentFilename, setCurrentFilename] = useState<string>("");
Expand Down Expand Up @@ -164,6 +164,7 @@ const App = () => {
// onSetShowExecStatus={onSetShowExecStatus}
manager={manager}
showVNCViewer={showVNCViewer}
isUnibotics={isUnibotics}
/>

<div className="bt-App-main">
Expand Down Expand Up @@ -215,6 +216,7 @@ const App = () => {
currentFilename={currentFilename}
currentProjectname={currentProjectname}
setProjectChanges={setProjectChanges}
isUnibotics={isUnibotics}
/>
{showTerminal && <TerminalViewer gazeboEnabled={gazeboEnabled} />}
</div>
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/components/file_editor/FileEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ import "./FileEditor.css";

import { ReactComponent as SaveIcon } from "./img/save.svg";
import { ReactComponent as SplashIcon } from "./img/logo_jderobot_monocolor.svg";
import { ReactComponent as SplashIconUnibotics } from "./img/logo_unibotics_monocolor.svg";

const FileEditor = ({
currentFilename,
currentProjectname,
setProjectChanges,
isUnibotics,
}: {
currentFilename: any;
currentProjectname: any;
setProjectChanges: any;
isUnibotics: boolean;
}) => {
const [fileContent, setFileContent] = useState(null);
const [fontSize, setFontSize] = useState(14);
Expand Down Expand Up @@ -165,7 +168,16 @@ const FileEditor = ({
}}
/>
) : (
<SplashIcon className="bt-splash-icon" fill="var(--header)" />
<>
{isUnibotics ? (
<SplashIconUnibotics
className="bt-splash-icon"
fill="var(--header)"
/>
) : (
<SplashIcon className="bt-splash-icon" fill="var(--header)" />
)}
</>
)}
</div>
);
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/components/file_editor/img/logo_unibotics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fa3d225

Please sign in to comment.