Add an About view

This commit is contained in:
Lucas Verney 2017-09-22 10:35:53 -04:00
부모 d5fdaa6b67
커밋 975907916d
7개의 변경된 파일1246개의 추가작업 그리고 12개의 파일을 삭제

21
LICENSE.md Normal file
파일 보기

@ -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.

파일 보기

@ -38,6 +38,14 @@
<v-list-tile-title>{{ $t('navigation.preferences') }}</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
<v-list-tile :to="{ name: 'About' }">
<v-list-tile-action>
<v-icon>info</v-icon>
</v-list-tile-action>
<v-list-tile-content>
<v-list-tile-title>{{ $t('navigation.about') }}</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-navigation-drawer>
</template>

파일 보기

@ -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',
},
};

파일 보기

@ -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,
},
],
});

26
src/views/About.vue Normal file
파일 보기

@ -0,0 +1,26 @@
<template>
<v-container fluid>
<p>
{{ $t('about.appDescription') }}
</p>
<i18n path="about.licenseDescription" tag="p">
<a href="https://github.com/Phyks/Food/blob/master/LICENSE.md" place="MITLicense">{{ $t('about.MITLicense') }}</a>
<a href="https://github.com/phyks/food" place="Github">Github</a>
<a href="https://github.com/phyks/food/issues" place="there">{{ $t('misc.there') }}</a>
</i18n>
<i18n path="about.OpenFoodFactsDescription" tag="p">
<a href="https://world.openfoodfacts.org/" place="OpenFoodFacts">OpenFoodFacts</a>
<a href="http://opendatacommons.org/licenses/odbl/1.0/" place="OpenDatabaseLicense">{{ $t('about.OpenDatabaseLicense') }}</a>
</i18n>
<p class="text-xs-center"><img src="/static/openfoodfacts.svg"/></p>
</v-container>
</template>
<script>
export default {
created() {
this.$store.dispatch('setTitle', { title: this.$t('navigation.about') });
this.$store.dispatch('setBackgroundColor', { backgroundColor: '#F5F5F5' });
},
};
</script>

파일 보기

@ -7,7 +7,7 @@
<script>
export default {
created() {
this.$store.dispatch('setTitle', { title: 'Preferences' });
this.$store.dispatch('setTitle', { title: this.$t('navigation.preferences') });
},
};
</script>

1164
static/openfoodfacts.svg Normal file

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다. Load Diff

After

Width:  |  Height:  |  크기: 62 KiB