server fixed

This commit is contained in:
asoseil 2017-12-05 00:14:41 +01:00
parent b474e5acfc
commit d710e8a3b7
3 changed files with 110 additions and 187 deletions

View File

@ -33,7 +33,8 @@ func main() {
&cli.BoolFlag{Name: "vet", Aliases: []string{"v"}, Value: false, Usage: "Enable go vet"}, &cli.BoolFlag{Name: "vet", Aliases: []string{"v"}, Value: false, Usage: "Enable go vet"},
&cli.BoolFlag{Name: "test", Aliases: []string{"t"}, Value: false, Usage: "Enable go test"}, &cli.BoolFlag{Name: "test", Aliases: []string{"t"}, Value: false, Usage: "Enable go test"},
&cli.BoolFlag{Name: "generate", Aliases: []string{"g"}, Value: false, Usage: "Enable go generate"}, &cli.BoolFlag{Name: "generate", Aliases: []string{"g"}, Value: false, Usage: "Enable go generate"},
&cli.BoolFlag{Name: "server", Aliases: []string{"s"}, Value: false, Usage: "Enable server and open into the default browser"}, &cli.BoolFlag{Name: "server", Aliases: []string{"srv"}, Value: false, Usage: "Start server"},
&cli.BoolFlag{Name: "open", Aliases: []string{"op"}, Value: false, Usage: "Open into the default browser"},
&cli.BoolFlag{Name: "install", Aliases: []string{"i"}, Value: false, Usage: "Enable go install"}, &cli.BoolFlag{Name: "install", Aliases: []string{"i"}, Value: false, Usage: "Enable go install"},
&cli.BoolFlag{Name: "build", Aliases: []string{"b"}, Value: false, Usage: "Enable go build"}, &cli.BoolFlag{Name: "build", Aliases: []string{"b"}, Value: false, Usage: "Enable go build"},
&cli.BoolFlag{Name: "run", Aliases: []string{"nr"}, Value: false, Usage: "Enable go run"}, &cli.BoolFlag{Name: "run", Aliases: []string{"nr"}, Value: false, Usage: "Enable go run"},

File diff suppressed because one or more lines are too long

View File

@ -123,32 +123,23 @@ func (s *Server) Start() (err error) {
e.GET("/app/components/index.html", func(c echo.Context) error { e.GET("/app/components/index.html", func(c echo.Context) error {
return s.render(c, "assets/app/components/index.html", 1) return s.render(c, "assets/app/components/index.html", 1)
}) })
e.GET("/assets/img/svg/settings.svg", func(c echo.Context) error { e.GET("/assets/img/logo.png", func(c echo.Context) error {
return s.render(c, "assets/assets/img/svg/settings.svg", 4) return s.render(c, "assets/assets/img/logo.png", 5)
}) })
e.GET("/assets/img/svg/fullscreen.svg", func(c echo.Context) error { e.GET("/assets/img/svg/github-logo.svg", func(c echo.Context) error {
return s.render(c, "assets/assets/img/svg/fullscreen.svg", 4) return s.render(c, "assets/assets/img/svg/github-logo.svg", 4)
}) })
e.GET("/assets/img/svg/add.svg", func(c echo.Context) error { e.GET("/assets/img/svg/ic_arrow_back_black_48px.svg", func(c echo.Context) error {
return s.render(c, "assets/assets/img/svg/add.svg", 4) return s.render(c, "assets/assets/img/svg/ic_arrow_back_black_48px.svg", 4)
}) })
e.GET("/assets/img/svg/backspace.svg", func(c echo.Context) error { e.GET("/assets/img/svg/ic_clear_white_48px.svg", func(c echo.Context) error {
return s.render(c, "assets/assets/img/svg/backspace.svg", 4) return s.render(c, "assets/assets/img/svg/ic_clear_white_48px.svg", 4)
}) })
e.GET("/assets/img/svg/error.svg", func(c echo.Context) error { e.GET("/assets/img/svg/ic_menu_white_48px.svg", func(c echo.Context) error {
return s.render(c, "assets/assets/img/svg/error.svg", 4) return s.render(c, "assets/assets/img/svg/ic_menu_white_48px.svg", 4)
}) })
e.GET("/assets/img/svg/remove.svg", func(c echo.Context) error { e.GET("/assets/img/svg/ic_settings_black_48px.svg", func(c echo.Context) error {
return s.render(c, "assets/assets/img/remove.svg", 4) return s.render(c, "assets/assets/img/svg/ic_settings_black_48px.svg", 4)
})
e.GET("/assets/img/svg/logo.svg", func(c echo.Context) error {
return s.render(c, "assets/assets/img/svg/logo.svg", 4)
})
e.GET("/assets/img/fav.png", func(c echo.Context) error {
return s.render(c, "assets/assets/img/fav.png", 5)
})
e.GET("/assets/img/svg/circle.svg", func(c echo.Context) error {
return s.render(c, "assets/assets/img/svg/circle.svg", 4)
}) })
//websocket //websocket