Skip to content

Commit 376a1bf

Browse files
committed
adjusts styles
1 parent b2cee63 commit 376a1bf

File tree

8 files changed

+123
-60
lines changed

8 files changed

+123
-60
lines changed

app.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ func (a *App) GetCheatSheet(program string) string {
7373
var session string
7474
_ = rows.Scan(&command, &about, &session)
7575
commands := map[string]string{
76-
command: about,
76+
"command": command,
77+
"about": about,
7778
}
7879
data[session] = append(data[session], commands)
7980
}

frontend/package-lock.json

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

frontend/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{
22
"name": "frontend",
33
"private": true,
4-
"version": "0.0.0",
4+
"version": "0.2.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "vue-tsc --noEmit && vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12+
"@primeuix/themes": "^1.0.1",
13+
"primevue": "^4.3.3",
1214
"vue": "^3.2.37"
1315
},
1416
"devDependencies": {
17+
"@babel/types": "^7.18.10",
1518
"@vitejs/plugin-vue": "^3.0.3",
1619
"typescript": "^4.6.4",
1720
"vite": "^3.0.7",
18-
"vue-tsc": "^1.8.27",
19-
"@babel/types": "^7.18.10"
21+
"vue-tsc": "^1.8.27"
2022
}
2123
}

frontend/package.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bb7ffb87329c9ad4990374471d4ce9a4
1+
ced8d5b88095d219f174b5ebe09e134e

frontend/src/App.vue

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<script lang="ts" setup>
22
import { reactive } from 'vue'
33
import { GetPrograms, GetCheatSheet } from '../wailsjs/go/main/App'
4+
import DataTable from 'primevue/datatable';
5+
import Column from 'primevue/column';
6+
import Menu from 'primevue/menu';
47
58
const data = reactive({
69
programs: [],
@@ -28,13 +31,11 @@ listPrograms()
2831
<br>
2932
</div>
3033
<div v-for="(value, key) in data.currentContent" class="content-area">
31-
<h4 id="tabela1">{{ key }}</h4>
32-
<table v-for="vvalue in value">
33-
<tr v-for="(chv, vle) in vvalue">
34-
<td>{{ chv }}</td>
35-
<td>{{ vle }}</td>
36-
</tr>
37-
</table>
34+
<h4>{{ key }}</h4>
35+
<DataTable :value="value">
36+
<Column field="command"></Column>
37+
<Column field="about"></Column>
38+
</DataTable>
3839
</div>
3940
</div>
4041
</template>
@@ -49,7 +50,6 @@ listPrograms()
4950
.vertical-menu {
5051
width: 200px;
5152
height: 100vh;
52-
background-color: #f8f9fa;
5353
padding: 10px;
5454
position: fixed;
5555
overflow-y: scroll;
@@ -60,17 +60,13 @@ listPrograms()
6060
.vertical-menu a {
6161
display: block;
6262
padding: 10px;
63-
color: #333;
6463
text-decoration: none;
6564
}
6665
67-
.vertical-menu a:hover {
68-
background-color: #ddd;
69-
}
70-
7166
.content-area {
7267
margin-left: 220px;
73-
padding: 20px;
68+
padding-left: 20px;
69+
padding-top: 5px;
7470
width: calc(100% - 220px);
7571
}
7672
</style>

frontend/src/main.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
import {createApp} from 'vue'
22
import App from './App.vue'
33
import './style.css';
4+
import PrimeVue from 'primevue/config'
5+
import Aura from '@primeuix/themes/aura'
46

5-
createApp(App).mount('#app')
7+
const app = createApp(App)
8+
app.mount('#app')
9+
app.use(PrimeVue, {
10+
theme: {
11+
preset: Aura,
12+
options: {
13+
prefix: 'p',
14+
darkModeSelector: 'system',
15+
cssLayer: false
16+
}
17+
}
18+
})

frontend/src/style.css

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
html {
2-
background-color: rgb(226, 226, 226);
3-
}
4-
51
body {
62
margin: 0;
73
display: flex;
@@ -22,37 +18,6 @@ body {
2218
height: 100vh;
2319
}
2420

25-
.menu {
26-
width: 200px;
27-
height: 1000px;
28-
background-color: #f4f4f4;
29-
padding: 15px;
30-
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
31-
}
32-
.menu a {
33-
display: block;
34-
padding: 10px;
35-
text-decoration: none;
36-
color: #333;
37-
}
38-
.menu a:hover {
39-
background-color: #ddd;
40-
}
41-
.content_tables {
42-
flex-grow: 1;
43-
flex: 1;
44-
padding: 15px;
45-
}
46-
table {
47-
width: 100%;
48-
border-collapse: collapse;
49-
margin-bottom: 20px;
50-
}
51-
th, td {
52-
border: 1px solid #ccc;
53-
padding: 10px;
54-
text-align: left;
55-
}
56-
th {
57-
background-color: #f2f2f2;
21+
.p-datatable .p-datatable-thead {
22+
display: none;
5823
}

wails.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"info": {
1414
"companyName": "mvrpl_br",
1515
"productName": "Desktop Cheat Sheet",
16-
"productVersion": "0.1.0"
16+
"productVersion": "0.2.0"
1717
},
1818
"nsisType": "single"
1919
}

0 commit comments

Comments
 (0)