瀏覽代碼

Small fixes

master
rayburgemeestre 6 年之前
父節點
當前提交
f748a2dede
共有 3 個檔案被更改,包括 18 行新增3 行删除
  1. +1
    -1
      Makefile
  2. +4
    -0
      docker_api/api.py
  3. +13
    -2
      src/App.vue

+ 1
- 1
Makefile 查看文件

@@ -44,4 +44,4 @@ clean:

.PHONY: release
release: clean build docker_api docker_web docker_api_publish docker_web_publish
echo OK, on the Kubernetes host execute: kubectl delete pod -l "app in (cheerpapiapp, cheerpwebapp)"
echo OK, on the Kubernetes host execute: kubectl delete pod -l '"app in (cheerpapiapp, cheerpwebapp)"'

+ 4
- 0
docker_api/api.py 查看文件

@@ -37,6 +37,10 @@ def compile():
for env in os.environ:
f.write("{}={}\n".format(env, os.environ[env]))
f.close()
with open("/data/{}/{}/headers".format(uuid_, counter), "w") as f:
for k, v in request.headers:
f.write("{}: {}\n".format(k, v))
f.close()
with open("/data/{}/{}/source".format(uuid_, counter), "w") as f:
f.write(note)
f.close()

+ 13
- 2
src/App.vue 查看文件

@@ -91,7 +91,7 @@
</ul>
</div>
<editor-component v-if="js_tabs == 1" v-model="js_code" name="js" language="javascript" height="50vh"/>
<editor-component v-if="js_tabs == 2 && wasm_code" v-model="wasm_code" name="wasm" language="javascript" height="80vh"/>
<editor-component v-if="js_tabs == 2 && wasm_code" v-model="wasm_code" name="wasm" language="javascript" height="50vh"/>
</div>
<div class="row">
<div class="tabs">
@@ -190,7 +190,11 @@
share_link: {
type: String,
default: '',
}
},
hash_set: {
type: Boolean,
default: false,
},

},
components: {
@@ -274,6 +278,9 @@
this.uuid = response.data.uuid
this.version = response.data.version
this.share_link = 'https://cheerp.cppse.nl/#' + this.uuid + ":" + this.version
this.hash_set = true
window.location.hash = '#' + this.uuid + ":" + this.version

console.log(this.uuid)
console.log(this.version)
}.bind(this))
@@ -313,6 +320,10 @@
},
created: function() {
var hashchange_fun = function() {
if (this.hash_set) {
this.hash_set = false;
return;
}
if (window.location.hash.length > 3) {
var h = window.location.hash.substr(1).split(':')
if (h.length == 2) {

Loading…
取消
儲存