From 975907916d84e492a39a8c40a75a6c733cf6ae73 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Fri, 22 Sep 2017 10:35:53 -0400 Subject: [PATCH] Add an About view --- LICENSE.md | 21 + src/components/NavigationDrawer.vue | 8 + src/i18n/en/index.js | 19 +- src/router/index.js | 18 +- src/views/About.vue | 26 + src/views/Preferences.vue | 2 +- static/openfoodfacts.svg | 1164 +++++++++++++++++++++++++++ 7 files changed, 1246 insertions(+), 12 deletions(-) create mode 100644 LICENSE.md create mode 100644 src/views/About.vue create mode 100644 static/openfoodfacts.svg diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9d64f10 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Phyks (Lucas Verney) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/components/NavigationDrawer.vue b/src/components/NavigationDrawer.vue index 0d511a6..1365822 100644 --- a/src/components/NavigationDrawer.vue +++ b/src/components/NavigationDrawer.vue @@ -38,6 +38,14 @@ {{ $t('navigation.preferences') }} + + + info + + + {{ $t('navigation.about') }} + + diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 8c60eb6..680aa0e 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1,16 +1,25 @@ export default { - navigation: { - home: 'Home', - scan: 'Scan', - manualBarcode: 'Manual barcode', - preferences: 'Preferences', + about: { + appDescription: 'InFood is your grocery companion app, to help you scan quickly facts about products you are about to buy.', + licenseDescription: 'It is available under a {MITLicense} and source code is hosted by {Github}. Please report any bugs {there}.', + MITLicense: 'MIT license', + OpenFoodFactsDescription: 'Products data is provided by {OpenFoodFacts} under {OpenDatabaseLicense}.', + OpenDatabaseLicense: 'Open Database License', }, misc: { or: 'or', + there: 'there', }, manualBarcode: { heading: 'Which barcode are you looking for?', EAN13Barcode: 'EAN13 barcode', go: 'Go!', }, + navigation: { + home: 'Home', + scan: 'Scan', + manualBarcode: 'Manual barcode', + preferences: 'Preferences', + about: 'About', + }, }; diff --git a/src/router/index.js b/src/router/index.js index 1682879..4933a06 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,26 +1,27 @@ import Vue from 'vue'; import Router from 'vue-router'; +import About from '@/views/About'; import Home from '@/views/Home'; import ManualBarcode from '@/views/ManualBarcode'; -import Scan from '@/views/Scan'; import Product from '@/views/Product'; import Preferences from '@/views/Preferences'; +import Scan from '@/views/Scan'; Vue.use(Router); export default new Router({ routes: [ + { + path: '/about', + name: 'About', + component: About, + }, { path: '/', name: 'Home', component: Home, }, - { - path: '/scan', - name: 'Scan', - component: Scan, - }, { path: '/barcode', name: 'ManualBarcode', @@ -36,5 +37,10 @@ export default new Router({ name: 'Preferences', component: Preferences, }, + { + path: '/scan', + name: 'Scan', + component: Scan, + }, ], }); diff --git a/src/views/About.vue b/src/views/About.vue new file mode 100644 index 0000000..9d39340 --- /dev/null +++ b/src/views/About.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/views/Preferences.vue b/src/views/Preferences.vue index d597a7e..f4306fb 100644 --- a/src/views/Preferences.vue +++ b/src/views/Preferences.vue @@ -7,7 +7,7 @@ diff --git a/static/openfoodfacts.svg b/static/openfoodfacts.svg new file mode 100644 index 0000000..4430246 --- /dev/null +++ b/static/openfoodfacts.svg @@ -0,0 +1,1164 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +