🔨 添加工具栏功能.

This commit is contained in:
lijiahangmax
2025-07-08 00:45:23 +08:00
parent fc151216f1
commit bfde435071
8 changed files with 78 additions and 16 deletions

View File

@@ -47,6 +47,9 @@ public class VncConnectConfig extends BaseConnectConfig {
@Schema(description = "低带宽模式") @Schema(description = "低带宽模式")
private Boolean lowBandwidthMode; private Boolean lowBandwidthMode;
@Schema(description = "交换红蓝")
private Boolean swapRedBlue;
@Schema(description = "时区") @Schema(description = "时区")
private String timezone; private String timezone;

View File

@@ -51,4 +51,9 @@ public class HostVncExtraModel implements GenericsDataModel {
*/ */
private Boolean lowBandwidthMode; private Boolean lowBandwidthMode;
/**
* 交换红蓝
*/
private Boolean swapRedBlue;
} }

View File

@@ -44,6 +44,7 @@ public class HostVncExtraStrategy extends AbstractGenericsDataStrategy<HostVncEx
public HostVncExtraModel getDefault() { public HostVncExtraModel getDefault() {
return HostVncExtraModel.builder() return HostVncExtraModel.builder()
.lowBandwidthMode(false) .lowBandwidthMode(false)
.swapRedBlue(false)
.build(); .build();
} }

View File

@@ -368,6 +368,7 @@ public class HostConnectServiceImpl implements HostConnectService {
if (extra != null) { if (extra != null) {
// 设置额外配置信息 // 设置额外配置信息
connectConfig.setLowBandwidthMode(extra.getLowBandwidthMode()); connectConfig.setLowBandwidthMode(extra.getLowBandwidthMode());
connectConfig.setSwapRedBlue(extra.getSwapRedBlue());
// 设置自定义端口 // 设置自定义端口
Integer extraPort = extra.getPort(); Integer extraPort = extra.getPort();
if (extraPort != null) { if (extraPort != null) {

View File

@@ -436,6 +436,11 @@ public class TerminalPreferenceModel implements GenericsDataModel {
*/ */
private String position; private String position;
/**
* 会话信息
*/
private Boolean info;
/** /**
* 显示设置 * 显示设置
*/ */
@@ -446,18 +451,33 @@ public class TerminalPreferenceModel implements GenericsDataModel {
*/ */
private Boolean combinationKey; private Boolean combinationKey;
/**
* 长按键
*/
private Boolean triggerKey;
/** /**
* 剪切板 * 剪切板
*/ */
private Boolean clipboard; private Boolean clipboard;
/** /**
* 上传 * RDP 上传
*/ */
private Boolean upload; private Boolean rdpUpload;
/** /**
* 保存为 rdp 文件 * SFTP 上传
*/
private Boolean sftpUpload;
/**
* 打开 SFTP
*/
private Boolean openSftp;
/**
* 保存为 RDP 文件
*/ */
private Boolean saveRdp; private Boolean saveRdp;
@@ -466,6 +486,11 @@ public class TerminalPreferenceModel implements GenericsDataModel {
*/ */
private Boolean disconnect; private Boolean disconnect;
/**
* 重新连接
*/
private Boolean reconnect;
/** /**
* 关闭 * 关闭
*/ */
@@ -527,11 +552,6 @@ public class TerminalPreferenceModel implements GenericsDataModel {
*/ */
private Boolean forceLossless; private Boolean forceLossless;
/**
* 交换红蓝
*/
private Boolean swapRedBlue;
/** /**
* 光标 * 光标
*/ */
@@ -560,6 +580,11 @@ public class TerminalPreferenceModel implements GenericsDataModel {
*/ */
private String position; private String position;
/**
* 会话信息
*/
private Boolean info;
/** /**
* 显示设置 * 显示设置
*/ */
@@ -570,16 +595,37 @@ public class TerminalPreferenceModel implements GenericsDataModel {
*/ */
private Boolean combinationKey; private Boolean combinationKey;
/**
* 长按键
*/
private Boolean triggerKey;
/** /**
* 剪切板 * 剪切板
*/ */
private Boolean clipboard; private Boolean clipboard;
/**
* SFTP 上传
*/
private Boolean sftpUpload;
/**
* 打开 SFTP
*/
private Boolean openSftp;
/** /**
* 断开连接 * 断开连接
*/ */
private Boolean disconnect; private Boolean disconnect;
/**
* 重新连接
*/
private Boolean reconnect;
/** /**
* 关闭 * 关闭
*/ */

View File

@@ -206,12 +206,17 @@ public class TerminalPreferenceStrategy extends AbstractGenericsDataStrategy<Ter
private String getDefaultRdpActionBarSetting() { private String getDefaultRdpActionBarSetting() {
return TerminalPreferenceModel.RdpActionBarSettingModel.builder() return TerminalPreferenceModel.RdpActionBarSettingModel.builder()
.position("top") .position("top")
.info(true)
.display(true) .display(true)
.combinationKey(true) .combinationKey(true)
.triggerKey(false)
.clipboard(true) .clipboard(true)
.upload(true) .rdpUpload(true)
.saveRdp(true) .sftpUpload(false)
.openSftp(false)
.saveRdp(false)
.disconnect(true) .disconnect(true)
.reconnect(false)
.close(true) .close(true)
.build() .build()
.toJsonString(); .toJsonString();
@@ -243,7 +248,6 @@ public class TerminalPreferenceStrategy extends AbstractGenericsDataStrategy<Ter
.displayHeight(0) .displayHeight(0)
.colorDepth(24) .colorDepth(24)
.forceLossless(true) .forceLossless(true)
.swapRedBlue(false)
.cursor("local") .cursor("local")
.compressLevel(5) .compressLevel(5)
.qualityLevel(5) .qualityLevel(5)
@@ -259,10 +263,15 @@ public class TerminalPreferenceStrategy extends AbstractGenericsDataStrategy<Ter
private String getDefaultVncSessionSetting() { private String getDefaultVncSessionSetting() {
return TerminalPreferenceModel.VncActionBarSettingModel.builder() return TerminalPreferenceModel.VncActionBarSettingModel.builder()
.position("top") .position("top")
.info(true)
.display(true) .display(true)
.combinationKey(true) .combinationKey(true)
.triggerKey(false)
.clipboard(true) .clipboard(true)
.sftpUpload(true)
.openSftp(true)
.disconnect(true) .disconnect(true)
.reconnect(false)
.close(true) .close(true)
.build() .build()
.toJsonString(); .toJsonString();

View File

@@ -138,11 +138,6 @@ public class TerminalChannelExtra {
// -------------------- vnc -------------------- // -------------------- vnc --------------------
/**
* 交换红蓝
*/
private Boolean swapRedBlue;
/** /**
* 光标 * 光标
*/ */

View File

@@ -71,6 +71,8 @@ public class VncSession extends AbstractGuacdSession<TerminalSessionVncConfig> i
tunnel.setParameter(GuacdConst.FORCE_LOSSLESS, extra.getForceLossless()); tunnel.setParameter(GuacdConst.FORCE_LOSSLESS, extra.getForceLossless());
tunnel.setParameter(GuacdConst.COMPRESS_LEVEL, extra.getCompressLevel()); tunnel.setParameter(GuacdConst.COMPRESS_LEVEL, extra.getCompressLevel());
tunnel.setParameter(GuacdConst.QUALITY_LEVEL, extra.getQualityLevel()); tunnel.setParameter(GuacdConst.QUALITY_LEVEL, extra.getQualityLevel());
// 交换红蓝
tunnel.setParameter(GuacdConst.SWAP_RED_BLUE, config.getSwapRedBlue());
// 光标设置 // 光标设置
tunnel.setParameter(GuacdConst.CURSOR, extra.getCursor()); tunnel.setParameter(GuacdConst.CURSOR, extra.getCursor());
// 编码设置 // 编码设置