This commit is contained in:
Liang Ding 2019-05-17 09:27:22 +08:00
parent aa17c25400
commit eabce6b343
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
15 changed files with 97 additions and 188 deletions

View File

@ -102,7 +102,7 @@ func Load(confPath, confData, confServer, confLogLevel string) {
}
func initUsers() {
os.MkdirAll(Wide.Data + PathSeparator + "users", 0755)
os.MkdirAll(Wide.Data+PathSeparator+"users", 0755)
f, err := os.Open(Wide.Data + PathSeparator + "users")
if nil != err {
@ -325,7 +325,7 @@ func initCustomizedConfs() {
// UpdateCustomizedConf creates (if not exists) or updates user customized configuration files.
//
// 1. /static/user/{userId}/style.css
// 1. /static/users/{userId}/style.css
func UpdateCustomizedConf(userId string) {
var u *User
for _, user := range Users { // maybe it is a beauty of the trade-off of the another world between design and implementation
@ -347,7 +347,7 @@ func UpdateCustomizedConf(userId string) {
os.Exit(-1)
}
dir := filepath.Clean(Wide.Data + "/static/" + userId)
dir := filepath.Clean(Wide.Data + "/static/users/" + userId)
if err := os.MkdirAll(dir, 0755); nil != err {
logger.Error(err)

View File

@ -95,18 +95,13 @@ func main() {
// static resources
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
http.Handle("/static/users/", http.StripPrefix("/static/", http.FileServer(http.Dir("C:\\Users\\DL882\\wide\\static\\"))))
serveSingle("/favicon.ico", "./static/favicon.ico")
// oauth
http.HandleFunc("/oauth/github", session.RedirectGitHubHandler)
http.HandleFunc("/oauth/github/callback", session.GithubCallbackHandler)
// workspaces
for _, user := range conf.Users {
http.Handle("/workspace/"+user.Id+"/", http.StripPrefix("/workspace/"+user.Id+"/", http.FileServer(http.Dir(user.WorkspacePath()))))
http.Handle("/static/user/", http.StripPrefix("/workspace/"+user.Id+"/", http.FileServer(http.Dir(conf.Wide.Data + conf.PathSeparator + "static"))))
}
// session
http.HandleFunc("/session/ws", handlerWrapper(session.WSHandler))
http.HandleFunc("/session/save", handlerWrapper(session.SaveContentHandler))

View File

@ -185,9 +185,6 @@ func addUser(userId, userName, userAvatar string) string {
helloWorld(workspace)
conf.UpdateCustomizedConf(userId)
http.Handle("/workspace/"+userId+"/",
http.StripPrefix("/workspace/"+userId+"/", http.FileServer(http.Dir(newUser.WorkspacePath()))))
logger.Infof("Created a user [%s]", userId)
return userCreated

View File

@ -246,7 +246,7 @@ var editors = {
+ '"><span class="ico-start font-ico"></span> ' + config.label.start_page + '</span>',
content: '<div id="startPage"></div>',
after: function () {
$("#startPage").load(config.context + '/start?sid=' + config.wideSessionId);
$("#startPage").load('/start?sid=' + config.wideSessionId);
$.ajax({
url: "https://hacpai.com/apis/articles?tags=wide,golang&p=1&size=20",
type: "GET",
@ -329,7 +329,7 @@ var editors = {
$.ajax({
async: false, // 同步执行
type: 'POST',
url: config.context + '/autocomplete',
url: '/autocomplete',
data: JSON.stringify(request),
dataType: "json",
success: function (data) {
@ -435,7 +435,7 @@ var editors = {
$.ajax({
type: 'POST',
url: config.context + '/exprinfo',
url: '/exprinfo',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -583,7 +583,7 @@ var editors = {
$.ajax({
type: 'POST',
url: config.context + '/find/decl',
url: '/find/decl',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -613,7 +613,7 @@ var editors = {
$.ajax({
type: 'POST',
url: config.context + '/find/usages',
url: '/find/usages',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {

View File

@ -61,7 +61,7 @@ var menu = {
});
},
_initAbout: function () {
$("#dialogAbout").load(config.context + '/about', function () {
$("#dialogAbout").load('/about', function () {
$("#dialogAbout").dialog({
"modal": true,
"title": config.label.about,
@ -159,12 +159,12 @@ var menu = {
$.ajax({
type: 'POST',
url: config.context + '/logout',
url: '/logout',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
if (result.succ) {
window.location.href = config.context + "/login";
window.location.href = "/login";
}
}
});
@ -189,7 +189,7 @@ var menu = {
$.ajax({
type: 'POST',
url: config.context + '/go/get',
url: '/go/get',
data: JSON.stringify(request),
dataType: "json",
beforeSend: function () {
@ -216,7 +216,7 @@ var menu = {
$.ajax({
type: 'POST',
url: config.context + '/go/install',
url: '/go/install',
data: JSON.stringify(request),
dataType: "json",
beforeSend: function () {
@ -244,7 +244,7 @@ var menu = {
$.ajax({
type: 'POST',
url: config.context + '/go/test',
url: '/go/test',
data: JSON.stringify(request),
dataType: "json",
beforeSend: function () {
@ -272,7 +272,7 @@ var menu = {
$.ajax({
type: 'POST',
url: config.context + '/go/vet',
url: '/go/vet',
data: JSON.stringify(request),
dataType: "json",
beforeSend: function () {
@ -307,7 +307,7 @@ var menu = {
$.ajax({
type: 'POST',
url: config.context + '/build',
url: '/build',
data: JSON.stringify(request),
dataType: "json",
beforeSend: function () {
@ -340,7 +340,7 @@ var menu = {
$.ajax({
type: 'POST',
url: config.context + '/build',
url: '/build',
data: JSON.stringify(request),
dataType: "json",
beforeSend: function () {
@ -351,7 +351,7 @@ var menu = {
});
},
_initPreference: function () {
$("#dialogPreference").load(config.context + '/preference', function () {
$("#dialogPreference").load('/preference', function () {
$("#dialogPreference input").keyup(function () {
var isChange = false,
emptys = [],
@ -465,7 +465,7 @@ var menu = {
$.ajax({
type: 'POST',
url: config.context + '/preference',
url: '/preference',
data: JSON.stringify(request),
success: function (result, textStatus, jqXHR) {
if (!result.succ) {
@ -496,7 +496,7 @@ var menu = {
var $okBtn = $("#dialogPreference").closest(".dialog-main").find(".dialog-footer > button:eq(0)");
$okBtn.prop("disabled", true);
$("#themesLink").attr("href", config.staticServer + '/static/css/themes/' + $theme.val() + '.css');
$("#themesLink").attr("href", '/static/css/themes/' + $theme.val() + '.css');
config.editorTheme = $editorTheme.val();
for (var i = 0, ii = editors.data.length; i < ii; i++) {

View File

@ -91,7 +91,7 @@ var playground = {
$.ajax({
async: false, // 同步执行
type: 'POST',
url: config.context + '/playground/autocomplete',
url: '/playground/autocomplete',
data: JSON.stringify(request),
dataType: "json",
success: function (data) {
@ -356,7 +356,7 @@ var playground = {
$.ajax({
type: 'POST',
url: config.context + '/playground/save',
url: '/playground/save',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -375,7 +375,7 @@ var playground = {
request.url = url;
$.ajax({
type: 'POST',
url: config.context + '/playground/short-url',
url: '/playground/short-url',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -420,7 +420,7 @@ var playground = {
$.ajax({
type: 'POST',
url: config.context + '/playground/stop',
url: '/playground/stop',
data: JSON.stringify(request),
dataType: "json"
});
@ -443,7 +443,7 @@ var playground = {
$.ajax({
type: 'POST',
url: config.context + '/playground/save',
url: '/playground/save',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -462,7 +462,7 @@ var playground = {
$.ajax({
type: 'POST',
url: config.context + '/playground/build',
url: '/playground/build',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -482,7 +482,7 @@ var playground = {
$.ajax({
type: 'POST',
url: config.context + '/playground/run',
url: '/playground/run',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -509,7 +509,7 @@ var playground = {
$.ajax({
type: 'POST',
url: config.context + '/playground/save',
url: '/playground/save',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {

View File

@ -74,7 +74,7 @@ var session = {
$.ajax({
type: 'POST',
url: config.context + '/session/save',
url: '/session/save',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {

View File

@ -1,61 +0,0 @@
/*
* Copyright (c) 2014-2019, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* @file shell.js
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.1, Dec 8, 2015
*/
var shell = {
_shellWS: undefined,
_initWS: function () {
shell.shellWS = new ReconnectingWebSocket(config.channel + '/shell/ws?sid=' + config.wideSessionId);
shell.shellWS.onopen = function () {
console.log('[shell onopen] connected');
};
shell.shellWS.onmessage = function (e) {
console.log('[shell onmessage]' + e.data);
var data = JSON.parse(e.data);
if ('init-shell' !== data.cmd) {
$('#shellOutput').val(data.output);
}
};
shell.shellWS.onclose = function (e) {
console.log('[shell onclose] disconnected (' + e.code + ')');
};
shell.shellWS.onerror = function (e) {
console.log('[shell onerror] ' + e);
};
},
init: function () {
this._initWS();
$('#shellInput').keydown(function (event) {
if (13 === event.which) {
var input = {
cmd: $('#shellInput').val()
};
shell.shellWS.send(JSON.stringify(input));
$('#shellInput').val('');
}
});
}
};
$(document).ready(function () {
shell.init();
});

View File

@ -160,7 +160,7 @@ var tree = {
$.ajax({
async: false,
type: 'POST',
url: config.context + '/file/zip/new',
url: '/file/zip/new',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -175,7 +175,7 @@ var tree = {
});
if (isSucc) {
window.open(config.context + '/file/zip?path=' + wide.curNode.path + ".zip");
window.open('/file/zip?path=' + wide.curNode.path + ".zip");
}
},
crossCompile: function (platform) {
@ -186,7 +186,7 @@ var tree = {
$.ajax({
async: false,
type: 'POST',
url: config.context + '/cross',
url: '/cross',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -198,28 +198,6 @@ var tree = {
}
});
},
decompress: function () {
var request = newWideRequest();
request.path = wide.curNode.path;
$.ajax({
async: false,
type: 'POST',
url: config.context + '/file/decompress',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
if (!result.succ) {
$("#dialogAlert").dialog("open", result.msg);
return false;
}
var dir = wide.curNode.getParentNode();
tree.fileTree.reAsyncChildNodes(dir, "refresh");
}
});
},
refresh: function (it) {
if (it) {
if ($(it).hasClass("disabled")) {
@ -238,7 +216,7 @@ var tree = {
$.ajax({
type: 'POST',
url: config.context + '/files',
url: '/files',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -257,7 +235,7 @@ var tree = {
},
async: {
enable: true,
url: config.context + "/file/refresh",
url: "/file/refresh",
autoParam: ["path"]
},
callback: {
@ -392,7 +370,7 @@ var tree = {
$.ajax({
async: false,
type: 'POST',
url: config.context + '/file',
url: '/file',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -419,7 +397,7 @@ var tree = {
if ("img" === data.mode) { // 是图片文件的话新建 tab 打开
// 最好是开 tab但这个最终取决于浏览器设置
var w = window.open(config.context + data.path);
var w = window.open(data.path);
return false;
}
@ -481,7 +459,7 @@ var tree = {
$.ajax({
type: 'POST',
url: config.context + '/file/search/text',
url: '/file/search/text',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -517,7 +495,7 @@ var tree = {
$.ajax({
type: 'POST',
url: config.context + '/file/rename',
url: '/file/rename',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {

View File

@ -38,7 +38,7 @@ var wide = {
$.ajax({
type: 'POST',
async: false,
url: config.context + '/outline',
url: '/outline',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -121,7 +121,7 @@ var wide = {
$.ajax({
type: 'POST',
url: config.context + '/file/remove',
url: '/file/remove',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -159,7 +159,7 @@ var wide = {
$.ajax({
type: 'POST',
url: config.context + '/file/new',
url: '/file/new',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -203,7 +203,7 @@ var wide = {
$.ajax({
type: 'POST',
url: config.context + '/file/new',
url: '/file/new',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -264,7 +264,7 @@ var wide = {
$.ajax({
type: 'POST',
url: config.context + '/file/find/name',
url: '/file/find/name',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -360,7 +360,7 @@ var wide = {
$.ajax({
type: 'POST',
url: config.context + '/run',
url: '/run',
data: JSON.stringify(request),
dataType: "json"
});
@ -441,7 +441,7 @@ var wide = {
$.ajax({
async: false,
type: 'POST',
url: config.context + '/file/zip/new',
url: '/file/zip/new',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -456,7 +456,7 @@ var wide = {
});
if (path) {
window.open(config.context + '/file/zip?path=' + path + ".zip");
window.open('/file/zip?path=' + path + ".zip");
}
}
}
@ -521,7 +521,7 @@ var wide = {
$.ajax({
type: 'POST',
url: config.context + '/file/save',
url: '/file/save',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -557,7 +557,7 @@ var wide = {
request.nextCmd = ""; // build only, no following operation
$.ajax({
type: 'POST',
url: config.context + '/build',
url: '/build',
data: JSON.stringify(request),
dataType: "json",
beforeSend: function () {
@ -590,7 +590,7 @@ var wide = {
$.ajax({
type: 'POST',
url: config.context + '/stop',
url: '/stop',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -612,7 +612,7 @@ var wide = {
$.ajax({
async: false, // sync
type: 'POST',
url: config.context + '/go/fmt',
url: '/go/fmt',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {
@ -645,7 +645,7 @@ var wide = {
$.ajax({
async: false, // sync
type: 'POST',
url: config.context + '/go/fmt',
url: '/go/fmt',
data: JSON.stringify(request),
dataType: "json",
success: function (result) {

10
static/js/wide.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,27 +8,27 @@
<meta name="author" content="B3log">
<meta property="og:description" content="A Web-based IDE for Teams using Golang, do your development anytime, anywhere."/>
{{if eq $.conf.RuntimeMode "dev"}}
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/jquery-layout/layout-default-latest.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/codemirror.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/hint/show-hint.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/lint/lint.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/foldgutter.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/dialog/dialog.css">
<link rel="stylesheet" href="/static/js/lib/jquery-layout/layout-default-latest.css">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/codemirror.css">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/hint/show-hint.css">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/lint/lint.css">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/foldgutter.css">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/dialog/dialog.css">
{{range $index, $theme := .editorThemes}}
<link rel="stylesheet" href="{{$.conf.Server}}/static/js/overwrite/codemirror/theme/{{$theme}}.css">{{end}}
<link rel="stylesheet" href="{{.conf.Server}}/static/css/dialog.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/base.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/wide.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/side.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/start.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/about.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/js/overwrite/codemirror/theme/{{$theme}}.css">{{end}}
<link rel="stylesheet" href="/static/css/dialog.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/base.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/wide.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/side.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/start.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/about.css?{{.conf.StaticResourceVersion}}">
{{else}}
<link rel="stylesheet" href="{{.conf.Server}}/static/css/lib.min.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/wide.min.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/lib.min.css">
<link rel="stylesheet" href="/static/css/wide.min.css?{{.conf.StaticResourceVersion}}">
{{end}}
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/ztree/zTreeStyle.min.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/user/{{.uid}}/style.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/themes/{{.user.Theme}}.css?{{.conf.StaticResourceVersion}}" id="themesLink">
<link rel="stylesheet" href="/static/js/lib/ztree/zTreeStyle.min.css">
<link rel="stylesheet" href="/static/users/{{.uid}}/style.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/themes/{{.user.Theme}}.css?{{.conf.StaticResourceVersion}}" id="themesLink">
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
@ -558,12 +558,12 @@
</div>
</div>
<script>
var channelScheme = "https" === window.location.protocol ? "wss":"ws";
var channel = channelScheme + "://" + window.location.hostname;
var config = {
"context": {{.conf.Context}},
"staticServer": '{{.conf.Server}}',
"pathSeparator": '{{.pathSeparator}}',
"label": {{.i18n}},
"channel": {{.conf.Channel}},
"channel": channel,
"wideSessionId": '{{.sid}}',
"editorTheme": '{{.user.Editor.Theme}}',
"latestSessionContent": {{.latestSessionContent}},

View File

@ -8,20 +8,20 @@
<meta name="description" content="A Web-based IDE for Teams using Golang, do your development anytime, anywhere."/>
<meta name="author" content="B3log">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/codemirror.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/hint/show-hint.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/foldgutter.css">
<link rel="stylesheet" href="{{.conf.Server}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/dialog/dialog.css">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/codemirror.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/hint/show-hint.css">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/foldgutter.css">
<link rel="stylesheet" href="/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/dialog/dialog.css">
<link rel="stylesheet" href="{{$.conf.Server}}/static/js/overwrite/codemirror/theme/wide.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/dialog.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/base.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/wide.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/about.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/themes/default.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/sign.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/side.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/playground.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/dialog.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/base.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/wide.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/about.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/themes/default.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/sign.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/side.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/playground.css?{{.conf.StaticResourceVersion}}">
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
@ -30,7 +30,7 @@
<ul class="fn-left">
<li>
<a href="/" target="_blank">
<img title="Wide, a Web-based IDE for Teams using Golang." src="{{.conf.Server}}/static/images/wide-logo.png"
<img title="Wide, a Web-based IDE for Teams using Golang." src="{{.conf.Server}}/static/images/wide-logo.png"
class="logo"/></a>
</li>
<li>
@ -82,10 +82,10 @@
<div id="dialogAbout" class="fn-none"></div>
<div id="dialogShare" class="fn-none"></div>
<script>
var channelScheme = "https" === window.location.protocol ? "wss":"ws";
var channel = channelScheme + "://" + window.location.hostname;
var config = {
"context": "{{.conf.Context}}",
"staticServer": "{{.conf.Server}}",
"channel": "{{.conf.Channel}}",
"channel": channel,
"wideSessionId": "{{.sid}}",
"label": {{.i18n}},
"autocomplete": {{.conf.Autocomplete}}

View File

@ -8,8 +8,8 @@
<meta name="description" content="A Web-based IDE for Teams using Golang, do your development anytime, anywhere."/>
<meta name="author" content="B3log">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/base.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="{{.conf.Server}}/static/css/sign.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/base.css?{{.conf.StaticResourceVersion}}">
<link rel="stylesheet" href="/static/css/sign.css?{{.conf.StaticResourceVersion}}">
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
<body>