完成资产附加属性功能

This commit is contained in:
dushixiang
2021-02-12 15:42:02 +08:00
parent 25c3c6b929
commit 7599c09191
10 changed files with 72 additions and 270 deletions

View File

@ -575,23 +575,45 @@ class Access extends Component {
</Affix>
</Draggable>
<Draggable>
<Affix style={{position: 'absolute', top: 100, right: 100}}>
<Button icon={<AppstoreTwoTone/>} onClick={() => {
this.setState({
fileSystemVisible: true,
});
}}/>
</Affix>
</Draggable>
{
this.state.protocol === 'rdp' ?
<>
<Draggable>
<Affix style={{position: 'absolute', top: 100, right: 100}}>
<Button icon={<AppstoreTwoTone/>} onClick={() => {
this.setState({
fileSystemVisible: true,
});
}}/>
</Affix>
</Draggable>
<Draggable>
<Affix style={{position: 'absolute', top: 100, right: 150}}>
<Dropdown overlay={menu} trigger={['click']} placement="bottomLeft">
<Button icon={<DesktopOutlined/>}/>
</Dropdown>
</Affix>
</Draggable>
</> : undefined
}
{
this.state.protocol === 'ssh' ?
<>
<Draggable>
<Affix style={{position: 'absolute', top: 100, right: 100}}>
<Button icon={<AppstoreTwoTone/>} onClick={() => {
this.setState({
fileSystemVisible: true,
});
}}/>
</Affix>
</Draggable>
</> : undefined
}
<Draggable>
<Affix style={{position: 'absolute', top: 100, right: 150}}>
<Dropdown overlay={menu} trigger={['click']} placement="bottomLeft">
<Button icon={<DesktopOutlined/>}/>
</Dropdown>
</Affix>
</Draggable>
<Drawer
title={'会话详情'}

View File

@ -285,128 +285,6 @@ Windows需要对远程应用程序的名称使用特殊的符号。
<Input type='text' placeholder="remote app的命令行参数"/>
</Form.Item>
</Panel>
<Panel header={<Text strong>性能</Text>} key="">
<Form.Item
{...RDPFormItemLayout}
name="enable-wallpaper"
label="启用桌面墙纸"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
<Form.Item
{...RDPFormItemLayout}
name="enable-theming"
label="启用桌面主题"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
<Form.Item
{...RDPFormItemLayout}
name="enable-font-smoothing"
label="启用字体平滑ClearType"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
<Form.Item
{...RDPFormItemLayout}
name="enable-full-window-drag"
label="启用全窗口拖拽"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
<Form.Item
{...RDPFormItemLayout}
name="enable-desktop-composition"
label="启用桌面合成效果Aero"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
<Form.Item
{...RDPFormItemLayout}
name="enable-menu-animations"
label="启用菜单动画"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
<Form.Item
{...RDPFormItemLayout}
name="disable-bitmap-caching"
label="禁用位图缓存"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
<Form.Item
{...RDPFormItemLayout}
name="disable-offscreen-caching"
label="禁用离屏缓存"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
<Form.Item
{...RDPFormItemLayout}
name="disable-glyph-caching"
label="禁用字形缓存"
valuePropName="checked"
rules={[
{
required: true,
},
]}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
</Panel>
</> : undefined
}
@ -503,14 +381,6 @@ Windows需要对远程应用程序的名称使用特殊的符号。
<Option value="remote">远程</Option>
</Select>
</Form.Item>
<Form.Item
name="swap-red-blue"
label="交换红蓝成分"
valuePropName="checked"
>
<Switch checkedChildren="开启" unCheckedChildren="关闭"/>
</Form.Item>
</Panel>
<Panel header={<Text strong>VNC中继</Text>} key="VNC">
<Form.Item label={<Tooltip

View File

@ -41,7 +41,6 @@ class Setting extends Component {
rdpSettingFormRef = React.createRef();
sshSettingFormRef = React.createRef();
vncSettingFormRef = React.createRef();
telnetSettingFormRef = React.createRef();
otherSettingFormRef = React.createRef();
componentDidMount() {
@ -72,6 +71,9 @@ class Setting extends Component {
if (!properties.hasOwnProperty(key)) {
continue;
}
if (properties[key] === '-') {
properties[key] = '';
}
if (key.startsWith('enable') || key.startsWith("disable" || key === 'swap-red-blue')) {
properties[key] = properties[key].bool();
}
@ -93,10 +95,6 @@ class Setting extends Component {
this.vncSettingFormRef.current.setFieldsValue(properties)
}
if (this.telnetSettingFormRef.current) {
this.telnetSettingFormRef.current.setFieldsValue(properties)
}
if (this.otherSettingFormRef.current) {
this.otherSettingFormRef.current.setFieldsValue(properties)
}
@ -317,11 +315,11 @@ class Setting extends Component {
</Form.Item>
</Form>
</TabPane>
<TabPane tab="SSH配置" key="ssh">
<TabPane tab="SSH/TELNET配置" key="ssh">
<Form ref={this.sshSettingFormRef} name="ssh" onFinish={this.changeProperties}
layout="vertical">
<Title level={3}>SSH配置</Title>
<Title level={3}>SSH/TELNET配置</Title>
<Form.Item
{...formItemLayout}
@ -474,97 +472,6 @@ class Setting extends Component {
</Form.Item>
</Form>
</TabPane>
<TabPane tab="TELNET配置" key="telnet">
<Form ref={this.telnetSettingFormRef} name="telnet" onFinish={this.changeProperties}
layout="vertical">
<Title level={3}>TELNET配置</Title>
<Form.Item
{...formItemLayout}
name="color-scheme"
label="配色方案"
rules={[
{
required: true,
message: '配色方案',
},
]}
initialValue="gray-black"
>
<Select style={{width: 120}} onChange={null}>
<Option value="gray-black">黑底灰字</Option>
<Option value="green-black">黑底绿字</Option>
<Option value="white-black">黑底白字</Option>
<Option value="black-white">白底黑字</Option>
</Select>
</Form.Item>
<Form.Item
{...formItemLayout}
name="font-name"
label="字体名称"
rules={[
{
required: true,
message: '字体名称',
},
]}
>
<Input type='text' placeholder="请输入字体名称"/>
</Form.Item>
<Form.Item
{...formItemLayout}
name="font-size"
label="字体大小"
rules={[
{
required: true,
message: '字体大小',
},
]}
>
<Input type='number' placeholder="请输入字体大小"/>
</Form.Item>
<Form.Item
name="backspace"
label="退格键映射"
{...formItemLayout}
initialValue=""
>
<Select onChange={null}>
<Option value="">默认</Option>
<Option value="127">删除键(Ctrl-?)</Option>
<Option value="8">退格键(Ctrl-H)</Option>
</Select>
</Form.Item>
<Form.Item
name="terminal-type"
label="终端类型"
{...formItemLayout}
initialValue=""
>
<Select onChange={null}>
<Option value="">默认</Option>
<Option value="ansi">ansi</Option>
<Option value="linux">linux</Option>
<Option value="vt100">vt100</Option>
<Option value="vt220">vt220</Option>
<Option value="xterm">xterm</Option>
<Option value="xterm-256color">xterm-256color</Option>
</Select>
</Form.Item>
<Form.Item {...formTailLayout}>
<Button type="primary" htmlType="submit">
更新
</Button>
</Form.Item>
</Form>
</TabPane>
<TabPane tab="其他配置" key="other">
<Title level={3}>Guacd 服务配置</Title>
<Form ref={this.otherSettingFormRef} name="password" onFinish={this.changeProperties}