Skip to content

Commit

Permalink
feat: 编辑器开发
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rdfree committed Jan 10, 2022
1 parent 00b2aee commit beedf34
Show file tree
Hide file tree
Showing 3 changed files with 571 additions and 330 deletions.
17 changes: 13 additions & 4 deletions app/main/handlers/execYak.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { ipcMain, dialog } = require("electron");
const FS = require("fs");
const PATH = require("path");

module.exports = (win, getClient) => {
let stream;
Expand Down Expand Up @@ -61,10 +62,18 @@ module.exports = (win, getClient) => {
});

// 弹出保存窗口
const asyncSaveFileDialog = (params) => {
return dialog.showSaveDialog({
title: "保存文件",
defaultPath: params,
const asyncSaveFileDialog = async (params) => {
return new Promise((resolve, reject) => {
dialog
.showSaveDialog({
title: "保存文件",
defaultPath: params,
})
.then((res) => {
const params = res;
params.name = PATH.basename(res.filePath);
resolve(params);
});
});
};
ipcMain.handle("show-save-dialog", async (e, params) => {
Expand Down
50 changes: 39 additions & 11 deletions app/renderer/src/main/src/pages/invoker/YakExecutor.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,66 @@
padding: 5px 0;
}

.yak-executor-body .executor-left-body .ant-card-head-title {
padding: 1px 0;
.executor-file-list .ant-card-head-title {
padding: 5px 0;
}
.yak-executor-body .executor-left-body .ant-card-extra {
padding: 1px 0;
.executor-file-list .ant-card-extra {
padding: 5px 0;
}
.yak-executor-body .executor-left-body .file-list-icon {
.executor-file-list .file-list-icon {
margin-right: 5px;
cursor: pointer;
}
.yak-executor-body .executor-left-body .file-list {
.executor-file-list .file-list {
width: 100%;
height: 100%;
margin-top: 10;
margin-top: 7px;
position: relative;
overflow: auto;
}
.yak-executor-body .executor-left-body .file-list .list-opt {
.executor-file-list .file-list .list-opt {
width: 100%;
height: 22px;
line-height: 22px;
padding-left: 10px;
position: absolute;
cursor: pointer;
}
.yak-executor-body .executor-left-body .file-list.selected {
.executor-file-list .file-list.selected {
background-color: #cac7c7;
}
.yak-executor-body .executor-left-body .file-list .list-opt:hover {
.executor-file-list .file-list .list-opt:hover {
background-color: #e7e4e4;
}
.executor-file-list .file-list .list-opt .name {
font-size: 13px;
}
.executor-file-list .file-list .list-opt .input {
height: 20px;
}

.right-body-tab .ant-tabs-nav {
.executor-right-body {
height: 100%;
border: 1px solid #f0f0f0;
}
.executor-right-body .ant-tabs-nav {
margin: 0 0 2px 0;
height: 30px;
background-color: #e1e1e1;
}
.executor-right-body .ant-tabs-nav .ant-tabs-tab-btn {
font-size: 13px;
}

.right-editor .ant-tabs-nav .ant-tabs-tab-active {
background-color: #e8e9e8 !important;
border-bottom-color: #e8e9e8 !important;
}
.right-editor .ant-tabs-nav .ant-tabs-tab {
border: 1px solid #e8e9e8;
background-color: #eff1ef;
}

.right-xterm .ant-tabs-nav {
box-shadow: 0px 10px 10px #d3d3d3;
}
Loading

0 comments on commit beedf34

Please sign in to comment.