diff --git a/src/app/.DS_Store b/src/app/.DS_Store index c0d4543..05d9460 100644 Binary files a/src/app/.DS_Store and b/src/app/.DS_Store differ diff --git a/src/app/components/landingRight.ts b/src/app/components/landingRight.ts index 62cf82a..86772fe 100644 --- a/src/app/components/landingRight.ts +++ b/src/app/components/landingRight.ts @@ -13,6 +13,7 @@ const { IView } = require('../../interfaces/view.ts') // Constants const API_PATH = configs.apiPath +const DOCS_PATH = configs.docsPath const landingRight = { props: ['view'], @@ -82,6 +83,9 @@ const landingRight = { signupNameValid() { return this.signup.accountName !== null }, + pantryIDValid() { + return this.pantry.id !== null + }, getStarted() { this.fetchPantry(this.pantry.id) this.$emit('change-view', IView.dashboard) @@ -90,7 +94,7 @@ const landingRight = { this.$emit('change-view', IView.home) }, showDocs() { - this.$emit('change-view', IView.docs) + window.location.href = DOCS_PATH }, copyPantryId() { this.$emit('copy-text', this.pantry.id) @@ -101,6 +105,11 @@ const landingRight = { this.showNameField = true } }, + loadPantry() { + if (this.pantry.id) { + this.fetchPantry(this.pantry.id) + } + }, fetchURLParams() { if (this.view === IView.dashboard) { const _pantryId = decodeURIComponent(window.location.search.match(/(\?|&)pantryid\=([^&]*)/)[2]) diff --git a/src/app/components/topbar.ts b/src/app/components/topbar.ts index e00287d..c8d32a8 100644 --- a/src/app/components/topbar.ts +++ b/src/app/components/topbar.ts @@ -1,9 +1,15 @@ // External Files const topbarTemplate = require('../templates/topbar.html') +// Configs +const configs = require('../config.ts') + // Interfaces const { IView } = require('../../interfaces/view.ts') +// Constants +const DOCS_PATH = configs.docsPath + const topbar = { name: 'topbar', template: topbarTemplate, @@ -13,7 +19,10 @@ const topbar = { this.$emit('change-view', IView.about) }, showDocs() { - this.$emit('change-view', IView.docs) + window.location.href = DOCS_PATH + }, + showDashboard() { + this.$emit('change-view', IView.dashboard) }, goHome() { this.$emit('change-view', IView.home) diff --git a/src/app/scss/_images.scss b/src/app/scss/_images.scss index 9ea02f3..ae911f4 100644 --- a/src/app/scss/_images.scss +++ b/src/app/scss/_images.scss @@ -22,8 +22,8 @@ &--getStarted { background-image: url('../assets/ReadingSideDoodle.svg'), none; } - &--docs { - background-image: url('../assets/ReadingDoodle.svg'), none; + &--dashboard { + background-image: url('../assets/UnboxingDoodle.svg'), none; } &--about { background-image: url('../assets/ZombieingDoodle.svg'), none; diff --git a/src/app/templates/landingLeft.html b/src/app/templates/landingLeft.html index 44489a2..16e711a 100644 --- a/src/app/templates/landingLeft.html +++ b/src/app/templates/landingLeft.html @@ -34,10 +34,7 @@ - diff --git a/src/app/templates/landingRight.html b/src/app/templates/landingRight.html index 274b67a..d434e53 100644 --- a/src/app/templates/landingRight.html +++ b/src/app/templates/landingRight.html @@ -87,73 +87,6 @@

Contribute

- -