Skip to content

Commit 78e3019

Browse files
AchoArnoldCopilot
andcommitted
feat(web): add static assets, plugins, and fix useApi composable
- Copy all static assets (images, templates, favicon) to public/ - Create chart.client.ts plugin (Chart.js registration) - Create vue-glow.client.ts placeholder plugin - Refactor useApi composable to export both useApi() and useApiComposable() Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 51f3e66 commit 78e3019

51 files changed

Lines changed: 228 additions & 5 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

web/app/composables/useApi.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export function setApiKey(key: string | null) {
99
apiKey = key;
1010
}
1111

12-
export function useApi() {
12+
function createApiFetch() {
1313
const config = useRuntimeConfig();
1414
const baseURL = config.public.apiBaseUrl as string;
1515

16-
const apiFetch = $fetch.create({
16+
return $fetch.create({
1717
baseURL,
1818
headers: {
1919
"X-Client-Version": "web",
@@ -28,6 +28,14 @@ export function useApi() {
2828
}
2929
},
3030
});
31+
}
32+
33+
export function useApi() {
34+
return { apiFetch: createApiFetch(), setAuthHeader, setApiKey };
35+
}
3136

32-
return { apiFetch, setAuthHeader, setApiKey };
37+
export function useApiComposable() {
38+
return {
39+
useApi: createApiFetch,
40+
};
3341
}

web/app/plugins/chart.client.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import {
2+
Chart as ChartJS,
3+
CategoryScale,
4+
LinearScale,
5+
PointElement,
6+
LineElement,
7+
BarElement,
8+
Title,
9+
Tooltip,
10+
Legend,
11+
Filler,
12+
TimeScale,
13+
} from "chart.js";
14+
import "chartjs-adapter-moment";
15+
16+
export default defineNuxtPlugin(() => {
17+
ChartJS.register(
18+
CategoryScale,
19+
LinearScale,
20+
PointElement,
21+
LineElement,
22+
BarElement,
23+
Title,
24+
Tooltip,
25+
Legend,
26+
Filler,
27+
TimeScale,
28+
);
29+
});

web/app/plugins/vue-glow.client.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default defineNuxtPlugin(() => {
2+
// vue-glow is a client-side only visual effect plugin
3+
// In Nuxt 4 we handle this as a no-op placeholder
4+
// since the original plugin had minimal functionality
5+
});

web/public/avatar.png

15.6 KB
Loading

web/public/favicon.ico

10.9 KB
Binary file not shown.

web/public/header.png

169 KB
Loading

web/public/img/alert.svg

Lines changed: 1 addition & 0 deletions
Loading

web/public/img/arnold.png

41.3 KB
Loading
83.7 KB
Loading
140 KB
Loading

0 commit comments

Comments
 (0)