menu
This commit is contained in:
parent
305ff80112
commit
1f64fec7c7
|
@ -4,10 +4,18 @@
|
||||||
"run": "运行",
|
"run": "运行",
|
||||||
"debug": "调试",
|
"debug": "调试",
|
||||||
"help": "帮助",
|
"help": "帮助",
|
||||||
|
"check_update": "检查更新",
|
||||||
|
"report_issues": "提建议",
|
||||||
|
"wide_doc": "Wide 文档",
|
||||||
|
"about": "About",
|
||||||
"create_file": "创建文件",
|
"create_file": "创建文件",
|
||||||
"create_dir": "创建目录",
|
"create_dir": "创建目录",
|
||||||
"delete": "删除",
|
"delete": "删除",
|
||||||
"save": "保存",
|
"save": "保存",
|
||||||
|
"exit": "退出",
|
||||||
|
"close_file": "关闭文件",
|
||||||
|
"close_all_files": "关闭所有文件",
|
||||||
|
"save_all_files": "保存所有文件",
|
||||||
"format": "格式化",
|
"format": "格式化",
|
||||||
"goget": "go get",
|
"goget": "go get",
|
||||||
"goinstall": "go install",
|
"goinstall": "go install",
|
||||||
|
|
|
@ -28,8 +28,6 @@ outputWS.onmessage = function(e) {
|
||||||
|
|
||||||
// 触发一次 gutter lint
|
// 触发一次 gutter lint
|
||||||
CodeMirror.signal(wide.curEditor, "change", wide.curEditor);
|
CodeMirror.signal(wide.curEditor, "change", wide.curEditor);
|
||||||
|
|
||||||
return;
|
|
||||||
} else if ('go get' === data.cmd || 'go install' === data.cmd) {
|
} else if ('go get' === data.cmd || 'go install' === data.cmd) {
|
||||||
$('#output').text($('#output').text() + data.output);
|
$('#output').text($('#output').text() + data.output);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +89,7 @@ var wide = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
save: function() {
|
saveFile: function() {
|
||||||
var request = {
|
var request = {
|
||||||
"file": wide.curNode.path,
|
"file": wide.curNode.path,
|
||||||
"code": wide.curEditor.getValue()
|
"code": wide.curEditor.getValue()
|
||||||
|
@ -105,6 +103,18 @@ var wide = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
saveAllFiles: function() {
|
||||||
|
// TODO: save all
|
||||||
|
},
|
||||||
|
closeFile: function() {
|
||||||
|
// TODO: save all
|
||||||
|
},
|
||||||
|
closeAllFiles: function() {
|
||||||
|
// TODO: save all
|
||||||
|
},
|
||||||
|
exit: function() {
|
||||||
|
// TODO: exit
|
||||||
|
},
|
||||||
run: function() {
|
run: function() {
|
||||||
var request = {
|
var request = {
|
||||||
"file": wide.curNode.path,
|
"file": wide.curNode.path,
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<link rel="stylesheet" href="{{.Wide.StaticServer}}/static/css/side.css?{{.Wide.StaticResourceVersion}}">
|
<link rel="stylesheet" href="{{.Wide.StaticServer}}/static/css/side.css?{{.Wide.StaticResourceVersion}}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<!-- 主菜单 -->
|
||||||
<div class="menu fn-clear">
|
<div class="menu fn-clear">
|
||||||
<ul class="fn-cleaer">
|
<ul class="fn-cleaer">
|
||||||
<li>
|
<li>
|
||||||
|
@ -23,13 +24,19 @@
|
||||||
<div class="frame">
|
<div class="frame">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="/doc/{{.locale}}/index.html" target="_blank">{{.i18n.file}}</a>
|
<span onclick="wide.saveFile()">{{.i18n.save}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/doc/{{.locale}}/index.html" target="_blank">{{.i18n.file}}</a>
|
<span onclick="wide.saveAllFiles()">{{.i18n.save_all_files}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/doc/{{.locale}}/index.html" target="_blank">{{.i18n.file}}</a>
|
<span onclick="wide.closeFile()">{{.i18n.close_file}}</span>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span onclick="wide.closeAllFiles()">{{.i18n.close_all_files}}</span>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span onclick="wide.exit()">{{.i18n.exit}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,13 +46,13 @@
|
||||||
<div class="frame">
|
<div class="frame">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span>{{.i18n.run}}</span>
|
<span onclick="wide.run()">{{.i18n.build_n_run}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>{{.i18n.run}}</span>
|
<span onclick="wide.goget()">{{.i18n.goget}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>{{.i18n.run}}</span>
|
<span onclick="wide.goinstall()">{{.i18n.goinstall}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,16 +62,26 @@
|
||||||
<div class="frame">
|
<div class="frame">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span>{{.i18n.run}}</span>
|
<span>{{.i18n.debug}}</span>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<span>{{.i18n.run}}</span>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/doc/{{.locale}}/index.html" target="_blank">{{.i18n.help}}</a>
|
<span>{{.i18n.help}}</span>
|
||||||
|
<div class="frame">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/doc/{{.locale}}/index.html" target="_blank">{{.i18n.wide_doc}}</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://github.com/b3log/wide/issues/new" target="_blank">{{.i18n.report_issues}}</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/doc/{{.locale}}/index.html" target="_blank">{{.i18n.about}}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -72,8 +89,6 @@
|
||||||
<button onclick="wide.run()">{{.i18n.build_n_run}}</button>
|
<button onclick="wide.run()">{{.i18n.build_n_run}}</button>
|
||||||
<button onclick="wide.save()">{{.i18n.save}}</button>
|
<button onclick="wide.save()">{{.i18n.save}}</button>
|
||||||
<button onclick="wide.fmt()">{{.i18n.format}}</button>
|
<button onclick="wide.fmt()">{{.i18n.format}}</button>
|
||||||
<button onclick="wide.goget()">{{.i18n.goget}}</button>
|
|
||||||
<button onclick="wide.goinstall()">{{.i18n.goinstall}}</button>
|
|
||||||
<span class="fn-none ico-fullscreen" onclick="editors.fullscreen()">{{.i18n.full_screen}}</span>
|
<span class="fn-none ico-fullscreen" onclick="editors.fullscreen()">{{.i18n.full_screen}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue