Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit ba0340a

Browse files
committed
fix: have new session button open inspector webpage
1 parent 593b615 commit ba0340a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

app/renderer/components/ServerMonitor/ServerMonitor.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { Component } from 'react';
2+
import { shell } from 'electron';
23
import PropTypes from 'prop-types';
34
import { Button, Tooltip } from 'antd';
45
import { STATUS_RUNNING, STATUS_STOPPING,
@@ -19,6 +20,7 @@ import { BUTTON } from '../../../../gui-common/components/AntdTypes';
1920

2021
const convert = new AnsiConverter({fg: '#bbb', bg: '#222'});
2122
const MAX_LOGS_RENDERED = 1000;
23+
const INSPECTOR_URL = 'https://github.com/appium/appium-inspector';
2224

2325
function leveler (level) {
2426
switch (level) {
@@ -74,13 +76,16 @@ const StopButton = withTranslation(StopButtonComponent);
7476

7577
class StartSessionButtonComponent extends Component {
7678
render () {
77-
const {serverStatus, startSession, t} = this.props;
79+
const {serverStatus, t} = this.props;
80+
const openInspector = () => shell.openExternal(INSPECTOR_URL);
81+
7882
if (serverStatus !== STATUS_STOPPED && serverStatus !== STATUS_STOPPING) {
79-
return <Tooltip title={t('Start Inspector Session')}>
83+
return <Tooltip title={t('inspectorMoved', {url: INSPECTOR_URL})}>
8084
<Button
8185
className={styles.serverButton} id='startNewSessionBtn'
8286
icon={<SearchOutlined/>}
83-
onClick={startSession} />
87+
onClick={openInspector}
88+
/>
8489
</Tooltip>;
8590
} else {
8691
return null;

assets/locales/en/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,5 +342,6 @@
342342
"jsonArgument": "JSON argument array",
343343
"executeScriptCommand": "Script to execute",
344344
"appPathOrUrl": "Path or URL for app",
345-
"fileContentString": "File contents as Base64-encoded string"
345+
"fileContentString": "File contents as Base64-encoded string",
346+
"inspectorMoved": "The Inspector is now released as a separate app. Please visit {{url}}"
346347
}

0 commit comments

Comments
 (0)