Add svelte-heros icon library
- Install svelte-heros for consistent Heroicons usage - Replace inline SVGs for password toggle with Eye/EyeOff icons - Fix USE_EMBEDDED mode to serve frontend from filesystem
This commit is contained in:
parent
8b2d2649ac
commit
46d9ff26dd
5 changed files with 49 additions and 45 deletions
|
|
@ -4,15 +4,22 @@ import (
|
|||
"embed"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
//go:embed all:embed
|
||||
var Files embed.FS
|
||||
|
||||
func FrontendFileSystem() http.FileSystem {
|
||||
return http.FS(Files)
|
||||
func FrontendFileSystem() (http.FileSystem, string) {
|
||||
if os.Getenv("USE_EMBEDDED") == "false" {
|
||||
return http.Dir("../frontend/build"), ""
|
||||
}
|
||||
return http.FS(Files), "embed/"
|
||||
}
|
||||
|
||||
func FrontendFS() fs.FS {
|
||||
if os.Getenv("USE_EMBEDDED") == "false" {
|
||||
return os.DirFS("../frontend/build")
|
||||
}
|
||||
return Files
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue