U 优化文件分发在文件过多时展示效果

pull/586/head
vapao 2022-10-21 16:47:41 +08:00
parent 35506a5690
commit dc7340e24a
4 changed files with 16 additions and 5 deletions

View File

@ -8,6 +8,7 @@
.left {
padding: 24px;
width: 60%;
border-right: 1px solid #dfdfdf;
.area {
cursor: pointer;

View File

@ -32,7 +32,8 @@ function OutView(props) {
store.tag = ''
gCurrent = current
term.setOption('disableStdin', true)
term.setOption('fontSize', gStore.terminal.fontSize)
term.setOption('fontSize', 14)
term.setOption('lineHeight', 1.2)
term.setOption('fontFamily', gStore.terminal.fontFamily)
term.setOption('theme', {background: '#2b2b2b', foreground: '#A9B7C6', cursor: '#2b2b2b'})
term.attachCustomKeyEventHandler((arg) => {

View File

@ -121,11 +121,13 @@ function TransferIndex() {
</Breadcrumb>
<div className={style.index} hidden={token}>
<div className={style.left}>
<Card type="inner" title="数据源" extra={(<Space size={24}>
<Upload multiple beforeUpload={handleUpload}><Space className="btn"><UploadOutlined/>上传本地文件</Space></Upload>
<Card type="inner" title={`数据源${files.length ? `${files.length}` : ''}`} extra={(<Space size={24}>
<Upload multiple beforeUpload={handleUpload}><Space
className="btn"><UploadOutlined/>上传本地文件</Space></Upload>
<Space className="btn" onClick={handleAddHostFile}><CloudServerOutlined/>添加主机文件</Space>
</Space>)}>
<Table rowKey="id" showHeader={false} pagination={false} size="small" dataSource={files}>
<Table rowKey="id" className={style.table} showHeader={false} pagination={false} size="small"
dataSource={files}>
<Table.Column title="文件来源" dataIndex="name"/>
<Table.Column title="文件名称/路径" render={info => info.type === 'upload' ? info.path.name : (
<Input onChange={e => info.path = e.target.value} placeholder="请输入要同步的目录路径"/>)}/>
@ -134,7 +136,8 @@ function TransferIndex() {
</Table>
</Card>
<Card type="inner" title="分发目标" style={{margin: '24px 0'}} bodyStyle={{paddingBottom: 0}} extra={(
<Tooltip className={style.tips} title="文件分发功能依赖rsync大部分linux发行版默认都已安装如未安装可通过「批量执行/执行任务」进行批量安装。">
<Tooltip className={style.tips}
title="文件分发功能依赖rsync大部分linux发行版默认都已安装如未安装可通过「批量执行/执行任务」进行批量安装。">
<BulbOutlined/> 小提示
</Tooltip>
)}>

View File

@ -8,6 +8,12 @@
.left {
padding: 24px;
width: 60%;
border-right: 1px solid #dfdfdf;
.table {
max-height: calc(100vh - 600px);
overflow: auto;
}
.area {
cursor: pointer;