Skip to content

Commit b236db4

Browse files
committed
changes for release 3.0 - v1
1 parent 41362f6 commit b236db4

File tree

7 files changed

+25
-13
lines changed

7 files changed

+25
-13
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/base/basecanvas.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ export default {
262262
this.extract_codespace(codespace)
263263
this.socketOn(this)
264264
}
265+
266+
this.$store.commit("codespaces/interPanelAsm",! this.$store.state.compile.usecurl);
267+
265268
},
266269
mounted() {
267270
this.local_widthQuery.addEventListener('change',()=>{

src/components/modales/complementos.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
v-model="usecurl"
4949
name="curlmode"
5050
value="on"
51+
@change="panelAsm"
5152
unchecked-value="off">
5253
Usar libcurl (http) <b-icon icon="cloud"></b-icon>
5354
</b-form-checkbox>
@@ -79,7 +80,9 @@ export default {
7980
computed:{
8081
...mapState( 'base', ["visibles"]),
8182
usecurl: {
82-
get(){return this.$store.state.compile.usecurl; },
83+
get(){
84+
return this.$store.state.compile.usecurl;
85+
},
8386
set(value) {
8487
localStorage.setItem("usecurl", value)
8588
this.$store.state.compile.usecurl = value;

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'es6-promise/auto'
1919

2020
import { io } from "socket.io-client";
2121

22-
const socket = io('https://lobster-app-tadp5.ondigitalocean.app',{
22+
const socket = io('https://api-kcompiler-moi-2blrb.ondigitalocean.app',{
2323
reconnectionDelay: 10000
2424
})
2525

src/stores/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
const state = () => ({
33
//base
4-
API: "http://localhost:3000/api/v2/",
4+
API: "https://api-kcompiler-moi-2blrb.ondigitalocean.app/api/v2/",
55
paypal: "https://www.paypal.com/paypalme/bohorquezrojas17",
66
github: "https://github.com/scyth3-c",
77

src/stores/codespaces.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ const state = () => ({
1818
globalTimer: null,
1919
fastGlobalTimer: null,
2020
emisor: false,
21-
asmPanel: true,
21+
asmPanel:
22+
! localStorage.getItem("asmPanel")
23+
? true
24+
: JSON.parse(localStorage.getItem("asmPanel")),
2225

2326
share: {
2427
buffer: "",
@@ -281,8 +284,10 @@ const mutations = {
281284
env.$store.dispatch('compile/reagentAssembly',env);
282285
},
283286

284-
interPanelAsm(state){
285-
state.asmPanel =!state.asmPanel;
287+
interPanelAsm(state, val = !state.asmPanel){
288+
289+
state.asmPanel = val;
290+
286291
state.codeSpaces.forEach((item)=>{
287292
item.visibleAsm = state.asmPanel;
288293
});
@@ -326,7 +331,6 @@ const actions = {
326331
if (state.visibles.colab && state.visibles.codespace !== "null") {
327332
enviroment.$socketio.on("actualizacion_base", async (args) => {
328333
if (args === state.visibles.codespace) {
329-
console.log("args: ", args);
330334
const code = await axios.get(
331335
`${state.API}codespace/findone?id=${args}`
332336
);

src/stores/compile.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,20 @@ const state = () => ({
127127

128128
const removeCommandRegex = /Error: Command failed: (.+)([\s\S]+)/;
129129
const tempFileRegex = /\/knockapi\/src\/c\+\+\/temp\/temp_file/g;
130+
const uid = /\/[0-9a-f-]+/g
130131
const cppFileRegex = /(\w+)\.cpp/g;
131132

133+
132134
const { actualCodeSpace, codeSpaces } = state.codespaces;
133135
const codeSpace = codeSpaces[actualCodeSpace];
134136

135137
codeSpace.asm = raw
136138
.replace(removeCommandRegex, '$2')
137-
.replace(tempFileRegex, '.')
138-
.replace(cppFileRegex, '.');
139+
.replace(tempFileRegex, '')
140+
.replace(uid, '')
141+
.replace(cppFileRegex, "");
139142
}
140143

141-
142144
}
143145
}
144146
}

0 commit comments

Comments
 (0)