feat: 终端操作栏配置化.

This commit is contained in:
lijiahang
2024-01-11 16:55:37 +08:00
parent 8e03368e85
commit 25acde6d1e
16 changed files with 409 additions and 221 deletions

View File

@@ -24,15 +24,18 @@ public class TerminalPreferenceModel implements PreferenceModel {
@Schema(description = "新建连接类型")
private String newConnectionType;
@Schema(description = "终端主题")
private JSONObject theme;
@Schema(description = "显示设置")
private JSONObject displaySetting;
@Schema(description = "操作栏设置")
private JSONObject actionBarSetting;
@Schema(description = "背景设置")
private JSONObject backgroundSetting;
@Schema(description = "终端主题")
private JSONObject theme;
@Data
@Builder
@NoArgsConstructor

View File

@@ -16,21 +16,24 @@ public class TerminalPreferenceStrategy implements IPreferenceStrategy<TerminalP
@Override
public TerminalPreferenceModel getDefault() {
// 默认显示设置
JSONObject defaultDisplaySetting = TerminalPreferenceModel.DisplaySettingModel
.builder()
.fontFamily("_")
.fontSize(14)
.lineHeight(1.00)
.fontWeight("normal")
.fontWeightBold("bold")
.cursorStyle("bar")
.cursorBlink(true)
.build()
.toJson();
return TerminalPreferenceModel.builder()
.newConnectionType("group")
.displaySetting(TerminalPreferenceModel.DisplaySettingModel.builder()
.fontFamily("_")
.fontSize(12)
.lineHeight(1.00)
.fontWeight("normal")
.fontWeightBold("bold")
.cursorStyle("bar")
.cursorBlink(true)
.build()
.toJson()
)
.backgroundSetting(new JSONObject())
.theme(new JSONObject())
.displaySetting(defaultDisplaySetting)
.actionBarSetting(new JSONObject())
.backgroundSetting(new JSONObject())
.build();
}