This commit is contained in:
parent
08fe6aa03d
commit
1a29030d88
|
@ -50,7 +50,6 @@
|
|||
"restore_bottom": "底部窗口还原",
|
||||
"file_format": "文件后缀",
|
||||
"keyword": "关键字",
|
||||
"start_page": "起始页",
|
||||
"user_guide": "用户指南",
|
||||
"dev_guide": "开发指南",
|
||||
"keyboard_shortcuts": "键盘快捷键",
|
||||
|
@ -67,8 +66,6 @@
|
|||
"jump_to_decl": "跳转到声明",
|
||||
"show_expr_info": "查看表达式信息",
|
||||
"find_usages": "查找使用",
|
||||
"format": "格式化",
|
||||
"goto_line": "跳转到行",
|
||||
"delete_line": "删除当前行",
|
||||
"save_editor_file": "保存当前编辑器文件",
|
||||
"save_all_editors_files": "保存所有编辑器文件",
|
||||
|
@ -84,6 +81,8 @@
|
|||
"focus_output": "焦点切换到输出窗口",
|
||||
"focus_search": "焦点切换到搜索窗口",
|
||||
"focus_notification": "焦点切换到通知窗口",
|
||||
|
||||
"start-build": "开始构建",
|
||||
"build-succ": "构建成功",
|
||||
"build-failed": "构建失败",
|
||||
"colon": ":"
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/b3log/wide/conf"
|
||||
"github.com/b3log/wide/i18n"
|
||||
"github.com/b3log/wide/session"
|
||||
"github.com/b3log/wide/util"
|
||||
"github.com/golang/glog"
|
||||
|
@ -271,7 +272,7 @@ func BuildHandler(w http.ResponseWriter, r *http.Request) {
|
|||
if nil != session.OutputWS[sid] {
|
||||
// 在前端 output 中显示“开始构建”
|
||||
|
||||
channelRet["output"] = "go build"
|
||||
channelRet["output"] = i18n
|
||||
channelRet["cmd"] = "pre-build"
|
||||
|
||||
wsChannel := session.OutputWS[sid]
|
||||
|
|
|
@ -664,6 +664,8 @@ var wide = {
|
|||
success: function (data) {
|
||||
if (data.succ) {
|
||||
curEditor.setValue(data.code);
|
||||
curEditor.setCursor(cursor);
|
||||
curEditor.scrollTo(null, scrollInfo.top);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -674,6 +676,8 @@ var wide = {
|
|||
// 在客户端浏览器中进行 JSON 格式化
|
||||
var json = JSON.parse(curEditor.getValue());
|
||||
curEditor.setValue(JSON.stringify(json, "", " "));
|
||||
curEditor.setCursor(cursor);
|
||||
curEditor.scrollTo(null, scrollInfo.top);
|
||||
|
||||
wide._save();
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue