Skip to content

Commit 60f686d

Browse files
committed
chore: wip
1 parent fa6150e commit 60f686d

File tree

7 files changed

+225
-18
lines changed

7 files changed

+225
-18
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<script setup lang="ts">
2+
// TODO: ensure these components are auto-imported
3+
import Sidebar from '../../../storage/framework/views/dashboard/src/components/Sidebar.stx'
4+
import MobileSidebar from '../../../storage/framework/views/dashboard/src/components/MobileSidebar.stx'
5+
import Navbar from '../../../storage/framework/views/dashboard/src/components/Navbar.stx'
6+
import Toast from '../../../storage/framework/views/dashboard/src/components/Modals/Popups/Toast.stx'
7+
</script>
8+
9+
<template>
10+
<div>
11+
<!-- Off-canvas menu for mobile, show/hide based on off-canvas menu state. -->
12+
<MobileSidebar />
13+
<Sidebar />
14+
15+
<div class="lg:pl-72">
16+
<Navbar />
17+
18+
<main class="bg-blue-gray-50 dark:bg-blue-gray-900">
19+
<RouterView />
20+
</main>
21+
22+
<Toast />
23+
</div>
24+
</div>
25+
</template>
26+
27+
<style>
28+
body {
29+
@apply dark:bg-blue-gray-900 bg-blue-gray-50;
30+
}
31+
</style>
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import { path as p } from '@stacksjs/path'
2+
import { defineConfig } from 'vite'
3+
import Vue from '@vitejs/plugin-vue'
4+
import generateSitemap from 'vite-ssg-sitemap'
5+
import { server } from '@stacksjs/server'
6+
import { alias } from '@stacksjs/alias'
7+
import VueMacros from 'unplugin-vue-macros/vite'
8+
import { config } from '@stacksjs/config'
9+
import { cssEngine, i18n, layouts, router } from './plugins'
10+
11+
// import { autoImports, components, cssEngine, devtools, i18n, layouts, markdown, pwa, router } from './stacks'
12+
13+
// import { fonts } from './plugin/fonts'
14+
15+
// const isMaintenanceMode = config.app.maintenanceMode
16+
// const maintenancePath = isMaintenanceMode ? '' : './maintenance'
17+
18+
export default defineConfig({
19+
build: {
20+
rollupOptions: {
21+
external: ['path', 'fs', 'net', 'tls', 'stream', 'node:process', 'constants', 'node:dns/promises', 'node:util'],
22+
},
23+
},
24+
25+
root: p.frameworkPath('system-tray'),
26+
publicDir: p.publicPath(),
27+
envDir: p.projectPath(),
28+
envPrefix: 'FRONTEND_',
29+
30+
assetsInclude: [
31+
p.resourcesPath('assets/*'),
32+
p.resourcesPath('assets/**/*'),
33+
],
34+
35+
optimizeDeps: {
36+
exclude: ['bun:test', 'webpack', 'chokidar', 'fsevents', '@intlify/unplugin-vue-i18n', '@stacksjs/ui'],
37+
},
38+
39+
server: server({
40+
type: 'dashboard',
41+
}),
42+
43+
resolve: {
44+
alias,
45+
},
46+
47+
plugins: [
48+
VueMacros({
49+
plugins: {
50+
vue: Vue({
51+
include: /\.(stx|md)($|\?)/,
52+
}),
53+
},
54+
}),
55+
56+
router({
57+
extensions: ['.stx', '.md'],
58+
dts: p.frameworkPath('types/system-tray-router.d.ts'),
59+
routesFolder: [
60+
p.frameworkPath('system-tray/src/views'),
61+
],
62+
logs: config.app.debug || false,
63+
}),
64+
65+
layouts({
66+
extensions: ['stx'],
67+
layoutsDirs: p.layoutsPath('dashboard', { relative: true }),
68+
}),
69+
// autoImports(),
70+
// components(),
71+
cssEngine(),
72+
// markdown(),
73+
// pwa(),
74+
// devtools(),
75+
i18n(),
76+
77+
// https://github.com/feat-agency/vite-plugin-webfont-dl
78+
// fonts(),
79+
// webfontDownload(),
80+
],
81+
82+
// https://github.com/antfu/vite-ssg
83+
ssgOptions: {
84+
script: 'async',
85+
formatting: 'minify',
86+
87+
crittersOptions: {
88+
reduceInlineStyles: false,
89+
},
90+
91+
onFinished() {
92+
generateSitemap()
93+
},
94+
},
95+
96+
ssr: {
97+
// TODO: workaround until they support native ESM
98+
noExternal: ['workbox-window', /vue-i18n/],
99+
},
100+
})
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Stacks System Tray
2+
3+
wip
4+
5+
## ☘️ Features
6+
7+
- [ ]
8+
9+
## 🤖 Usage
10+
11+
```bash
12+
bun install -d @stacksjs/system-tray
13+
```
14+
15+
Now, you can use it in your project:
16+
17+
```js
18+
// wip
19+
```
20+
21+
Learn more in the docs.
22+
23+
## 🧪 Testing
24+
25+
```bash
26+
bun test
27+
```
28+
29+
## 📈 Changelog
30+
31+
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
32+
33+
## 🚜 Contributing
34+
35+
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
36+
37+
## 🏝 Community
38+
39+
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
40+
41+
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
42+
43+
For casual chit-chat with others using this package:
44+
45+
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
46+
47+
## 📄 License
48+
49+
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
50+
51+
Made with 💙
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link rel="apple-touch-icon" href="/pwa-192x192.png">
7+
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#00aba9">
8+
<meta name="msapplication-TileColor" content="#00aba9">
9+
<script>
10+
(function () {
11+
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
12+
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
13+
if (setting === 'dark' || (prefersDark && setting !== 'light'))
14+
document.documentElement.classList.toggle('dark', true)
15+
})()
16+
</script>
17+
</head>
18+
<body class="font-sans">
19+
<div id="app"></div>
20+
<script type="module" src="./src/main.ts"></script>
21+
<noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript>
22+
</body>
23+
</html>

storage/framework/system-tray/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"funding": "https://github.com/sponsors/chrisbbreuer",
99
"homepage": "https://github.com/stacksjs/stacks/tree/main/stacks/storage/framework/system-tray#readme",
1010
"scripts": {
11-
"dev": "wip",
11+
"dev": "bunx vite -c ../../core/vite/src/system-tray.ts",
1212
"build": "wip"
1313
}
1414
}

storage/framework/views/dashboard/src/views/index.stx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,20 @@ import BaseModal from '../components/Modals/BaseModal.stx'
7272
role="list"
7373
class="divide-y divide-gray-200 dark:divide-gray-600"
7474
>
75-
<li class="relative flex items-center space-x-4 py-4">
75+
<li class="relative flex items-center space-x-4 py-4">
7676
<div class="min-w-0 flex-auto">
7777
<div class="flex items-center gap-x-3">
78-
<div class="flex-none rounded-full p-1 text-gray-500 bg-gray-100/10">
78+
<div class="flex-none rounded-full p-1 text-green-400 bg-green-400/10">
7979
<div class="h-2 w-2 rounded-full bg-current" />
8080
</div>
8181
<h2 class="min-w-0 text-sm font-semibold leading-6 text-gray-900 dark:text-gray-100">
8282
<a
8383
href="#"
8484
class="flex gap-x-2"
8585
>
86-
<span class="truncate">Planetaria</span>
86+
<span class="truncate">Stacks</span>
8787
<span class="text-gray-400">/</span>
88-
<span class="whitespace-nowrap">ios-app</span>
88+
<span class="whitespace-nowrap">mobile-api</span>
8989
<span class="absolute inset-0" />
9090
</a>
9191
</h2>
@@ -105,30 +105,31 @@ import BaseModal from '../components/Modals/BaseModal.stx'
105105
/>
106106
</svg>
107107
<p class="whitespace-nowrap">
108-
Initiated 1m 32s ago
108+
Deployed 3m ago
109109
</p>
110110
</div>
111111
</div>
112-
<div class="rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset text-gray-600 bg-gray-400/10 ring-gray-400/20 dark:bg-blue-gray-600 dark:text-gray-300">
113-
Preview
112+
<div class="rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset text-blue-600 bg-blue-500/10 ring-blue-600/30 dark:bg-blue-gray-600 dark:text-blue-300">
113+
Production
114114
</div>
115115

116116
<div class="i-heroicons-chevron-right-20-solid h-5 w-5 flex-none text-gray-400" />
117117
</li>
118+
118119
<li class="relative flex items-center space-x-4 py-4">
119120
<div class="min-w-0 flex-auto">
120121
<div class="flex items-center gap-x-3">
121-
<div class="flex-none rounded-full p-1 text-green-400 bg-green-400/10">
122+
<div class="flex-none rounded-full p-1 text-gray-500 bg-gray-100/10">
122123
<div class="h-2 w-2 rounded-full bg-current" />
123124
</div>
124125
<h2 class="min-w-0 text-sm font-semibold leading-6 text-gray-900 dark:text-gray-100">
125126
<a
126127
href="#"
127128
class="flex gap-x-2"
128129
>
129-
<span class="truncate">Planetaria</span>
130+
<span class="truncate">Stacks</span>
130131
<span class="text-gray-400">/</span>
131-
<span class="whitespace-nowrap">mobile-api</span>
132+
<span class="whitespace-nowrap">ios-app</span>
132133
<span class="absolute inset-0" />
133134
</a>
134135
</h2>
@@ -148,16 +149,17 @@ import BaseModal from '../components/Modals/BaseModal.stx'
148149
/>
149150
</svg>
150151
<p class="whitespace-nowrap">
151-
Deployed 3m ago
152+
Initiated 1m 32s ago
152153
</p>
153154
</div>
154155
</div>
155-
<div class="rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset text-blue-600 bg-blue-500/10 ring-blue-600/30 dark:bg-blue-gray-600 dark:text-blue-300">
156-
Production
156+
<div class="rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset text-gray-600 bg-gray-400/10 ring-gray-400/20 dark:bg-blue-gray-600 dark:text-gray-300">
157+
Preview
157158
</div>
158159

159160
<div class="i-heroicons-chevron-right-20-solid h-5 w-5 flex-none text-gray-400" />
160161
</li>
162+
161163
<li class="relative flex items-center space-x-4 py-4">
162164
<div class="min-w-0 flex-auto">
163165
<div class="flex items-center gap-x-3">
@@ -169,9 +171,9 @@ import BaseModal from '../components/Modals/BaseModal.stx'
169171
href="#"
170172
class="flex gap-x-2"
171173
>
172-
<span class="truncate">Tailwind Labs</span>
174+
<span class="truncate">Open Web</span>
173175
<span class="text-gray-400">/</span>
174-
<span class="whitespace-nowrap">tailwindcss.com</span>
176+
<span class="whitespace-nowrap">ow3.org</span>
175177
<span class="absolute inset-0" />
176178
</a>
177179
</h2>

storage/framework/views/desktop/src/views/index.stx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ import BaseModal from '../components/Modals/BaseModal.stx'
8383
href="#"
8484
class="flex gap-x-2"
8585
>
86-
<span class="truncate">Planetaria</span>
86+
<span class="truncate">Stacks</span>
8787
<span class="text-gray-400">/</span>
8888
<span class="whitespace-nowrap">ios-app</span>
8989
<span class="absolute inset-0" />
@@ -126,7 +126,7 @@ import BaseModal from '../components/Modals/BaseModal.stx'
126126
href="#"
127127
class="flex gap-x-2"
128128
>
129-
<span class="truncate">Planetaria</span>
129+
<span class="truncate">Stacks</span>
130130
<span class="text-gray-400">/</span>
131131
<span class="whitespace-nowrap">mobile-api</span>
132132
<span class="absolute inset-0" />

0 commit comments

Comments
 (0)