Migrate project from Vue to React and TypeScript

This commit is contained in:
2025-06-13 23:02:08 -07:00
parent 9e1bb74656
commit 43ceca86e0
52 changed files with 1436 additions and 3320 deletions

7
internal/fs/fs.go Normal file
View File

@@ -0,0 +1,7 @@
package fs
import "io/fs"
func GetUIAssets() fs.FS {
return getUIAssets()
}

12
internal/fs/fs_dev.go Normal file
View File

@@ -0,0 +1,12 @@
//go:build !prod
package fs
import (
"io/fs"
"os"
)
func getUIAssets() fs.FS {
return os.DirFS("internal/fs/dist")
}

21
internal/fs/fs_prod.go Normal file
View File

@@ -0,0 +1,21 @@
//go:build prod
package fs
import (
"embed"
"io/fs"
)
//go:embed dist
var embedUI embed.FS
// / GetUIFS returns an embed FS for the UI components in the dist dir.
func getUIAssets() fs.FS {
f, err := fs.Sub(embedUI, "dist")
if err != nil {
panic(err)
}
return f
}