diff --git a/Makefile b/Makefile index 29fbc558..f7e79d4c 100644 --- a/Makefile +++ b/Makefile @@ -56,10 +56,10 @@ webapp: webapp-static: addon-packer $(MAKE) clean-webapp-static # When changing the base URL, also update the line -# e.GET("/app/v3/*", echo.WrapHandler(webAppHandler)) +# e.GET("/app/*", echo.WrapHandler(webAppHandler)) # in `cmd/flamenco-manager/main.go` - yarn --cwd web/app build --outDir ../static --base=/app/v3/ -# yarn --cwd web/app build --outDir ../static --base=/app/v3/ --minify false + yarn --cwd web/app build --outDir ../static --base=/app/ +# yarn --cwd web/app build --outDir ../static --base=/app/ --minify false ./addon-packer -filename ${WEB_STATIC}/flamenco3-addon.zip @echo "Web app has been installed into ${WEB_STATIC}" diff --git a/cmd/flamenco-manager/main.go b/cmd/flamenco-manager/main.go index 98d8d2ff..9fd0c843 100644 --- a/cmd/flamenco-manager/main.go +++ b/cmd/flamenco-manager/main.go @@ -298,12 +298,15 @@ func buildWebService( }) } - // Serve static files for the webapp on /app/v3/. + // Serve static files for the webapp on /app/. webAppHandler, err := web.WebAppHandler() if err != nil { log.Fatal().Err(err).Msg("unable to set up HTTP server for embedded web app") } - e.GET("/app/v3/*", echo.WrapHandler(http.StripPrefix("/app/v3", webAppHandler))) + e.GET("/app/*", echo.WrapHandler(http.StripPrefix("/app", webAppHandler))) + e.GET("/app", func(c echo.Context) error { + return c.Redirect(http.StatusTemporaryRedirect, "/app/") + }) // Serve the Blender add-on. It's contained in the static files of the webapp. e.GET("/flamenco3-addon.zip", echo.WrapHandler(webAppHandler)) @@ -318,13 +321,10 @@ func buildWebService( Msg("serving job-specific files directly from disk") e.Static(api_impl.JobFilesURLPrefix, localStorage.Root()) - // Redirect / and subsets of the webapp URL to the actual webapp URL. - redirectToWebapp := func(c echo.Context) error { - return c.Redirect(http.StatusTemporaryRedirect, "/app/v3/") - } - e.GET("/app/v3", redirectToWebapp) - e.GET("/app/", redirectToWebapp) - e.GET("/", redirectToWebapp) + // Redirect / to the webapp. + e.GET("/", func(c echo.Context) error { + return c.Redirect(http.StatusTemporaryRedirect, "/app/") + }) // Log available routes routeLogger := log.Level(zerolog.TraceLevel) diff --git a/web/app/package.json b/web/app/package.json index a412fb73..50286456 100644 --- a/web/app/package.json +++ b/web/app/package.json @@ -12,7 +12,7 @@ } ], "scripts": { - "dev": "vite --port 8081 --base /app/v3/", + "dev": "vite --port 8081 --base /app/", "build": "vite build", "preview": "vite preview --port 5050", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore" diff --git a/web/app/src/components/jobs/LastRenderedImage.vue b/web/app/src/components/jobs/LastRenderedImage.vue index 0e124b92..c4cc3e98 100644 --- a/web/app/src/components/jobs/LastRenderedImage.vue +++ b/web/app/src/components/jobs/LastRenderedImage.vue @@ -53,7 +53,7 @@ function setImageURL(thumbnailInfo) { if (thumbnailInfo == null) { // This indicates that there is no last-rendered image. // Default to a hard-coded 'nothing to be seen here, move along' image. - imageURL.value = "/app/v3/nothing-rendered-yet.svg"; + imageURL.value = "/app/nothing-rendered-yet.svg"; cssClasses['nothing-rendered-yet'] = true; console.log("LastRenderedImage.vue: setting image URL to:", imageURL.value); return;