Selaa lähdekoodia

Small fixes

master
rayburgemeestre 6 vuotta sitten
vanhempi
commit
f748a2dede
3 muutettua tiedostoa jossa 18 lisäystä ja 3 poistoa
  1. +1
    -1
      Makefile
  2. +4
    -0
      docker_api/api.py
  3. +13
    -2
      src/App.vue

+ 1
- 1
Makefile Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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…
Peruuta
Tallenna