build run stop
This commit is contained in:
parent
22403f3b83
commit
fae810df5e
|
@ -15,9 +15,13 @@
|
|||
"Password": "admin",
|
||||
"Workspace": "{pwd}/data/user_workspaces/admin",
|
||||
"LatestSessionContent": {
|
||||
"FileTree": [],
|
||||
"Files": [],
|
||||
"CurrentFile": ""
|
||||
"FileTree": [
|
||||
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest"
|
||||
],
|
||||
"Files": [
|
||||
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\1123"
|
||||
],
|
||||
"CurrentFile": "E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\1123"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -36,5 +36,6 @@
|
|||
"goto": "跳转",
|
||||
"input_no_empty": "输入不能为空",
|
||||
"tip": "提示",
|
||||
"confirm": "确定"
|
||||
"confirm": "确定",
|
||||
"stop": "停止"
|
||||
}
|
|
@ -261,8 +261,9 @@ var wide = {
|
|||
wide.curProcessId = data.pid;
|
||||
} else if ('run-done' === data.cmd) { // 运行结束
|
||||
wide.curProcessId = undefined;
|
||||
|
||||
// TODO: 运行结束后修改 [构建&运行] 图标状态为可用状态
|
||||
// 运行结束后修改 [构建&运行] 图标状态为可用状态
|
||||
$(".toolbars .ico-stop").removeClass("ico-stop")
|
||||
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
||||
} else if ('build' === data.cmd || 'go install' === data.cmd) {
|
||||
$('.bottom-window-group .output').text(data.output);
|
||||
|
||||
|
@ -275,7 +276,8 @@ var wide = {
|
|||
message: lint.msg, severity: lint.severity});
|
||||
}
|
||||
|
||||
// TODO: 修改 [构建&运行] 图标状态为可用状态
|
||||
$(".toolbars .ico-stop").removeClass("ico-stop")
|
||||
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
||||
}
|
||||
|
||||
// 触发一次 gutter lint
|
||||
|
@ -294,7 +296,7 @@ var wide = {
|
|||
},
|
||||
init: function () {
|
||||
this._initWS();
|
||||
|
||||
|
||||
this._initLayout();
|
||||
|
||||
this._initBottomWindowGroup();
|
||||
|
@ -352,11 +354,11 @@ var wide = {
|
|||
// TODO: exit
|
||||
},
|
||||
stop: function () {
|
||||
if ($(".toolbars .ico-buildrun").length === 1) {
|
||||
if ($(".toolbars .ico-buildrun").length === 1) {
|
||||
wide.run();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var request = newWideRequest();
|
||||
request.pid = wide.curProcessId;
|
||||
|
||||
|
@ -369,7 +371,8 @@ var wide = {
|
|||
// $('.bottom-window-group .output').text('');
|
||||
},
|
||||
success: function (data) {
|
||||
$(".toolbars .ico-stop").removeClass("ico-stop").addClass("ico-buildrun");
|
||||
$(".toolbars .ico-stop").removeClass("ico-stop")
|
||||
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -378,8 +381,8 @@ var wide = {
|
|||
if ($(".toolbars .ico-stop").length === 1) {
|
||||
wide.stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var request = newWideRequest();
|
||||
request.file = $(".edit-header .current span:eq(0)").attr("title");
|
||||
request.code = wide.curEditor.getValue();
|
||||
|
@ -393,7 +396,8 @@ var wide = {
|
|||
$('.bottom-window-group .output').text('');
|
||||
},
|
||||
success: function (data) {
|
||||
$(".toolbars .ico-buildrun").addClass("ico-stop").removeClass("ico-buildrun");
|
||||
$(".toolbars .ico-buildrun").addClass("ico-stop")
|
||||
.removeClass("ico-buildrun").attr("title", config.label.stop);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -195,7 +195,9 @@
|
|||
"create_file": "{{.i18n.create_file}}",
|
||||
"create_dir": "{{.i18n.create_dir}}",
|
||||
"tip": "{{.i18n.tip}}",
|
||||
"confirm": "{{.i18n.confirm}}"
|
||||
"confirm": "{{.i18n.confirm}}",
|
||||
"build_n_run": "{{.i18n.build_n_run}}",
|
||||
"stop": "{{.i18n.stop}}"
|
||||
},
|
||||
"channel": {
|
||||
"editor": '{{.conf.EditorChannel}}',
|
||||
|
|
Loading…
Reference in New Issue