diff --git a/client/app/scripts/components/app.js b/client/app/scripts/components/app.js index 23652361b..032079b0e 100644 --- a/client/app/scripts/components/app.js +++ b/client/app/scripts/components/app.js @@ -35,7 +35,6 @@ function getStateFromStores() { topologiesLoaded: AppStore.isTopologiesLoaded(), version: AppStore.getVersion(), websocketClosed: AppStore.isWebsocketClosed() - }; } diff --git a/client/app/scripts/components/terminal-app.js b/client/app/scripts/components/terminal-app.js index aa1aee6c2..fc31b3442 100644 --- a/client/app/scripts/components/terminal-app.js +++ b/client/app/scripts/components/terminal-app.js @@ -4,10 +4,6 @@ import AppStore from '../stores/app-store'; import Terminal from './terminal'; import { receiveControlPipeFromParams } from '../actions/app-actions'; -export function shouldLaunchTerminal() { - return window.location.hash.indexOf('#!/terminal/') === 0; -} - function getStateFromStores() { return { controlPipe: AppStore.getControlPipe() diff --git a/client/app/scripts/components/terminal.js b/client/app/scripts/components/terminal.js index 0a4901c51..9721ef786 100644 --- a/client/app/scripts/components/terminal.js +++ b/client/app/scripts/components/terminal.js @@ -198,7 +198,7 @@ export default class Terminal extends React.Component { ev.preventDefault(); const paramString = JSON.stringify(this.props); clickCloseTerminal(this.getPipeId()); - openNewWindow(`/terminal.html#!/state/${paramString}`); + openNewWindow(`terminal.html#!/state/${paramString}`); } handleResize() { @@ -247,8 +247,8 @@ export default class Terminal extends React.Component {

Connection Closed

- The connection to this container has been closed. Close terminal. + The connection to this container has been closed. +

Close terminal

); diff --git a/client/app/scripts/terminal-main.js b/client/app/scripts/terminal-main.js index 8a2715f7d..0bb7e2ebb 100644 --- a/client/app/scripts/terminal-main.js +++ b/client/app/scripts/terminal-main.js @@ -1,4 +1,3 @@ -require('font-awesome-webpack'); require('../styles/main.less'); import React from 'react'; diff --git a/client/app/scripts/utils/router-utils.js b/client/app/scripts/utils/router-utils.js index 9c0896876..12bd69131 100644 --- a/client/app/scripts/utils/router-utils.js +++ b/client/app/scripts/utils/router-utils.js @@ -3,16 +3,13 @@ import page from 'page'; import { route } from '../actions/app-actions'; import AppStore from '../stores/app-store'; -// -// TODO: move this logic somewhere else. -// function shouldReplaceState(prevState, nextState) { - return ( - // Opening a new terminal while an existing one is open. - (prevState.controlPipe && nextState.controlPipe) || - // Closing a terminal. - (prevState.controlPipe && !nextState.controlPipe) - ); + // Opening a new terminal while an existing one is open. + const terminalToTerminal = (prevState.controlPipe && nextState.controlPipe); + // Closing a terminal. + const closingTheTerminal = (prevState.controlPipe && !nextState.controlPipe); + + return terminalToTerminal || closingTheTerminal; } export function updateRoute() { diff --git a/client/app/styles/main.less b/client/app/styles/main.less index 410f9b05e..a4d965c70 100644 --- a/client/app/styles/main.less +++ b/client/app/styles/main.less @@ -61,11 +61,6 @@ transition-delay: .5s; } -.link { - text-decoration: underline; - cursor: pointer; -} - .hide { opacity: 0; } @@ -652,6 +647,12 @@ h2 { margin: 4px 0; color: @white; } + .link { + text-transform: uppercase; + font-weight: bold; + cursor: pointer; + float: right; + } } &-cursor {