@electerm/electerm-react 1.34.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +31 -0
- package/client/common/auto-complete-data-mapper.js +6 -0
- package/client/common/byte-format.js +14 -0
- package/client/common/class.js +52 -0
- package/client/common/clipboard.js +49 -0
- package/client/common/constants.js +308 -0
- package/client/common/create-lang-edit-link.js +7 -0
- package/client/common/create-title.js +29 -0
- package/client/common/db-fix.js +24 -0
- package/client/common/db.js +155 -0
- package/client/common/download-mirrors.js +10 -0
- package/client/common/download.js +16 -0
- package/client/common/error-handler.jsx +27 -0
- package/client/common/fetch-from-server.js +47 -0
- package/client/common/fetch.jsx +71 -0
- package/client/common/find-bookmark-group-id.js +15 -0
- package/client/common/find-parent.js +30 -0
- package/client/common/form-layout.js +27 -0
- package/client/common/fs.js +21 -0
- package/client/common/get-proxy.js +8 -0
- package/client/common/id-with-stamp.js +10 -0
- package/client/common/index-sorter.js +4 -0
- package/client/common/init-setting-item.js +32 -0
- package/client/common/is-absolute-path.js +3 -0
- package/client/common/is-ip.js +16 -0
- package/client/common/is-valid-path.js +7 -0
- package/client/common/key-control-pressed.js +13 -0
- package/client/common/key-pressed.js +13 -0
- package/client/common/key-shift-pressed.js +7 -0
- package/client/common/mode2permission.js +81 -0
- package/client/common/new-terminal.js +31 -0
- package/client/common/parse-int10.js +3 -0
- package/client/common/parse-json-safe.js +11 -0
- package/client/common/pass-enc.js +25 -0
- package/client/common/post-msg.js +3 -0
- package/client/common/pre.js +156 -0
- package/client/common/promise-timeout.js +27 -0
- package/client/common/resolve.js +31 -0
- package/client/common/run-idle.js +1 -0
- package/client/common/safe-local-storage.js +35 -0
- package/client/common/safe-name.js +19 -0
- package/client/common/sftp.js +74 -0
- package/client/common/terminal-theme.js +158 -0
- package/client/common/test-connection.js +12 -0
- package/client/common/time.js +30 -0
- package/client/common/to-simple-obj.js +5 -0
- package/client/common/track.js +7 -0
- package/client/common/transfer.js +76 -0
- package/client/common/trzsz.js +62 -0
- package/client/common/ui-theme.js +44 -0
- package/client/common/uid.js +5 -0
- package/client/common/update-check.js +79 -0
- package/client/common/upgrade.js +68 -0
- package/client/common/wait.js +8 -0
- package/client/common/ws.js +161 -0
- package/client/components/batch-op/batch-op.jsx +650 -0
- package/client/components/bookmark-form/bookmark-form.styl +8 -0
- package/client/components/bookmark-form/bookmark-group-tree-format.js +39 -0
- package/client/components/bookmark-form/encodes.js +44 -0
- package/client/components/bookmark-form/form-ssh-common.jsx +208 -0
- package/client/components/bookmark-form/form-tabs.jsx +69 -0
- package/client/components/bookmark-form/index.jsx +159 -0
- package/client/components/bookmark-form/local-form-ui.jsx +152 -0
- package/client/components/bookmark-form/local-form.jsx +16 -0
- package/client/components/bookmark-form/proxy.jsx +49 -0
- package/client/components/bookmark-form/quick-command-list.jsx +31 -0
- package/client/components/bookmark-form/quick-command.jsx +228 -0
- package/client/components/bookmark-form/render-auth-ssh.jsx +104 -0
- package/client/components/bookmark-form/render-connection-hopping.jsx +229 -0
- package/client/components/bookmark-form/render-delayed-scripts.jsx +88 -0
- package/client/components/bookmark-form/render-ssh-tunnel.jsx +116 -0
- package/client/components/bookmark-form/serial-form-ui.jsx +311 -0
- package/client/components/bookmark-form/serial-form.jsx +20 -0
- package/client/components/bookmark-form/sftp-enable.jsx +33 -0
- package/client/components/bookmark-form/ssh-form-ui.jsx +100 -0
- package/client/components/bookmark-form/ssh-form.jsx +348 -0
- package/client/components/bookmark-form/telnet-form-ui.jsx +154 -0
- package/client/components/bookmark-form/telnet-form.jsx +16 -0
- package/client/components/bookmark-form/tree-delete.jsx +87 -0
- package/client/components/bookmark-form/use-form-funcs.jsx +50 -0
- package/client/components/bookmark-form/use-quick-commands.jsx +83 -0
- package/client/components/bookmark-form/use-submit.jsx +77 -0
- package/client/components/bookmark-form/use-ui.jsx +82 -0
- package/client/components/bookmark-form/x11.jsx +23 -0
- package/client/components/common/animate-text.jsx +37 -0
- package/client/components/common/animate-text.styl +54 -0
- package/client/components/common/external-link.jsx +28 -0
- package/client/components/common/help-icon.jsx +25 -0
- package/client/components/common/highlight.jsx +23 -0
- package/client/components/common/highlight.styl +3 -0
- package/client/components/common/input-auto-focus.jsx +68 -0
- package/client/components/common/input-confirm.jsx +66 -0
- package/client/components/common/logo-elem.jsx +22 -0
- package/client/components/common/markdown.jsx +27 -0
- package/client/components/common/react-subx.jsx +1 -0
- package/client/components/common/resize-wrap.jsx +222 -0
- package/client/components/common/resize-wrap.styl +9 -0
- package/client/components/common/search.jsx +9 -0
- package/client/components/common/show-item.jsx +27 -0
- package/client/components/context-menu/boomarks.jsx +15 -0
- package/client/components/context-menu/context-menu.jsx +340 -0
- package/client/components/context-menu/context-menu.styl +90 -0
- package/client/components/context-menu/history.jsx +27 -0
- package/client/components/context-menu/icon-holder.jsx +5 -0
- package/client/components/context-menu/menu-btn.jsx +224 -0
- package/client/components/context-menu/sub-tab-menu.jsx +23 -0
- package/client/components/context-menu/tabs.jsx +22 -0
- package/client/components/context-menu/zoom.jsx +40 -0
- package/client/components/footer/batch-input.jsx +177 -0
- package/client/components/footer/footer-entry.jsx +141 -0
- package/client/components/footer/footer.styl +47 -0
- package/client/components/icons/match-case.jsx +10 -0
- package/client/components/icons/match-whole-word.jsx +13 -0
- package/client/components/icons/regular-exp.jsx +10 -0
- package/client/components/main/css-overwrite.jsx +92 -0
- package/client/components/main/error-wrapper.jsx +59 -0
- package/client/components/main/index.jsx +11 -0
- package/client/components/main/loading.jsx +25 -0
- package/client/components/main/main.jsx +149 -0
- package/client/components/main/term-fullscreen-control.jsx +21 -0
- package/client/components/main/term-fullscreen.styl +27 -0
- package/client/components/main/ui-theme.jsx +31 -0
- package/client/components/main/upgrade.jsx +351 -0
- package/client/components/main/upgrade.styl +27 -0
- package/client/components/main/wrapper.styl +41 -0
- package/client/components/quick-commands/qm.styl +29 -0
- package/client/components/quick-commands/quick-command-item.jsx +36 -0
- package/client/components/quick-commands/quick-command-transport-mod.jsx +54 -0
- package/client/components/quick-commands/quick-command-transport.jsx +12 -0
- package/client/components/quick-commands/quick-commands-box.jsx +233 -0
- package/client/components/quick-commands/quick-commands-form-elem.jsx +119 -0
- package/client/components/quick-commands/quick-commands-form.jsx +33 -0
- package/client/components/quick-commands/quick-commands-list.jsx +128 -0
- package/client/components/quick-commands/quick-commands-select.jsx +38 -0
- package/client/components/session/session.jsx +533 -0
- package/client/components/session/session.styl +53 -0
- package/client/components/session/sessions.jsx +445 -0
- package/client/components/setting-panel/bookmark-transport.jsx +148 -0
- package/client/components/setting-panel/bookmark-tree-list.jsx +14 -0
- package/client/components/setting-panel/col.jsx +18 -0
- package/client/components/setting-panel/list.jsx +186 -0
- package/client/components/setting-panel/list.styl +33 -0
- package/client/components/setting-panel/on-tree-drop.js +222 -0
- package/client/components/setting-panel/setting-modal.jsx +163 -0
- package/client/components/setting-panel/setting-wrap.jsx +37 -0
- package/client/components/setting-panel/setting-wrap.styl +52 -0
- package/client/components/setting-panel/setting.jsx +858 -0
- package/client/components/setting-panel/setting.styl +4 -0
- package/client/components/setting-panel/start-session-select.jsx +91 -0
- package/client/components/setting-panel/tab-bookmarks.jsx +37 -0
- package/client/components/setting-panel/tab-history.jsx +44 -0
- package/client/components/setting-panel/tab-quick-commands.jsx +38 -0
- package/client/components/setting-panel/tab-settings.jsx +42 -0
- package/client/components/setting-panel/tab-themes.jsx +34 -0
- package/client/components/setting-panel/tree-list.jsx +978 -0
- package/client/components/setting-panel/tree-list.styl +57 -0
- package/client/components/setting-sync/data-import.jsx +65 -0
- package/client/components/setting-sync/setting-sync-form.jsx +271 -0
- package/client/components/setting-sync/setting-sync.jsx +81 -0
- package/client/components/setting-sync/sync.styl +7 -0
- package/client/components/sftp/address-bar.jsx +139 -0
- package/client/components/sftp/address-bookmark-item.jsx +47 -0
- package/client/components/sftp/address-bookmark.jsx +81 -0
- package/client/components/sftp/address-bookmark.styl +8 -0
- package/client/components/sftp/confirm-modal.jsx +184 -0
- package/client/components/sftp/file-icon.jsx +22 -0
- package/client/components/sftp/file-item.jsx +1226 -0
- package/client/components/sftp/file-mode-modal.jsx +205 -0
- package/client/components/sftp/file-props-modal.jsx +211 -0
- package/client/components/sftp/file-read.js +81 -0
- package/client/components/sftp/list-table-ui.jsx +547 -0
- package/client/components/sftp/owner-list.js +97 -0
- package/client/components/sftp/paged-list.jsx +60 -0
- package/client/components/sftp/permission-render.jsx +42 -0
- package/client/components/sftp/sftp-entry.jsx +1069 -0
- package/client/components/sftp/sftp.styl +217 -0
- package/client/components/sftp/transfer-common.js +9 -0
- package/client/components/sftp/transfer-conflict.jsx +315 -0
- package/client/components/sftp/transfer-speed-format.js +60 -0
- package/client/components/sftp/transfer-tag.jsx +40 -0
- package/client/components/sftp/transfer-tag.styl +11 -0
- package/client/components/sftp/transfer.styl +55 -0
- package/client/components/sftp/transport-action.jsx +410 -0
- package/client/components/sftp/transport-entry.jsx +108 -0
- package/client/components/sftp/transport-types.js +8 -0
- package/client/components/sftp/transports-action.jsx +111 -0
- package/client/components/sftp/transports-ui.jsx +93 -0
- package/client/components/sftp/zip.js +42 -0
- package/client/components/sidebar/bookmark-select.jsx +48 -0
- package/client/components/sidebar/bookmark.jsx +82 -0
- package/client/components/sidebar/history.jsx +66 -0
- package/client/components/sidebar/index.jsx +230 -0
- package/client/components/sidebar/info-modal.jsx +250 -0
- package/client/components/sidebar/info.styl +27 -0
- package/client/components/sidebar/side-icon.jsx +25 -0
- package/client/components/sidebar/sidebar.styl +128 -0
- package/client/components/sidebar/transfer-history-modal.jsx +110 -0
- package/client/components/sidebar/transfer-history.styl +3 -0
- package/client/components/sidebar/transfer-list-control.jsx +205 -0
- package/client/components/sidebar/transfer-list.jsx +55 -0
- package/client/components/sidebar/transfer-modal.jsx +76 -0
- package/client/components/sidebar/transfer.styl +8 -0
- package/client/components/sidebar/transport-ui.jsx +109 -0
- package/client/components/tabs/index.jsx +320 -0
- package/client/components/tabs/tab.jsx +427 -0
- package/client/components/tabs/tabs.styl +220 -0
- package/client/components/tabs/window-control.jsx +55 -0
- package/client/components/terminal/attach-addon-custom.js +70 -0
- package/client/components/terminal/build-ls-term-id.js +5 -0
- package/client/components/terminal/index.jsx +1358 -0
- package/client/components/terminal/normal-buffer.jsx +33 -0
- package/client/components/terminal/term-search.jsx +224 -0
- package/client/components/terminal/term-search.styl +15 -0
- package/client/components/terminal/terminal-apis.js +31 -0
- package/client/components/terminal/terminal-interactive.jsx +148 -0
- package/client/components/terminal/terminal.styl +96 -0
- package/client/components/terminal/xterm-zmodem.js +48 -0
- package/client/components/terminal/zmodem-transfer.jsx +98 -0
- package/client/components/terminal/zmodem.styl +14 -0
- package/client/components/terminal-info/activity.jsx +54 -0
- package/client/components/terminal-info/base.jsx +25 -0
- package/client/components/terminal-info/content.jsx +101 -0
- package/client/components/terminal-info/data-cols-parser.jsx +50 -0
- package/client/components/terminal-info/disk.jsx +29 -0
- package/client/components/terminal-info/index.jsx +25 -0
- package/client/components/terminal-info/network.jsx +114 -0
- package/client/components/terminal-info/resource.jsx +80 -0
- package/client/components/terminal-info/run-cmd.jsx +273 -0
- package/client/components/terminal-info/terminal-info.styl +29 -0
- package/client/components/terminal-info/up.jsx +15 -0
- package/client/components/terminal-theme/index.jsx +264 -0
- package/client/components/terminal-theme/terminal-theme-list.styl +3 -0
- package/client/components/terminal-theme/theme-list.jsx +146 -0
- package/client/components/text-editor/text-editor-form.jsx +97 -0
- package/client/components/text-editor/text-editor.jsx +182 -0
- package/client/css/antd-overwrite.styl +14 -0
- package/client/css/basic.styl +38 -0
- package/client/css/includes/box.styl +154 -0
- package/client/css/includes/font-size.styl +6 -0
- package/client/css/includes/index.styl +3 -0
- package/client/css/includes/text.styl +31 -0
- package/client/css/includes/theme-default.styl +20 -0
- package/client/entry/basic.js +58 -0
- package/client/entry/index.jsx +15 -0
- package/client/entry/worker.js +137 -0
- package/client/store/address-bookmark.js +25 -0
- package/client/store/app-upgrade.js +23 -0
- package/client/store/batch-input-history.js +26 -0
- package/client/store/bookmark-group.js +128 -0
- package/client/store/bookmark.js +22 -0
- package/client/store/common.js +140 -0
- package/client/store/context-menu.js +23 -0
- package/client/store/db-upgrade.js +43 -0
- package/client/store/event.js +70 -0
- package/client/store/index.js +335 -0
- package/client/store/init-state.js +191 -0
- package/client/store/item.js +120 -0
- package/client/store/load-data.js +198 -0
- package/client/store/quick-command.js +43 -0
- package/client/store/session.js +54 -0
- package/client/store/setting.js +208 -0
- package/client/store/sidebar.js +48 -0
- package/client/store/sync.js +390 -0
- package/client/store/system-menu.js +120 -0
- package/client/store/tab.js +74 -0
- package/client/store/terminal-theme.js +116 -0
- package/client/store/transfer-history.js +27 -0
- package/client/store/transfer-list.js +20 -0
- package/client/store/ui-theme.js +71 -0
- package/client/store/watch.js +116 -0
- package/client/views/index.pug +58 -0
- package/package.json +34 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GithubOutlined,
|
|
3
|
+
GlobalOutlined,
|
|
4
|
+
HighlightOutlined,
|
|
5
|
+
HomeOutlined,
|
|
6
|
+
UserOutlined,
|
|
7
|
+
WarningOutlined,
|
|
8
|
+
InfoCircleOutlined,
|
|
9
|
+
AlignLeftOutlined,
|
|
10
|
+
BugOutlined,
|
|
11
|
+
HeartOutlined
|
|
12
|
+
} from '@ant-design/icons'
|
|
13
|
+
import { Component } from '../common/react-subx'
|
|
14
|
+
import { Modal, Tabs, Button } from 'antd'
|
|
15
|
+
import Link from '../common/external-link'
|
|
16
|
+
import LogoElem from '../common/logo-elem'
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
packInfo,
|
|
20
|
+
infoTabs,
|
|
21
|
+
srcsSkipUpgradeCheck
|
|
22
|
+
} from '../../common/constants'
|
|
23
|
+
import './info.styl'
|
|
24
|
+
|
|
25
|
+
const { prefix } = window
|
|
26
|
+
const e = prefix('control')
|
|
27
|
+
const m = prefix('menu')
|
|
28
|
+
const c = prefix('common')
|
|
29
|
+
const a = prefix('app')
|
|
30
|
+
const s = prefix('setting')
|
|
31
|
+
|
|
32
|
+
export default class InfoModal extends Component {
|
|
33
|
+
handleChangeTab = key => {
|
|
34
|
+
this.props.store.infoModalTab = key
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
renderCheckUpdate = () => {
|
|
38
|
+
if (srcsSkipUpgradeCheck.includes(this.props.store.installSrc)) {
|
|
39
|
+
return null
|
|
40
|
+
}
|
|
41
|
+
const { store } = this.props
|
|
42
|
+
const {
|
|
43
|
+
onCheckUpdate
|
|
44
|
+
} = store
|
|
45
|
+
const onCheckUpdating = store.upgradeInfo.checkingRemoteVersion || store.upgradeInfo.upgrading
|
|
46
|
+
return (
|
|
47
|
+
<p className='mg1b mg2t'>
|
|
48
|
+
<Button
|
|
49
|
+
type='primary'
|
|
50
|
+
loading={onCheckUpdating}
|
|
51
|
+
onClick={() => onCheckUpdate(true)}
|
|
52
|
+
>
|
|
53
|
+
{e('checkForUpdate')}
|
|
54
|
+
</Button>
|
|
55
|
+
</p>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
render () {
|
|
60
|
+
const { store } = this.props
|
|
61
|
+
const {
|
|
62
|
+
onCloseAbout,
|
|
63
|
+
showInfoModal,
|
|
64
|
+
commandLineHelp,
|
|
65
|
+
infoModalTab
|
|
66
|
+
} = store
|
|
67
|
+
if (!showInfoModal) {
|
|
68
|
+
return null
|
|
69
|
+
}
|
|
70
|
+
const {
|
|
71
|
+
name,
|
|
72
|
+
// description,
|
|
73
|
+
devDependencies,
|
|
74
|
+
dependencies,
|
|
75
|
+
langugeRepo,
|
|
76
|
+
author: {
|
|
77
|
+
name: authorName,
|
|
78
|
+
email,
|
|
79
|
+
url: authorUrl
|
|
80
|
+
},
|
|
81
|
+
homepage,
|
|
82
|
+
bugs: {
|
|
83
|
+
url: bugReportLink
|
|
84
|
+
},
|
|
85
|
+
releases: releaseLink,
|
|
86
|
+
privacyNoticeLink,
|
|
87
|
+
sponsorLink,
|
|
88
|
+
knownIssuesLink
|
|
89
|
+
} = packInfo
|
|
90
|
+
const link = releaseLink.replace('/releases', '')
|
|
91
|
+
const { env, versions } = window.pre
|
|
92
|
+
const deps = {
|
|
93
|
+
...devDependencies,
|
|
94
|
+
...dependencies
|
|
95
|
+
}
|
|
96
|
+
const envs = {
|
|
97
|
+
...versions,
|
|
98
|
+
...env
|
|
99
|
+
}
|
|
100
|
+
const title = (
|
|
101
|
+
<div className='ant-modal-confirm-title font16'>
|
|
102
|
+
<InfoCircleOutlined className='font20 mg1r' /> {m('about')} {name}
|
|
103
|
+
</div>
|
|
104
|
+
)
|
|
105
|
+
const attrs = {
|
|
106
|
+
title,
|
|
107
|
+
width: window.innerWidth - 100,
|
|
108
|
+
maskClosable: true,
|
|
109
|
+
okText: c('ok'),
|
|
110
|
+
onCancel: onCloseAbout,
|
|
111
|
+
footer: null,
|
|
112
|
+
open: true,
|
|
113
|
+
wrapClassName: 'info-modal'
|
|
114
|
+
}
|
|
115
|
+
const items = [
|
|
116
|
+
{
|
|
117
|
+
key: infoTabs.info,
|
|
118
|
+
label: m('about'),
|
|
119
|
+
children: (
|
|
120
|
+
<div>
|
|
121
|
+
<LogoElem />
|
|
122
|
+
<p className='mg2b'>{a('desc')}</p>
|
|
123
|
+
<p className='mg1b'>
|
|
124
|
+
<UserOutlined /> <b className='mg1r'>{e('author')} ➾</b>
|
|
125
|
+
<Link to={authorUrl} className='mg1l'>
|
|
126
|
+
{authorName} ({email})
|
|
127
|
+
</Link>
|
|
128
|
+
</p>
|
|
129
|
+
<p className='mg1b'>
|
|
130
|
+
<HomeOutlined /> <b>{e('homepage')}/{e('download')} ➾</b>
|
|
131
|
+
<Link to={homepage} className='mg1l'>
|
|
132
|
+
{homepage}
|
|
133
|
+
</Link>
|
|
134
|
+
</p>
|
|
135
|
+
<p className='mg1b'>
|
|
136
|
+
<GithubOutlined /> <b className='mg1r'>github ➾</b>
|
|
137
|
+
<Link to={link} className='mg1l'>
|
|
138
|
+
{link}
|
|
139
|
+
</Link>
|
|
140
|
+
</p>
|
|
141
|
+
<p className='mg1b'>
|
|
142
|
+
<GlobalOutlined /> <b className='mg1r'>{s('language')} repo ➾</b>
|
|
143
|
+
<Link to={langugeRepo} className='mg1l'>
|
|
144
|
+
{langugeRepo}
|
|
145
|
+
</Link>
|
|
146
|
+
</p>
|
|
147
|
+
<p className='mg1b'>
|
|
148
|
+
<BugOutlined /> <b className='mg1r'>{e('bugReport')} ➾</b>
|
|
149
|
+
<Link to={bugReportLink} className='mg1l'>
|
|
150
|
+
{bugReportLink}
|
|
151
|
+
</Link>
|
|
152
|
+
</p>
|
|
153
|
+
<p className='mg1b'>
|
|
154
|
+
<HighlightOutlined /> <b className='mg1r'>{a('changeLog')} ➾</b>
|
|
155
|
+
<Link to={releaseLink} className='mg1l'>
|
|
156
|
+
{releaseLink}
|
|
157
|
+
</Link>
|
|
158
|
+
</p>
|
|
159
|
+
<p className='mg1b'>
|
|
160
|
+
<AlignLeftOutlined /> <b className='mg1r'>{a('knownIssues')} ➾</b>
|
|
161
|
+
<Link to={knownIssuesLink} className='mg1l'>
|
|
162
|
+
{knownIssuesLink}
|
|
163
|
+
</Link>
|
|
164
|
+
</p>
|
|
165
|
+
<p className='mg1b'>
|
|
166
|
+
<WarningOutlined /> <b className='mg1r'>{a('privacyNotice')} ➾</b>
|
|
167
|
+
<Link to={privacyNoticeLink} className='mg1l'>
|
|
168
|
+
{privacyNoticeLink}
|
|
169
|
+
</Link>
|
|
170
|
+
</p>
|
|
171
|
+
<p className='mg1b'>
|
|
172
|
+
<HeartOutlined /> <b className='mg1r'>{a('sponsorElecterm')} ➾</b>
|
|
173
|
+
<Link to={sponsorLink} className='mg1l'>
|
|
174
|
+
{sponsorLink}
|
|
175
|
+
</Link>
|
|
176
|
+
</p>
|
|
177
|
+
{this.renderCheckUpdate()}
|
|
178
|
+
</div>
|
|
179
|
+
)
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
key: infoTabs.deps,
|
|
183
|
+
label: e('dependencies'),
|
|
184
|
+
children: Object.keys(deps).map((k, i) => {
|
|
185
|
+
const v = deps[k]
|
|
186
|
+
return (
|
|
187
|
+
<div className='pd1b' key={i + '_dp_' + k}>
|
|
188
|
+
<b className='bold'>{k}</b>:
|
|
189
|
+
<span className='mg1l'>
|
|
190
|
+
{v}
|
|
191
|
+
</span>
|
|
192
|
+
</div>
|
|
193
|
+
)
|
|
194
|
+
})
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
key: infoTabs.env,
|
|
198
|
+
label: e('env'),
|
|
199
|
+
children: Object.keys(envs).map((k, i) => {
|
|
200
|
+
const v = envs[k]
|
|
201
|
+
return (
|
|
202
|
+
<div className='pd1b' key={i + '_env_' + k}>
|
|
203
|
+
<b className='bold'>{k}</b>:
|
|
204
|
+
<span className='mg1l'>
|
|
205
|
+
{v}
|
|
206
|
+
</span>
|
|
207
|
+
</div>
|
|
208
|
+
)
|
|
209
|
+
})
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
key: infoTabs.os,
|
|
213
|
+
label: e('os'),
|
|
214
|
+
children: window.pre.osInfo().map(({ k, v }, i) => {
|
|
215
|
+
return (
|
|
216
|
+
<div className='pd1b' key={i + '_os_' + k}>
|
|
217
|
+
<b className='bold'>{k}</b>:
|
|
218
|
+
<span className='mg1l'>
|
|
219
|
+
{v}
|
|
220
|
+
</span>
|
|
221
|
+
</div>
|
|
222
|
+
)
|
|
223
|
+
})
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
key: infoTabs.cmd,
|
|
227
|
+
label: e('commandLineUsage'),
|
|
228
|
+
children: (
|
|
229
|
+
<pre>
|
|
230
|
+
<code>{commandLineHelp}</code>
|
|
231
|
+
</pre>
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
|
|
236
|
+
return (
|
|
237
|
+
<Modal
|
|
238
|
+
{...attrs}
|
|
239
|
+
>
|
|
240
|
+
<div className='about-wrap'>
|
|
241
|
+
<Tabs
|
|
242
|
+
activeKey={infoModalTab}
|
|
243
|
+
onChange={this.handleChangeTab}
|
|
244
|
+
items={items}
|
|
245
|
+
/>
|
|
246
|
+
</div>
|
|
247
|
+
</Modal>
|
|
248
|
+
)
|
|
249
|
+
}
|
|
250
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@require '../../css/includes/theme-default'
|
|
2
|
+
|
|
3
|
+
// from https://freefrontend.com/css-border-animations/
|
|
4
|
+
.morph-shape
|
|
5
|
+
background linear-gradient(45deg, primary 0%, success 100%)
|
|
6
|
+
animation morph 8s ease-in-out infinite
|
|
7
|
+
border-radius 60% 40% 30% 70% / 60% 30% 70% 40%
|
|
8
|
+
transition all 1s ease-in-out
|
|
9
|
+
z-index 5
|
|
10
|
+
|
|
11
|
+
@keyframes morph
|
|
12
|
+
0%
|
|
13
|
+
border-radius 60% 40% 30% 70% / 60% 30% 70% 40%
|
|
14
|
+
background linear-gradient(45deg, primary 0%, success 100%)
|
|
15
|
+
50%
|
|
16
|
+
border-radius 30% 60% 70% 40% / 50% 60% 30% 60%
|
|
17
|
+
background linear-gradient(45deg, main 0%, success 100%)
|
|
18
|
+
|
|
19
|
+
100%
|
|
20
|
+
border-radius 60% 40% 30% 70% / 60% 30% 70% 40%
|
|
21
|
+
background linear-gradient(45deg, primary 0%, success 100%)
|
|
22
|
+
.info-modal
|
|
23
|
+
.ant-modal-header
|
|
24
|
+
border none
|
|
25
|
+
.ant-modal-body
|
|
26
|
+
padding 52px
|
|
27
|
+
padding-top 0
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import classNames from 'classnames'
|
|
2
|
+
|
|
3
|
+
export default function SideIcon (props) {
|
|
4
|
+
const {
|
|
5
|
+
show,
|
|
6
|
+
className,
|
|
7
|
+
title = '',
|
|
8
|
+
active,
|
|
9
|
+
children
|
|
10
|
+
} = props
|
|
11
|
+
if (show === false) {
|
|
12
|
+
return null
|
|
13
|
+
}
|
|
14
|
+
const cls = classNames(className, 'control-icon-wrap', {
|
|
15
|
+
active
|
|
16
|
+
})
|
|
17
|
+
return (
|
|
18
|
+
<div
|
|
19
|
+
className={cls}
|
|
20
|
+
title={title}
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@require '../../css/includes/theme-default'
|
|
2
|
+
.animate-fast
|
|
3
|
+
animation-duration .2s
|
|
4
|
+
.sidebar-panel
|
|
5
|
+
position absolute
|
|
6
|
+
left 43px
|
|
7
|
+
top 56px
|
|
8
|
+
bottom 36px
|
|
9
|
+
z-index 200
|
|
10
|
+
width 0
|
|
11
|
+
overflow-y scroll
|
|
12
|
+
background main-light
|
|
13
|
+
color text
|
|
14
|
+
.item-list-unit:hover
|
|
15
|
+
.list-item-remove
|
|
16
|
+
display none !important
|
|
17
|
+
.system-ui .sidebar-panel
|
|
18
|
+
top 45px
|
|
19
|
+
.pinned .sidebar-panel
|
|
20
|
+
bottom 0
|
|
21
|
+
.sidebar
|
|
22
|
+
position absolute
|
|
23
|
+
left 0
|
|
24
|
+
top 0
|
|
25
|
+
width 36px
|
|
26
|
+
z-index 100
|
|
27
|
+
bottom 0
|
|
28
|
+
background main-dark
|
|
29
|
+
box-shadow 0px 0px 3px 3px alpha(main, .1)
|
|
30
|
+
.item-list
|
|
31
|
+
padding-right 0
|
|
32
|
+
.type-bookmarks
|
|
33
|
+
.bookmarks-panel
|
|
34
|
+
width 300px
|
|
35
|
+
.type-history
|
|
36
|
+
.history-panel
|
|
37
|
+
width 300px
|
|
38
|
+
.control-icon-text
|
|
39
|
+
color text
|
|
40
|
+
&:hover
|
|
41
|
+
color text-light
|
|
42
|
+
.control-icon-wrap
|
|
43
|
+
padding 14px 0
|
|
44
|
+
text-align center
|
|
45
|
+
&.active
|
|
46
|
+
.control-icon
|
|
47
|
+
color text-light
|
|
48
|
+
.control-icon
|
|
49
|
+
color text-dark
|
|
50
|
+
cursor pointer
|
|
51
|
+
&:hover
|
|
52
|
+
color text-light
|
|
53
|
+
.sidebar-list
|
|
54
|
+
.pinned
|
|
55
|
+
color success
|
|
56
|
+
&:hover
|
|
57
|
+
color success
|
|
58
|
+
|
|
59
|
+
//btns
|
|
60
|
+
.btns
|
|
61
|
+
background main-dark
|
|
62
|
+
border-color primary
|
|
63
|
+
// .ant-select-arrow
|
|
64
|
+
.open-about-icon
|
|
65
|
+
color text-dark
|
|
66
|
+
&:hover
|
|
67
|
+
color text-light
|
|
68
|
+
// .ant-btn
|
|
69
|
+
// .ant-select-selection
|
|
70
|
+
// background transparent
|
|
71
|
+
// color #aaa
|
|
72
|
+
// border-color #555
|
|
73
|
+
|
|
74
|
+
/*!
|
|
75
|
+
* Hover.css (http://ianlunn.github.io/Hover/)
|
|
76
|
+
* Version: 2.3.2
|
|
77
|
+
* Author: Ian Lunn @IanLunn
|
|
78
|
+
* Author URL: http://ianlunn.co.uk/
|
|
79
|
+
* Github: https://github.com/IanLunn/Hover
|
|
80
|
+
|
|
81
|
+
* Hover.css Copyright Ian Lunn 2017. Generated with Sass.
|
|
82
|
+
*/
|
|
83
|
+
/* Bob */
|
|
84
|
+
@keyframes hvr-bob {
|
|
85
|
+
0% {
|
|
86
|
+
-webkit-transform: translateY(-8px);
|
|
87
|
+
transform: translateY(-8px);
|
|
88
|
+
}
|
|
89
|
+
50% {
|
|
90
|
+
-webkit-transform: translateY(-4px);
|
|
91
|
+
transform: translateY(-4px);
|
|
92
|
+
}
|
|
93
|
+
100% {
|
|
94
|
+
-webkit-transform: translateY(-8px);
|
|
95
|
+
transform: translateY(-8px);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
@-webkit-keyframes hvr-bob-float {
|
|
99
|
+
100% {
|
|
100
|
+
-webkit-transform: translateY(-8px);
|
|
101
|
+
transform: translateY(-8px);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
@keyframes hvr-bob-float {
|
|
105
|
+
100% {
|
|
106
|
+
-webkit-transform: translateY(-8px);
|
|
107
|
+
transform: translateY(-8px);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
.hvr-bob {
|
|
111
|
+
transform perspective(1px) translateZ(0)
|
|
112
|
+
box-shadow 0 0 1px rgba(0, 0, 0, 0)
|
|
113
|
+
animation-name hvr-bob-float, hvr-bob
|
|
114
|
+
animation-duration .3s, 1.5s
|
|
115
|
+
animation-delay 0s, .3s
|
|
116
|
+
animation-timing-function ease-out, ease-in-out
|
|
117
|
+
animation-iteration-count 1, infinite
|
|
118
|
+
animation-fill-mode forwards
|
|
119
|
+
animation-direction normal, alternate
|
|
120
|
+
}
|
|
121
|
+
.btns .upgrade-icon
|
|
122
|
+
color success
|
|
123
|
+
.close-info-modal
|
|
124
|
+
cursor pointer
|
|
125
|
+
&:hover
|
|
126
|
+
color text-light
|
|
127
|
+
.logo-filter
|
|
128
|
+
filter invert(80%)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* transfer-history-modal
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { Component } from '../common/react-subx'
|
|
6
|
+
import { CloseOutlined } from '@ant-design/icons'
|
|
7
|
+
import { Table } from 'antd'
|
|
8
|
+
import time from '../../../app/common/time'
|
|
9
|
+
import Tag from '../sftp/transfer-tag'
|
|
10
|
+
import './transfer-history.styl'
|
|
11
|
+
import { get as _get } from 'lodash-es'
|
|
12
|
+
import { filesize } from 'filesize'
|
|
13
|
+
|
|
14
|
+
const { prefix } = window
|
|
15
|
+
const e = prefix('transferHistory')
|
|
16
|
+
const f = prefix('sftp')
|
|
17
|
+
const m = prefix('menu')
|
|
18
|
+
const timeRender = t => time(t)
|
|
19
|
+
const sorterFactory = prop => {
|
|
20
|
+
return (a, b) => {
|
|
21
|
+
return _get(a, prop) > _get(b, prop) ? 1 : -1
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export default class TransferHistoryModal extends Component {
|
|
25
|
+
render () {
|
|
26
|
+
const {
|
|
27
|
+
getTransferHistory,
|
|
28
|
+
clearTransferHistory
|
|
29
|
+
} = this.props.store
|
|
30
|
+
const transferHistory = getTransferHistory()
|
|
31
|
+
const columns = [{
|
|
32
|
+
title: e('startTime'),
|
|
33
|
+
dataIndex: 'startTime',
|
|
34
|
+
key: 'startTime',
|
|
35
|
+
sorter: sorterFactory('startTime'),
|
|
36
|
+
render: timeRender
|
|
37
|
+
}, {
|
|
38
|
+
title: e('finishTime'),
|
|
39
|
+
dataIndex: 'finishTime',
|
|
40
|
+
key: 'finishTime',
|
|
41
|
+
sorter: sorterFactory('finishTime'),
|
|
42
|
+
render: timeRender
|
|
43
|
+
}, {
|
|
44
|
+
title: e('type'),
|
|
45
|
+
dataIndex: 'type',
|
|
46
|
+
key: 'typeFrom',
|
|
47
|
+
sorter: sorterFactory('typeFrom'),
|
|
48
|
+
render: (type, inst) => {
|
|
49
|
+
return (
|
|
50
|
+
<Tag transfer={inst} />
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
title: m('host'),
|
|
55
|
+
dataIndex: 'host',
|
|
56
|
+
key: 'host',
|
|
57
|
+
sorter: sorterFactory('host')
|
|
58
|
+
}, {
|
|
59
|
+
title: e('fromPath'),
|
|
60
|
+
dataIndex: 'fromPath',
|
|
61
|
+
key: 'fromPath',
|
|
62
|
+
render: (txt, inst) => {
|
|
63
|
+
return inst.fromPathReal || txt
|
|
64
|
+
},
|
|
65
|
+
sorter: sorterFactory('fromPath')
|
|
66
|
+
}, {
|
|
67
|
+
title: e('toPath'),
|
|
68
|
+
dataIndex: 'toPath',
|
|
69
|
+
key: 'toPath',
|
|
70
|
+
render: (txt, inst) => {
|
|
71
|
+
return inst.toPathReal || txt
|
|
72
|
+
},
|
|
73
|
+
sorter: sorterFactory('toPath')
|
|
74
|
+
}, {
|
|
75
|
+
title: f('size'),
|
|
76
|
+
dataIndex: 'fromFile.size',
|
|
77
|
+
key: 'fromFile.size',
|
|
78
|
+
sorter: sorterFactory('fromFile.size'),
|
|
79
|
+
render: (v) => filesize(v || 0)
|
|
80
|
+
}, {
|
|
81
|
+
title: e('speed'),
|
|
82
|
+
dataIndex: 'speed',
|
|
83
|
+
key: 'speed',
|
|
84
|
+
sorter: sorterFactory('speed')
|
|
85
|
+
}]
|
|
86
|
+
return (
|
|
87
|
+
<div className='pd2'>
|
|
88
|
+
<div>
|
|
89
|
+
<span
|
|
90
|
+
className='iblock pointer'
|
|
91
|
+
onClick={clearTransferHistory}
|
|
92
|
+
>
|
|
93
|
+
<CloseOutlined className='mg1r' />
|
|
94
|
+
{e('clear')}
|
|
95
|
+
</span>
|
|
96
|
+
</div>
|
|
97
|
+
<div className='table-scroll-wrap'>
|
|
98
|
+
<Table
|
|
99
|
+
dataSource={transferHistory}
|
|
100
|
+
columns={columns}
|
|
101
|
+
bordered
|
|
102
|
+
pagination={false}
|
|
103
|
+
size='small'
|
|
104
|
+
rowKey='id'
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
}
|