From 6f0eb50297ac67020ce2eb52e1f5aa56d337f5b2 Mon Sep 17 00:00:00 2001 From: Junhao Liao Date: Tue, 27 Dec 2022 22:27:24 -0500 Subject: [PATCH] [About] [Dashboard] move GitHub button from Dashboard to About --- .../src/interface/components/About/index.js | 27 +++++++++++++++++-- client/src/interface/pages/Dashboard/index.js | 25 ++--------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/client/src/interface/components/About/index.js b/client/src/interface/components/About/index.js index fc625ef..b3b1379 100644 --- a/client/src/interface/components/About/index.js +++ b/client/src/interface/components/About/index.js @@ -50,6 +50,8 @@ import LinkForNewWindow from '../LinkToNewWindow'; import iCtrlQRCode from './iCtrlQRCode.svg'; import './index.css'; import ICtrlVoiceButton from '../iCtrlVoiceButton/iCtrlVoiceButton'; +import GitHubButton from 'react-github-btn'; +import {openInNewWindow} from '../../../actions/utils'; const AboutSection = (props) => ( <> @@ -90,8 +92,29 @@ export default class About extends React.Component { return
- About iCtrl {version && `(v${version})`} - +
+ About iCtrl {version && `(v${version})`} + +
+
{ + openInNewWindow( + 'https://github.com/junhaoliao/iCtrl', ev); + }}> + + Star + +
diff --git a/client/src/interface/pages/Dashboard/index.js b/client/src/interface/pages/Dashboard/index.js index f2c6a52..e4b77ef 100644 --- a/client/src/interface/pages/Dashboard/index.js +++ b/client/src/interface/pages/Dashboard/index.js @@ -42,9 +42,7 @@ import axios from 'axios'; import logo from '../../../icons/logo.webp'; import ictrlLogo from '../../../icons/logo.webp'; -import {openInNewWindow} from '../../../actions/utils'; import About from '../../components/About'; -import GitHubButton from 'react-github-btn'; import ResetVNCDialog from '../../components/ResetVNCDialog'; import TrafficLights from '../../components/TrafficLights/TrafficLights'; import Session from './Session'; @@ -177,28 +175,10 @@ export default class Dashboard extends React.Component { sx={{flexGrow: 1}}> iCtrl Dashboard -
{ - openInNewWindow( - 'https://github.com/junhaoliao/iCtrl', ev); - }} - style={{ - marginTop: '5px', - marginRight: '16px', - overflowX: 'auto', - overflowY: 'hidden', - }}> - Star - -
- @@ -282,5 +262,4 @@ export default class Dashboard extends React.Component { ); } - } \ No newline at end of file