Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a context sensitive route for the popped out terminal.html #2882

Merged
merged 1 commit into from Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/app/scripts/components/terminal.js
Expand Up @@ -9,7 +9,7 @@ import Term from 'xterm';
import { clickCloseTerminal } from '../actions/app-actions';
import { getNeutralColor } from '../utils/color-utils';
import { setDocumentTitle } from '../utils/title-utils';
import { getPipeStatus, doResizeTty, getWebsocketUrl, getApiPath } from '../utils/web-api-utils';
import { getPipeStatus, doResizeTty, getWebsocketUrl, basePath } from '../utils/web-api-utils';

const log = debug('scope:terminal');

Expand Down Expand Up @@ -243,7 +243,7 @@ class Terminal extends React.Component {

const bcr = this.node.getBoundingClientRect();
const minWidth = (this.state.characterWidth * 80) + (8 * 2);
openNewWindow(`${getApiPath()}/terminal.html#!/state/${paramString}`, bcr, minWidth);
openNewWindow(`${basePath(window.location.pathname)}/terminal.html#!/state/${paramString}`, bcr, minWidth);

This comment was marked as abuse.

This comment was marked as abuse.

}

handleResize() {
Expand Down
1 change: 1 addition & 0 deletions client/app/scripts/index.js
@@ -1,3 +1,4 @@
exports.reducer = require('./reducers/root').default;
exports.Scope = require('./components/app').default;
exports.actions = require('./actions/app-actions');
exports.TerminalApp = require('./components/terminal-app').default;