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

chore: remove terminal #94

Merged
merged 3 commits into from
Oct 9, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ window.parent.postMessage(
);
```

### 内置终端

![https://camo.githubusercontent.com/d627fa3b419e9231b32f8515db90e632d9dd2262/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323031392f6769662f38363032352f313537343134353634313431352d30366339626465372d303166392d343463652d383962392d3235616635613836643330392e676966](https://camo.githubusercontent.com/d627fa3b419e9231b32f8515db90e632d9dd2262/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323031392f6769662f38363032352f313537343134353634313431352d30366339626465372d303166392d343463652d383962392d3235616635613836643330392e676966)

[更多功能](https://github.com/sorrycc/blog/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+Umi+UI+in%3Atitle+)

## 📖 API
Expand Down
3 changes: 0 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@
"chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
],
"license": "MIT",
"optionalDependencies": {
"node-pty": "^0.10.0-beta3"
},
"dependencies": {
"@umijs/launch-editor": "^1.0.0",
"binary-mirror-config": "1.20.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/src/UmiUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import ActiveProjectError from './ActiveProjectError';
import { BackToHomeAction, OpenProjectAction, ReInstallDependencyAction } from './Actions';
import { isDepLost, isPluginLost, isUmiProject, isUsingBigfish, isUsingUmi } from './checkProject';
import isDepFileExists from './utils/isDepFileExists';
import initTerminal from './terminal';
// import initTerminal from './terminal';
import detectLanguage from './detectLanguage';
import detectNpmClients from './detectNpmClients';
import debug, { debugSocket } from './debug';
Expand Down Expand Up @@ -907,7 +907,7 @@ export default class UmiUI {
/**
* Terminal shell resize server
*/
app.get('/terminal/resize', resizeRoute(this.ctx));
// app.get('/terminal/resize', resizeRoute(this.ctx));
// 访问域名打开
app.get('/', indexRoute(this.ctx));
app.use('/*', commonRoute(this.ctx));
Expand Down Expand Up @@ -1059,7 +1059,7 @@ export default class UmiUI {
prefix: '/umiui',
log: () => {},
});
initTerminal.call(this, server);
// initTerminal.call(this, server);
this.socketServer = ss;
this.server = server;
});
Expand Down
13 changes: 6 additions & 7 deletions packages/ui/web/src/layouts/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import {
QuestionCircleOutlined,
CheckOutlined,
MessageOutlined,
CodeOutlined,
} from '@ant-design/icons';
import { useIntl } from 'react-intl';
import cls from 'classnames';
import { LOCALES, LOCALES_ICON } from '@/enums';
import Context from '@/layouts/Context';
import Logs from '@/components/Logs';
import EditorIcon from '@/components/icons/Editor';
import Shell from '@/components/Shell';
// import Shell from '@/components/Shell';
import { states, reducers } from '@/customModels/footer';
import { handleBack } from '@/utils';
import event, { MESSAGES } from '@/message';
Expand Down Expand Up @@ -127,7 +126,7 @@ const Footer: React.SFC<IFooterProps> = props => {

const actionCls = cls(styles.section, styles.action);
const logCls = cls(actionCls, styles.log);
const shellCls = cls(actionCls, styles.shell);
// const shellCls = cls(actionCls, styles.shell);

const LocaleText = ({ locale: textLocale, checked, style }) => (
<span style={style}>
Expand Down Expand Up @@ -214,7 +213,7 @@ const Footer: React.SFC<IFooterProps> = props => {
>
<Logs logs={logs} type={type} className={styles['section-drawer-logs']} />
</Drawer>
<Drawer
{/* <Drawer
title={
<FooterToolbar
title={intl.formatMessage({ id: 'org.umi.ui.global.terminal.upperCase' })}
Expand Down Expand Up @@ -263,7 +262,7 @@ const Footer: React.SFC<IFooterProps> = props => {
className={styles['section-drawer-shell']}
/>
)}
</Drawer>
</Drawer> */}
</div>
<div className={styles.statusBar}>
<div className={styles['statusBar-left']}>
Expand All @@ -290,12 +289,12 @@ const Footer: React.SFC<IFooterProps> = props => {
<ProfileFilled style={{ marginRight: 4 }} />{' '}
{intl.formatMessage({ id: 'org.umi.ui.global.log' })}
</div>
{projectDashboard && (
{/* {projectDashboard && (
<div className={shellCls} onClick={() => togglePanel('terminal')}>
<CodeOutlined style={{ marginRight: 4 }} />{' '}
{intl.formatMessage({ id: 'org.umi.ui.global.terminal' })}
</div>
)}
)} */}
</div>

{!!key && (
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13808,7 +13808,7 @@ mz@^2.4.0, mz@^2.5.0, mz@^2.7.0:
object-assign "^4.0.1"
thenify-all "^1.0.0"

nan@^2.12.1, nan@^2.14.0:
nan@^2.12.1:
version "2.14.1"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
Expand Down Expand Up @@ -13988,13 +13988,6 @@ node-notifier@^6.0.0:
shellwords "^0.1.1"
which "^1.3.1"

node-pty@^0.10.0-beta3:
version "0.10.0-beta9"
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.10.0-beta9.tgz#e5a795f9b53948346803cb71bac4ffc02e7909f0"
integrity sha512-Qm6uSH30FUcAhJ9s76C+lgvTsOW2cHUbkIGjCdOVCL0c7S4DxsmKBRgjcr+guUK9d9KwfuZHeSjXYWjpJFPe4w==
dependencies:
nan "^2.14.0"

node-releases@^1.1.13, node-releases@^1.1.58:
version "1.1.58"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.58.tgz#8ee20eef30fa60e52755fcc0942def5a734fe935"
Expand Down