generated from imRohan/Typescript-Express-Vuejs-Boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Pantry UI is dated and should be updated. The website UI/UX should be updated and modernized to allow us to add more features & content without fighting the existing split layout. This change addresses the need by: *Adding Tailwinds CSS * Updating assets and frontend components to a more modern, usable interface
- Loading branch information
Showing
68 changed files
with
1,568 additions
and
904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Templates | ||
const aboutTemplate = require('../templates/about.html') | ||
|
||
// Components | ||
const faq = require('./faq.ts') | ||
|
||
const about = { | ||
name: 'about', | ||
template: aboutTemplate, | ||
props: [], | ||
components: { | ||
faq, | ||
}, | ||
data(): any { | ||
return { | ||
questions: [ | ||
{ | ||
title: 'What is Pantry?', | ||
answer: `Pantry is a free data storage service which allows users to manage | ||
a collection of JSON objects. It is great for small to medium sized projects, | ||
and can be interacted with through a RESTful API or via a dashboard.`, | ||
}, | ||
{ | ||
title: 'What is a Basket?', | ||
answer: `A "Basket" is one JSON object. Each Pantry can have up to 100 baskets | ||
held within it, each with its own human-readable name.`, | ||
}, | ||
{ | ||
title: 'How is my data stored?', | ||
answer: `Every basket is encrypted using the AES-256 encryption scheme and is securely | ||
stored on our servers after being properly sanitized.`, | ||
}, | ||
{ | ||
title: 'What are the limitations?', | ||
answer: `A Pantry can have up to 100 baskets (JSON objects), each with a max size | ||
of 1.44mb per basket. API requests are limited to 2 calls per second. That's it.`, | ||
}, | ||
{ | ||
title: 'How long will my data be stored for?', | ||
answer: `Data is stored until you no longer need it. Users can choose to delete | ||
their data from Pantry at any time. However, inactive baskets will be removed after 30 days.`, | ||
}, | ||
], | ||
} | ||
}, | ||
methods: { | ||
}, | ||
} | ||
|
||
export = about |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Templates | ||
const bannerTemplate = require('../templates/banner.html') | ||
|
||
const banner = { | ||
name: 'banner', | ||
template: bannerTemplate, | ||
props: ['promo'], | ||
data(): any { | ||
return { | ||
visible: true, | ||
} | ||
}, | ||
methods: { | ||
clickedCTA(): void { | ||
this.$emit('cta-clicked') | ||
}, | ||
hide(): void { | ||
this.visible = false | ||
}, | ||
}, | ||
} | ||
|
||
export = banner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// External Files | ||
const axios = require('axios') | ||
|
||
// Configs | ||
const configs = require('../config.ts') | ||
|
||
// Constants | ||
const API_PATH = configs.apiPath | ||
|
||
// Templates | ||
const dashboardTemplate = require('../templates/dashboard.html') | ||
|
||
// Components | ||
const explorer = require('./explorer.ts') | ||
const login = require('./login.ts') | ||
const banner = require('./banner.ts') | ||
|
||
const dashboard = { | ||
name: 'dashboard', | ||
template: dashboardTemplate, | ||
props: ['pantryID'], | ||
components: { | ||
explorer, | ||
login, | ||
banner, | ||
}, | ||
data(): any { | ||
return { | ||
signedIn: false, | ||
id: null, | ||
pantry: null, | ||
promo: { | ||
emoji: '🔥', | ||
snippet: 'Free Stickers?', | ||
title: 'Fill out our user survey and get free Pantry stickers!', | ||
}, | ||
} | ||
}, | ||
methods: { | ||
async login(pantryID: string): Promise<void> { | ||
try { | ||
await this.fetchPantry(pantryID) | ||
this.createSession() | ||
this.signedIn = true | ||
} catch { | ||
alert('Login Failed. Is your PantryID correct?') | ||
} | ||
}, | ||
async refresh(): Promise<void> { | ||
await this.fetchPantry(this.id) | ||
}, | ||
async fetchPantry(pantryId: string): Promise<void> { | ||
const { data } = await axios({ | ||
method: 'GET', | ||
url: `${API_PATH}/pantry/${pantryId}`, | ||
}) | ||
this.id = pantryId | ||
this.pantry = { ...data, id: this.id } | ||
}, | ||
async loadFromSession(): Promise<void> { | ||
if (sessionStorage.getItem('pantry-id') !== null) { | ||
await this.login(sessionStorage.getItem('pantry-id')) | ||
} | ||
}, | ||
createSession(): void { | ||
sessionStorage.setItem('pantry-id', this.id) | ||
}, | ||
urlPantryID(): string[] { | ||
return window.location.search.match(/(\?|&)pantryid\=([^&]*)/) | ||
}, | ||
async loadFromURL(): Promise<void> { | ||
if (this.urlPantryID() === null) { return } | ||
const _pantryId = decodeURIComponent(this.urlPantryID()[2]) | ||
await this.login(_pantryId) | ||
}, | ||
bannerCTAClicked(): void { | ||
window.location.href = 'https://tally.so/r/m6yPAn' | ||
}, | ||
}, | ||
mounted(): void { | ||
this.loadFromSession() | ||
this.loadFromURL() | ||
}, | ||
} | ||
|
||
export = dashboard |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Templates | ||
const exampleTemplate = require('../templates/example.html') | ||
|
||
const example = { | ||
name: 'example', | ||
template: exampleTemplate, | ||
data(): any { | ||
return { | ||
} | ||
}, | ||
methods: { | ||
}, | ||
mounted(): void { | ||
}, | ||
} | ||
|
||
export = example |
Oops, something went wrong.