>(
59 | ({ className, ...props }, ref) => (
60 | [role=checkbox]]:translate-y-[2px]', className)}
63 | {...props}
64 | />
65 | ),
66 | )
67 | TableCell.displayName = 'TableCell'
68 |
69 | const TableCaption = React.forwardRef>(
70 | ({ className, ...props }, ref) => (
71 |
72 | ),
73 | )
74 | TableCaption.displayName = 'TableCaption'
75 |
76 | export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }
77 |
--------------------------------------------------------------------------------
/webui/src/components/ui/tabs.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 | import * as TabsPrimitive from '@radix-ui/react-tabs'
3 |
4 | import { cn } from '@/lib/utils'
5 |
6 | const Tabs = TabsPrimitive.Root
7 |
8 | const TabsList = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 | ))
21 | TabsList.displayName = TabsPrimitive.List.displayName
22 |
23 | const TabsTrigger = React.forwardRef<
24 | React.ElementRef,
25 | React.ComponentPropsWithoutRef
26 | >(({ className, ...props }, ref) => (
27 |
35 | ))
36 | TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
37 |
38 | const TabsContent = React.forwardRef<
39 | React.ElementRef,
40 | React.ComponentPropsWithoutRef
41 | >(({ className, ...props }, ref) => (
42 |
50 | ))
51 | TabsContent.displayName = TabsPrimitive.Content.displayName
52 |
53 | export { Tabs, TabsList, TabsTrigger, TabsContent }
54 |
--------------------------------------------------------------------------------
/webui/src/electron.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom/client'
3 | import { SatelliteApiProvider } from './Api/Context.tsx'
4 | import { AppContent } from './app/Content.tsx'
5 |
6 | ReactDOM.createRoot(document.getElementById('root')!).render(
7 |
8 |
9 |
10 |
11 | ,
12 | )
13 |
--------------------------------------------------------------------------------
/webui/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { clsx, type ClassValue } from 'clsx'
2 | import { twMerge } from 'tailwind-merge'
3 |
4 | export function cn(...inputs: ClassValue[]): string {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/webui/src/main.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom/client'
3 | import { App } from './app/App.tsx'
4 | import { SatelliteApiProvider } from './Api/Context.tsx'
5 | import { SatelliteRestApi } from './Api/rest.ts'
6 |
7 | ReactDOM.createRoot(document.getElementById('root')!).render(
8 |
9 |
10 |
11 |
12 | ,
13 | )
14 |
--------------------------------------------------------------------------------
/webui/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare const electronApi: typeof import('../../satellite/dist/electronPreload.cjs').electronApi
4 |
--------------------------------------------------------------------------------
/webui/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-require-imports */
2 | /** @type {import('tailwindcss').Config} */
3 | export default {
4 | darkMode: ['class'],
5 | content: ['./index.html', './electron.html', './src/**/*.{ts,tsx,js,jsx}'],
6 | theme: {
7 | extend: {
8 | borderRadius: {
9 | lg: 'var(--radius)',
10 | md: 'calc(var(--radius) - 2px)',
11 | sm: 'calc(var(--radius) - 4px)',
12 | },
13 | colors: {
14 | background: 'hsl(var(--background))',
15 | foreground: 'hsl(var(--foreground))',
16 | card: {
17 | DEFAULT: 'hsl(var(--card))',
18 | foreground: 'hsl(var(--card-foreground))',
19 | },
20 | popover: {
21 | DEFAULT: 'hsl(var(--popover))',
22 | foreground: 'hsl(var(--popover-foreground))',
23 | },
24 | primary: {
25 | DEFAULT: 'hsl(var(--primary))',
26 | foreground: 'hsl(var(--primary-foreground))',
27 | },
28 | secondary: {
29 | DEFAULT: 'hsl(var(--secondary))',
30 | foreground: 'hsl(var(--secondary-foreground))',
31 | },
32 | muted: {
33 | DEFAULT: 'hsl(var(--muted))',
34 | foreground: 'hsl(var(--muted-foreground))',
35 | },
36 | accent: {
37 | DEFAULT: 'hsl(var(--accent))',
38 | foreground: 'hsl(var(--accent-foreground))',
39 | },
40 | destructive: {
41 | DEFAULT: 'hsl(var(--destructive))',
42 | foreground: 'hsl(var(--destructive-foreground))',
43 | },
44 | border: 'hsl(var(--border))',
45 | input: 'hsl(var(--input))',
46 | ring: 'hsl(var(--ring))',
47 | chart: {
48 | 1: 'hsl(var(--chart-1))',
49 | 2: 'hsl(var(--chart-2))',
50 | 3: 'hsl(var(--chart-3))',
51 | 4: 'hsl(var(--chart-4))',
52 | 5: 'hsl(var(--chart-5))',
53 | },
54 | },
55 | },
56 | },
57 | plugins: [require('tailwindcss-animate')],
58 | }
59 |
--------------------------------------------------------------------------------
/webui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2020",
4 | "useDefineForClassFields": true,
5 | "lib": ["ES2020", "DOM", "DOM.Iterable"],
6 | "module": "ESNext",
7 | "skipLibCheck": true,
8 |
9 | "baseUrl": ".",
10 | "paths": {
11 | "@/*": ["./src/*"]
12 | },
13 |
14 | /* Bundler mode */
15 | "moduleResolution": "bundler",
16 | "allowImportingTsExtensions": true,
17 | "resolveJsonModule": true,
18 | "isolatedModules": true,
19 | "noEmit": true,
20 | "jsx": "react-jsx",
21 |
22 | /* Linting */
23 | "strict": true,
24 | "noUnusedLocals": true,
25 | "noUnusedParameters": true,
26 | "noFallthroughCasesInSwitch": true
27 | },
28 | "include": ["src"],
29 | "references": [{ "path": "./tsconfig.node.json" }]
30 | }
31 |
--------------------------------------------------------------------------------
/webui/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true,
8 |
9 | "baseUrl": ".",
10 | "paths": {
11 | "@/*": ["./src/*"]
12 | }
13 | },
14 | "include": ["vite.config.ts"]
15 | }
16 |
--------------------------------------------------------------------------------
/webui/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 | import { resolve } from 'path'
4 |
5 | // https://vitejs.dev/config/
6 | export default defineConfig({
7 | base: '', // Fix electron file paths
8 |
9 | plugins: [react()],
10 | server: {
11 | proxy: {
12 | '/api': 'http://localhost:9999',
13 | },
14 | },
15 | build: {
16 | rollupOptions: {
17 | input: {
18 | main: resolve(__dirname, 'index.html'),
19 | electron: resolve(__dirname, 'electron.html'),
20 | about: resolve(__dirname, 'about.html'),
21 | // preload: resolve(__dirname, 'preload.ts'),
22 | },
23 | },
24 | },
25 | css: {
26 | preprocessorOptions: {
27 | scss: {
28 | api: 'modern-compiler',
29 | quietDeps: true,
30 | },
31 | },
32 | },
33 | resolve: {
34 | alias: {
35 | '@': resolve(__dirname, './src'),
36 | },
37 | },
38 | })
39 |
--------------------------------------------------------------------------------
|