Skip to content

Commit a3fa71c

Browse files
chore: wip
1 parent d7aa409 commit a3fa71c

File tree

12 files changed

+109
-106
lines changed

12 files changed

+109
-106
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,43 @@
11
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
22
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
3+
use tauri::{CustomMenuItem, Menu, MenuItem, Submenu};
4+
5+
#[derive(Clone, serde::Serialize)]
6+
struct Payload {
7+
message: String,
8+
}
39

410
fn main() {
11+
let npm = CustomMenuItem::new("npm".to_string(), "Npm");
12+
let redis = CustomMenuItem::new("redis".to_string(), "Redis");
13+
let deps = Submenu::new("Dependencies", Menu::new().add_item(npm).add_item(redis));
14+
15+
let settings = CustomMenuItem::new("settings".to_string(), "Settings");
16+
let quit = CustomMenuItem::new("quit".to_string(), "Quit");
17+
let file_menu = Submenu::new("File", Menu::new().add_item(settings).add_item(quit));
18+
19+
let menu = Menu::new()
20+
.add_native_item(MenuItem::Copy)
21+
.add_item(CustomMenuItem::new("hide", "Hide"))
22+
.add_submenu(deps)
23+
.add_submenu(file_menu);
24+
525
tauri::Builder::default()
26+
.menu(menu)
27+
.on_menu_event(|event| {
28+
match event.menu_item_id() {
29+
"quit" => {
30+
std::process::exit(0);
31+
}
32+
"settings" => {
33+
event::emit("error", Payload { message: "Tauri is awesome!".into() }).unwrap();
34+
}
35+
"close" => {
36+
event.window().close().unwrap();
37+
}
38+
_ => {}
39+
}
40+
})
641
.run(tauri::generate_context!())
742
.expect("error while running tauri application");
843
}

.stacks/core/desktop/src-tauri/tauri.conf.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"beforeBuildCommand": "pnpm build",
55
"beforeDevCommand": "pnpm dev",
66
"devPath": "https://stacks.test:5173",
7-
"distDir": "../../../views/desktop/dashboard/dist"
7+
"distDir": "../../../views/desktop/dashboard/dist",
8+
"withGlobalTauri": true
89
},
910
"package": {
1011
"productName": "stacks",

.stacks/stacks/dashboard/src/components/Navbar.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<script></script>
2+
13
<template>
24
<div class="sticky top-0 z-10 flex h-16 shrink-0 items-center gap-x-4 border-b border-gray-200 bg-white px-4 shadow-sm sm:gap-x-6 sm:px-6 lg:px-8">
35
<button

.stacks/stacks/dashboard/src/components/Sidebar.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
to="/"
2828
class="sidebar-links group"
2929
>
30-
<div class="i-heroicons-home w-6 h-6"></div>
30+
<div class="i-heroicons-home w-6 h-6" />
3131
Dashboard
3232
</router-link>
3333
</li>
@@ -36,7 +36,7 @@
3636
to="/deployments"
3737
class="sidebar-links group"
3838
>
39-
<div class="i-heroicons-clock w-6 h-6"></div>
39+
<div class="i-heroicons-clock w-6 h-6" />
4040
Deployments
4141
</router-link>
4242
</li>
@@ -45,7 +45,7 @@
4545
to="/commands"
4646
class="sidebar-links group"
4747
>
48-
<div class="i-heroicons-command-line w-6 h-6"></div>
48+
<div class="i-heroicons-command-line w-6 h-6" />
4949
Commands
5050
</router-link>
5151
</li>
@@ -54,7 +54,7 @@
5454
to="/dns"
5555
class="sidebar-links group"
5656
>
57-
<div class="i-heroicons-cloud w-6 h-6"></div>
57+
<div class="i-heroicons-cloud w-6 h-6" />
5858
DNS
5959
</router-link>
6060
</li>
@@ -63,16 +63,16 @@
6363
to="/environment"
6464
class="sidebar-links group"
6565
>
66-
<div class="i-heroicons-cpu-chip w-6 h-6"></div>
66+
<div class="i-heroicons-cpu-chip w-6 h-6" />
6767
Environment
68-
</router-link>
68+
</router-link>
6969
</li>
7070
<li>
7171
<router-link
7272
to="/dependencies"
7373
class="sidebar-links group"
7474
>
75-
<div class="i-heroicons-cube w-6 h-6"></div>
75+
<div class="i-heroicons-cube w-6 h-6" />
7676
Dependencies
7777
</router-link>
7878
</li>
@@ -81,7 +81,7 @@
8181
to="/queue"
8282
class="sidebar-links group"
8383
>
84-
<div class="i-heroicons-queue-list w-6 h-6"></div>
84+
<div class="i-heroicons-queue-list w-6 h-6" />
8585
Queue
8686
</router-link>
8787
</li>
@@ -90,7 +90,7 @@
9090
to="/library"
9191
class="sidebar-links group"
9292
>
93-
<div class="i-heroicons-building-library w-6 h-6"></div>
93+
<div class="i-heroicons-building-library w-6 h-6" />
9494
Library
9595
</router-link>
9696
</li>
@@ -99,7 +99,7 @@
9999
to="/health"
100100
class="sidebar-links group"
101101
>
102-
<div class="i-heroicons-heart w-6 h-6"></div>
102+
<div class="i-heroicons-heart w-6 h-6" />
103103
Health
104104
</router-link>
105105
</li>
@@ -179,7 +179,7 @@
179179
to="/settings/account"
180180
class="group -mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6 text-gray-700 hover:bg-gray-50 hover:text-blue-600"
181181
>
182-
<div class="i-heroicons-cog w-6 h-6"></div>
182+
<div class="i-heroicons-cog w-6 h-6" />
183183
Settings
184184
</router-link>
185185
</li>

.stacks/stacks/dashboard/src/pages/commands/index.vue

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,7 @@
126126
href="#"
127127
class="text-gray-400 text-left hover:text-gray-500 duration-150 ease-in-out transition"
128128
>
129-
<svg
130-
fill="currentColor"
131-
viewBox="0 0 20 20"
132-
xmlns="http://www.w3.org/2000/svg"
133-
aria-hidden="true"
134-
class="w-5 h-5"
135-
>
136-
<path d="M10 3a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM10 8.5a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM11.5 15.5a1.5 1.5 0 10-3 0 1.5 1.5 0 003 0z" />
137-
</svg>
129+
<div class="i-heroicons-ellipsis-vertical w-6 h-6" />
138130

139131
</a>
140132
</td>
@@ -162,15 +154,7 @@
162154
href="#"
163155
class="text-gray-400 text-left hover:text-gray-500 duration-150 ease-in-out transition"
164156
>
165-
<svg
166-
fill="currentColor"
167-
viewBox="0 0 20 20"
168-
xmlns="http://www.w3.org/2000/svg"
169-
aria-hidden="true"
170-
class="w-5 h-5"
171-
>
172-
<path d="M10 3a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM10 8.5a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM11.5 15.5a1.5 1.5 0 10-3 0 1.5 1.5 0 003 0z" />
173-
</svg>
157+
<div class="i-heroicons-ellipsis-vertical w-6 h-6" />
174158

175159
<div
176160
class="absolute hidden dropdown-menu right-20 z-10 mt-2 w-48 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"
@@ -218,17 +202,3 @@
218202
</div>
219203
</div>
220204
</template>
221-
222-
<style>
223-
code {
224-
@apply rounded-lg !important
225-
}
226-
227-
.table-responsive {
228-
position: static !important;
229-
}
230-
231-
.table-responsive{
232-
overflow-y: visible !important;
233-
}
234-
</style>

.stacks/stacks/dashboard/src/pages/dependencies/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<div class="mt-4 flex justify-end">
3737
<button
3838
type="button"
39-
class="rounded bg-blue-600 px-2 py-1 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
39+
class="rounded bg-blue-600 px-3 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
4040
>
4141
Add
4242
</button>

.stacks/stacks/dashboard/src/pages/deployments/[id].vue

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,7 @@ const flag = ref(false)
154154
<div
155155
class="sm:flex sm:flex-col sm:items-end"
156156
>
157-
<svg
158-
fill="currentColor"
159-
viewBox="0 0 20 20"
160-
xmlns="http://www.w3.org/2000/svg"
161-
aria-hidden="true"
162-
class="h-6 w-6 text-green-500"
163-
>
164-
<path
165-
clip-rule="evenodd"
166-
fill-rule="evenodd"
167-
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
168-
/>
169-
</svg>
157+
<div class="i-heroicons-check-circle-20-solid text-green-500 w-6 h-6" />
170158
</div>
171159
</div>
172160
</div>
@@ -227,19 +215,7 @@ const flag = ref(false)
227215
<div
228216
class="sm:flex sm:flex-col sm:items-end"
229217
>
230-
<svg
231-
fill="currentColor"
232-
viewBox="0 0 20 20"
233-
xmlns="http://www.w3.org/2000/svg"
234-
aria-hidden="true"
235-
class="h-6 w-6 text-green-500"
236-
>
237-
<path
238-
clip-rule="evenodd"
239-
fill-rule="evenodd"
240-
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
241-
/>
242-
</svg>
218+
<div class="i-heroicons-check-circle-20-solid text-green-500 w-6 h-6" />
243219
</div>
244220
</div>
245221
</div>
@@ -300,19 +276,7 @@ const flag = ref(false)
300276
<div
301277
class=" sm:flex sm:flex-col sm:items-end"
302278
>
303-
<svg
304-
fill="currentColor"
305-
viewBox="0 0 20 20"
306-
xmlns="http://www.w3.org/2000/svg"
307-
aria-hidden="true"
308-
class="text-red-500 w-6 h-6"
309-
>
310-
<path
311-
clip-rule="evenodd"
312-
fill-rule="evenodd"
313-
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"
314-
/>
315-
</svg>
279+
<div class="i-heroicons-x-circle-20-solid text-red-500 w-6 h-6" />
316280
</div>
317281
</div>
318282
</div>

.stacks/stacks/dashboard/src/pages/dns/index.vue

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,7 @@ function openAddDnsSection() {
9898
href="#"
9999
class="text-gray-400 text-left hover:text-gray-500 duration-150 ease-in-out transition"
100100
>
101-
<svg
102-
fill="currentColor"
103-
viewBox="0 0 20 20"
104-
xmlns="http://www.w3.org/2000/svg"
105-
aria-hidden="true"
106-
class="w-5 h-5"
107-
>
108-
<path d="M10 3a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM10 8.5a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM11.5 15.5a1.5 1.5 0 10-3 0 1.5 1.5 0 003 0z" />
109-
</svg>
101+
<div class="i-heroicons-ellipsis-vertical w-6 h-6" />
110102
</a>
111103
</td>
112104
</tr>
@@ -131,15 +123,7 @@ function openAddDnsSection() {
131123
href="#"
132124
class="text-gray-400 text-left hover:text-gray-500 duration-150 ease-in-out transition"
133125
>
134-
<svg
135-
fill="currentColor"
136-
viewBox="0 0 20 20"
137-
xmlns="http://www.w3.org/2000/svg"
138-
aria-hidden="true"
139-
class="w-5 h-5"
140-
>
141-
<path d="M10 3a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM10 8.5a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM11.5 15.5a1.5 1.5 0 10-3 0 1.5 1.5 0 003 0z" />
142-
</svg>
126+
<div class="i-heroicons-ellipsis-vertical w-6 h-6" />
143127

144128
</a>
145129
</td>
@@ -217,6 +201,16 @@ function openAddDnsSection() {
217201
</div>
218202
</div>
219203
</div>
204+
205+
<div class="justify-end flex mt-4">
206+
<button
207+
type="button"
208+
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
209+
@click="openAddDnsSection"
210+
>
211+
Save
212+
</button>
213+
</div>
220214
</div>
221215
</div>
222216
</template>

.stacks/stacks/dashboard/src/pages/environment/index.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,25 @@
2727
</div>
2828
</div>
2929
<div>
30-
<pre
30+
<textarea
3131
v-highlightjs
32+
rows="10"
33+
class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
3234
>
33-
<code class="plaintext">
3435
VITE_API_BASE_URL=https://stacks.test/api/v3
3536
VITE_API_ROOT_BASE_URL=https://stacks.test
3637
VITE_MEILISEARCH_HOST=http://127.0.0.1:7700/
3738
VITE_MEILISEARCH_KEY=
3839
VITE_FLAREAPP_BASE_URL=https://flareapp.io/api
3940
VITE_FLAREAPP_KEY=aaaaaa
4041
VITE_FLAREAPP_REPORTS_KEY=bbbbbb
41-
</code></pre>
42+
</textarea>
4243
</div>
4344
<div>
4445
<div class="mt-4 flex justify-end">
4546
<button
4647
type="button"
47-
class="rounded bg-blue-600 px-2 py-1 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
48+
class="rounded bg-blue-600 px-3 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
4849
>
4950
Save
5051
</button>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
code {
2+
@apply rounded-lg !important
3+
}
4+
5+
.table-responsive {
6+
position: static !important;
7+
}
8+
9+
.table-responsive{
10+
overflow-y: visible !important;
11+
}
12+
13+
textarea {
14+
@apply resize-none;
15+
}
16+
17+
18+
/* textarea {
19+
background: #1c1c1c !important;
20+
color: #FFFFFF !important;
21+
} */

0 commit comments

Comments
 (0)