Skip to content

Commit 330180d

Browse files
chore: wip
1 parent 25315b5 commit 330180d

File tree

19 files changed

+852
-79
lines changed

19 files changed

+852
-79
lines changed

.stacks/core/desktop/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@
4747
"README.md"
4848
],
4949
"scripts": {
50-
"build": "vite build ../../views/desktop/dashboard -c ../../vite/src/desktop.ts",
50+
"build": "vite build ../../views/desktop/dashboard -c ../vite/src/desktop.ts",
5151
"dev": "vite dev ../../views/desktop/dashboard -c ../vite/src/desktop.ts",
5252
"dev:desktop": "tauri dev",
53+
"build:desktop": "tauri build",
5354
"typecheck": "tsc --noEmit"
5455
},
5556
"peerDependencies": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"beforeBuildCommand": "pnpm build",
55
"beforeDevCommand": "pnpm dev",
66
"devPath": "https://stacks.test:5173",
7-
"distDir": "../../../views/desktop/dist"
7+
"distDir": "../../../views/desktop/dashboard/dist"
88
},
99
"package": {
1010
"productName": "stacks",

.stacks/core/desktop/typed-router.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ declare module 'vue-router/auto/routes' {
4343
'/commands/': RouteRecordInfo<'/commands/', '/commands', Record<never, never>, Record<never, never>>,
4444
'/dependencies/': RouteRecordInfo<'/dependencies/', '/dependencies', Record<never, never>, Record<never, never>>,
4545
'/deployments/': RouteRecordInfo<'/deployments/', '/deployments', Record<never, never>, Record<never, never>>,
46+
'/deployments/[id]': RouteRecordInfo<'/deployments/[id]', '/deployments/:id', { id: ParamValue<true> }, { id: ParamValue<false> }>,
4647
'/dns/': RouteRecordInfo<'/dns/', '/dns', Record<never, never>, Record<never, never>>,
4748
'/environment/': RouteRecordInfo<'/environment/', '/environment', Record<never, never>, Record<never, never>>,
4849
'/health/': RouteRecordInfo<'/health/', '/health', Record<never, never>, Record<never, never>>,
@@ -51,7 +52,9 @@ declare module 'vue-router/auto/routes' {
5152
'/models/events': RouteRecordInfo<'/models/events', '/models/events', Record<never, never>, Record<never, never>>,
5253
'/models/users': RouteRecordInfo<'/models/users', '/models/users', Record<never, never>, Record<never, never>>,
5354
'/queue/': RouteRecordInfo<'/queue/', '/queue', Record<never, never>, Record<never, never>>,
54-
'/settings/': RouteRecordInfo<'/settings/', '/settings', Record<never, never>, Record<never, never>>,
55+
'/settings/account': RouteRecordInfo<'/settings/account', '/settings/account', Record<never, never>, Record<never, never>>,
56+
'/settings/billing': RouteRecordInfo<'/settings/billing', '/settings/billing', Record<never, never>, Record<never, never>>,
57+
'/settings/integration': RouteRecordInfo<'/settings/integration', '/settings/integration', Record<never, never>, Record<never, never>>,
5558
'/teams/[id]': RouteRecordInfo<'/teams/[id]', '/teams/:id', { id: ParamValue<true> }, { id: ParamValue<false> }>,
5659
}
5760
}

.stacks/core/vite/src/desktop.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig, loadEnv } from 'vite'
22
import type { ViteConfig } from '@stacksjs/types'
3-
import { frameworkPath, projectPath, storagePath } from '@stacksjs/path'
3+
import { frameworkPath, projectPath, projectStoragePath } from '@stacksjs/path'
44
import type { ViteDevServer as DevServer } from 'vite'
55
import { app, library } from '@stacksjs/config'
66
import { alias } from '@stacksjs/alias'
@@ -14,7 +14,7 @@ export const vueComponentsConfig: ViteConfig = {
1414
root: frameworkPath('views/desktop/dashboard'),
1515
envDir: projectPath(),
1616
envPrefix: 'FRONTEND_',
17-
publicDir: storagePath('public'),
17+
publicDir: projectStoragePath('public'),
1818

1919
server: {
2020
https: true,
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<script setup lang="ts">
2+
import { onMounted, onUnmounted, ref } from 'vue'
3+
4+
const emit = defineEmits(['closeModal'])
5+
const status = ref(false as boolean)
6+
const statusTransition = ref(false as boolean)
7+
8+
onMounted(() => {
9+
status.value = true
10+
document.body.style.overflowY = 'hidden'
11+
})
12+
13+
onUnmounted(() => {
14+
status.value = false
15+
document.body.style.overflowY = 'visible'
16+
})
17+
</script>
18+
19+
<template>
20+
<div
21+
class="fixed inset-x-0 bottom-0 px-4 pb-6 sm:inset-0 sm:p-0 sm:flex sm:items-center sm:justify-center"
22+
:style="statusTransition ? 'z-index: 20' : 'z-index: -1' "
23+
>
24+
<transition
25+
enter-active-class="opacity-0 "
26+
enter-class="duration-300 ease-out"
27+
enter-to-class="opacity-100"
28+
leave-active-class="opacity-100"
29+
leave-class="duration-200 ease-in"
30+
leave-to-class="opacity-0"
31+
@before-enter="statusTransition = true"
32+
@after-leave="statusTransition = false"
33+
>
34+
<div
35+
v-show="status"
36+
class="fixed inset-0 transition-opacity"
37+
>
38+
<div class="absolute inset-0 bg-gray-500 opacity-75" />
39+
</div>
40+
</transition>
41+
42+
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" />&#8203;
43+
44+
<transition
45+
enter-active-class="translate-y-4 opacity-0 sm:translate-y-0 sm:scale-95"
46+
enter-class="duration-300 ease-out"
47+
enter-to-class="translate-y-0 opacity-100 sm:scale-100"
48+
leave-active-class="translate-y-0 opacity-100 sm:scale-100 "
49+
leave-class="duration-200 ease-in"
50+
leave-to-class="translate-y-4 opacity-0 sm:translate-y-0 sm:scale-95"
51+
>
52+
<div
53+
v-show="status"
54+
class="max-w-md px-4 pt-5 pb-4 max-h-[32rem] overflow-y-auto overflow-hidden transition-all transform bg-white rounded-lg shadow-xl md:max-w-xl dark:bg-gray-700 sm:w-full sm:p-6"
55+
role="dialog"
56+
aria-modal="true"
57+
aria-labelledby="modal-headline"
58+
>
59+
<div class="absolute top-0 right-0 pt-4 pr-4">
60+
<button
61+
type="button"
62+
class="text-gray-400 transition duration-150 ease-in-out hover:text-gray-500 focus:outline-none focus:text-gray-500"
63+
aria-label="Close"
64+
@click="emit('closeModal')"
65+
>
66+
<svg
67+
class="w-6 h-6"
68+
fill="none"
69+
viewBox="0 0 24 24"
70+
stroke="currentColor"
71+
>
72+
<path
73+
stroke-linecap="round"
74+
stroke-linejoin="round"
75+
stroke-width="2"
76+
d="M6 18L18 6M6 6l12 12"
77+
/>
78+
</svg>
79+
</button>
80+
</div>
81+
<div class="flex flex-col">
82+
<slot name="modal-body" />
83+
</div>
84+
85+
<div class="mt-5 space-y-4 sm:mt-4 sm:flex md:space-y-0 sm:flex-row-reverse">
86+
<slot name="modal-actions" />
87+
</div>
88+
</div>
89+
</transition>
90+
</div>
91+
</template>

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="sticky top-0 z-40 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">
2+
<div class="sticky top-0 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">
33
<button
44
type="button"
55
class="-m-2.5 p-2.5 text-gray-700 lg:hidden"
@@ -101,10 +101,6 @@
101101
alt=""
102102
>
103103
<span class="hidden lg:flex lg:items-center">
104-
<span
105-
class="ml-4 text-sm font-semibold leading-6 text-gray-900"
106-
aria-hidden="true"
107-
>Tom Cook</span>
108104
<svg
109105
class="ml-2 h-5 w-5 text-gray-400"
110106
viewBox="0 0 20 20"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<template>
2+
<header class="border-b border-gray-200">
3+
<!-- Secondary navigation -->
4+
<nav class="flex overflow-x-auto py-4">
5+
<ul
6+
role="list"
7+
class="flex min-w-full flex-none gap-x-6 px-4 text-sm font-semibold leading-6 text-gray-600 sm:px-6 lg:px-8"
8+
>
9+
<li>
10+
<router-link
11+
to="/settings/account"
12+
class=""
13+
>
14+
Account
15+
</router-link>
16+
</li>
17+
<li>
18+
<router-link
19+
to="/settings/billing"
20+
class=""
21+
>
22+
Billing
23+
</router-link>
24+
</li>
25+
<li>
26+
<router-link
27+
to="/settings/integration"
28+
class=""
29+
>
30+
Integrations
31+
</router-link>
32+
</li>
33+
</ul>
34+
</nav>
35+
</header>
36+
</template>
37+
38+
<style scoped>
39+
.sidebar-links {
40+
@apply text-gray-700 hover:text-indigo-600 hover:bg-gray-50 flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold
41+
}
42+
43+
.router-link-active, .router-link-exact-active {
44+
@apply text-indigo-600 text-sm rounded-md !important
45+
}
46+
</style>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div>
33
<!-- Static sidebar for desktop -->
4-
<div class="hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col">
4+
<div class="hidden lg:fixed lg:inset-y-0 lg:flex lg:w-72 lg:flex-col">
55
<!-- Sidebar component, swap this element with another sidebar if you like -->
66
<div class="flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 pb-4">
77
<div class="flex h-16 shrink-0 items-center">
@@ -306,7 +306,7 @@
306306
</li>
307307
<li class="mt-auto">
308308
<router-link
309-
to="/settings"
309+
to="/settings/account"
310310
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-indigo-600"
311311
>
312312
<svg
@@ -338,7 +338,7 @@
338338
</div>
339339
</template>
340340

341-
<style>
341+
<style scoped>
342342
.sidebar-links {
343343
@apply text-gray-700 hover:text-indigo-600 hover:bg-gray-50 flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold
344344
}

.stacks/stacks/dashboard/src/layouts/default.vue

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,6 @@ import Navbar from '../components/Navbar.vue'
55
</script>
66

77
<template>
8-
<!--
9-
This example requires some changes to your config:
10-
11-
```
12-
// tailwind.config.js
13-
module.exports = {
14-
// ...
15-
plugins: [
16-
// ...
17-
require('@tailwindcss/forms'),
18-
],
19-
}
20-
```
21-
-->
22-
<!--
23-
This example requires updating your template:
24-
25-
```
26-
<html class="h-full bg-white">
27-
<body class="h-full">
28-
```
29-
-->
308
<div>
319
<!-- Off-canvas menu for mobile, show/hide based on off-canvas menu state. -->
3210
<MobileSidebar />
@@ -36,7 +14,7 @@ import Navbar from '../components/Navbar.vue'
3614
<div class="lg:pl-72">
3715
<Navbar />
3816

39-
<main class="bg-gray-50">
17+
<main class="bg-gray-50 h-100vh">
4018
<RouterView />
4119
</main>
4220
</div>

0 commit comments

Comments
 (0)