diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml index ce558bb..f36d6df 100644 --- a/.github/workflows/tag.yaml +++ b/.github/workflows/tag.yaml @@ -43,8 +43,9 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 with: + workdir: "backend" distribution: goreleaser version: latest args: release --clean env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index bdda034..410fc61 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,7 @@ dist backend/app/api/app backend/app/api/__debug_bin dist/ + +# Nuxt Publish Dir +backend/app/api/static/public/* +!backend/app/api/static/public/.gitkeep \ No newline at end of file diff --git a/backend/.goreleaser.yaml b/backend/.goreleaser.yaml index 56d2085..37752ec 100644 --- a/backend/.goreleaser.yaml +++ b/backend/.goreleaser.yaml @@ -2,8 +2,6 @@ # Make sure to check the documentation at https://goreleaser.com before: hooks: - # You may remove this if you don't use go modules. - - go mod tidy # you may remove this if you don't need go generate - go generate ./... builds: diff --git a/backend/app/api/handlers/v1/controller.go b/backend/app/api/handlers/v1/controller.go index 718634a..bf14a9d 100644 --- a/backend/app/api/handlers/v1/controller.go +++ b/backend/app/api/handlers/v1/controller.go @@ -103,7 +103,7 @@ func (ctrl *V1Controller) HandleBase(ready ReadyFunc, build Build) errchain.Hand return server.JSON(w, http.StatusOK, ApiSummary{ Healthy: ready(), Title: "Homebox", - Message: "Track, Manage, and Organize your shit", + Message: "Track, Manage, and Organize your Things", Build: build, Demo: ctrl.isDemo, AllowRegistration: ctrl.allowRegistration, diff --git a/backend/app/api/main.go b/backend/app/api/main.go index b7c18ac..d966a48 100644 --- a/backend/app/api/main.go +++ b/backend/app/api/main.go @@ -37,7 +37,7 @@ var ( // @title Homebox API // @version 1.0 -// @description Track, Manage, and Organize your Shit. +// @description Track, Manage, and Organize your Things. // @contact.name Don't // @license.name MIT // @BasePath /api diff --git a/backend/app/api/static/docs/docs.go b/backend/app/api/static/docs/docs.go index 03d0ab1..b927d87 100644 --- a/backend/app/api/static/docs/docs.go +++ b/backend/app/api/static/docs/docs.go @@ -2822,7 +2822,7 @@ var SwaggerInfo = &swag.Spec{ BasePath: "/api", Schemes: []string{}, Title: "Homebox API", - Description: "Track, Manage, and Organize your Shit.", + Description: "Track, Manage, and Organize your Things.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, } diff --git a/backend/app/api/static/docs/swagger.json b/backend/app/api/static/docs/swagger.json index 8c6a248..d5e71d2 100644 --- a/backend/app/api/static/docs/swagger.json +++ b/backend/app/api/static/docs/swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "description": "Track, Manage, and Organize your Shit.", + "description": "Track, Manage, and Organize your Things.", "title": "Homebox API", "contact": { "name": "Don't" diff --git a/backend/app/api/static/docs/swagger.yaml b/backend/app/api/static/docs/swagger.yaml index c458fa6..ccdb538 100644 --- a/backend/app/api/static/docs/swagger.yaml +++ b/backend/app/api/static/docs/swagger.yaml @@ -701,7 +701,7 @@ definitions: info: contact: name: Don't - description: Track, Manage, and Organize your Shit. + description: Track, Manage, and Organize your Things. license: name: MIT title: Homebox API diff --git a/backend/go.sum b/backend/go.sum index 3fc6253..5544f85 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -503,6 +503,7 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -528,6 +529,7 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= @@ -600,8 +602,10 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/docs/docs/api/openapi-2.0.json b/docs/docs/api/openapi-2.0.json index 8c6a248..d5e71d2 100644 --- a/docs/docs/api/openapi-2.0.json +++ b/docs/docs/api/openapi-2.0.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "description": "Track, Manage, and Organize your Shit.", + "description": "Track, Manage, and Organize your Things.", "title": "Homebox API", "contact": { "name": "Don't" diff --git a/docs/requirements.txt b/docs/requirements.txt index dc307d2..68bfe4a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1 @@ -mkdocs-material==9.1.3 \ No newline at end of file +mkdocs-material==9.1.4 \ No newline at end of file diff --git a/frontend/composables/use-auth-context.ts b/frontend/composables/use-auth-context.ts index c39ac3f..bcffad7 100644 --- a/frontend/composables/use-auth-context.ts +++ b/frontend/composables/use-auth-context.ts @@ -106,8 +106,8 @@ class AuthContext implements IAuthContext { this._expiresAt.value = null; this._attachmentToken.value = null; - navigateTo("/"); console.log("Session invalidated"); + window.location.href = "/"; } async login(api: PublicApi, email: string, password: string, stayLoggedIn: boolean) { diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index c98f1a1..479d1f4 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -20,7 +20,7 @@ export default defineNuxtConfig({ }, devOptions: { // Enable to troubleshoot during development - enabled: true, + enabled: false, }, manifest: { name: "Homebox", diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index 8e79b19..2258c4c 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -8,6 +8,9 @@ }); const ctx = useAuthContext(); + if (ctx.isAuthorized()) { + navigateTo("/home"); + } const api = usePublicApi(); const toast = useNotifier(); @@ -29,10 +32,6 @@ } }); - if (!ctx.isAuthorized()) { - navigateTo("/home"); - } - const route = useRoute(); const router = useRouter(); @@ -133,7 +132,7 @@ x -

Track, Organize, and Manage your Shit.

+

Track, Organize, and Manage your Things.