8000 wip: repl ui · NuruProgramming/NuruIDLE@64c9ed8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 64c9ed8

Browse files
committed
wip: repl ui
1 parent e6d2c0e commit 64c9ed8

File tree

5 files changed

+48
-15
lines changed

5 files changed

+48
-15
lines changed

frontend/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8"/>
55
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
6-
<title>NuruIDLE</title>
6+
<title>Nuru IDLE</title>
77
</head>
88
<body>
99
<div id="app" class="width-100 heigth-100"></div>

frontend/src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const toggleDark = useToggle(isDark);
77
</script>
88

99
<template>
10-
<el-input></el-input>
1110
<Repl />
1211
</template>
1312

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<template>
22
<div>
3-
<input v-model="input" />
4-
<button @click="sendToEngine">Send</button>
5-
6-
<div>The response is : {{ response }}</div>
3+
<div v-for="entry in entries">
4+
<div>>>> {{ entry.input }}</div>
5+
<div>
6+
{{ entry.response }}
7+
</div>
8+
</div>
9+
<el-input v-model="input" @keyup.enter="sendToEngine"></el-input>
710
</div>
811
</template>
912

@@ -14,24 +17,39 @@ export default {
1417
data() {
1518
return {
1619
input: "",
17-
response: "",
20+
entries: [
21+
{
22+
input: "x + 2",
23+
response: " 2",
24+
},
25+
],
1826
};
1927
},
2028
methods: {
2129
sendToEngine() {
2230
console.log("im there");
2331
2432
Start(this.input)
25-
.then((resp) => {
33+
.then((resp, other) => {
2634
console.log("im here");
27-
this.response = resp;
35+
this.createNewEntry(this.input, resp);
2836
console.log(resp);
37+
console.log("other", other);
2938
})
30-
.catch(() => {
39+
.catch((error) => {
40+
console.log(error);
41+
42+
this.createNewEntry(this.input, error);
3143
console.log("im failed");
3244
});
3345
console.log("im done");
3446
},
47+
createNewEntry(item, respone) {
48+
this.entries.push({
49+
input: item,
50+
response: respone,
51+
});
52+
},
3553
},
3654
};
3755
</script>

frontend/src/style.css

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
:root {
24
--vt-c-white: #ffffff;
35
--vt-c-white-soft: #f8f8f8;
@@ -159,11 +161,25 @@
159161
background: var(--color-background);
160162
transition: color 0.5s, background-color 0.5s;
161163
line-height: 1.6;
162-
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
163-
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
164-
font-size: 15px;
164+
font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
165+
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
166+
sans-serif;
165167
text-rendering: optimizeLegibility;
166168
-webkit-font-smoothing: antialiased;
167169
-moz-osx-font-smoothing: grayscale;
168170
}
169-
171+
172+
173+
@font-face {
174+
font-family: "Nunito";
175+
font-style: normal;
176+
font-weight: 400;
177+
src: local(""),
178+
url("assets/fonts/nunito-v16-latin-regular.woff2") format("woff2");
179+
}
180+
181+
#app {
182+
height: 100vh;
183+
text-align: left;
184+
padding: 20px;
185+
}

frontend/wailsjs/go/main/App.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
22
// This file is automatically generated. DO NOT EDIT
33

4-
export function Start(arg1:string):Promise<string|Array<string>>;
4+
export function Start(arg1:string):Promise<any>;

0 commit comments

Comments
 (0)
0