diff --git a/CHANGELOG.md b/CHANGELOG.md index ce3e590..da407b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog -## [1.4.1] 2020-04-04 +## [1.5.0] 2020-04-05 + +### Added + +- Add address selector + +## [1.4.1] 2020-04-05 Changes by @pksec diff --git a/package.json b/package.json index 7209bcb..d43088a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "covid-self-report", - "version": "1.4.1", + "version": "1.5.0", "author": { "name": "Christian Müller", "email": "muller.ch@gmail.com" diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json index 7dda1bc..380cbfd 100644 --- a/src/assets/translations/en.json +++ b/src/assets/translations/en.json @@ -68,6 +68,10 @@ "sentMistakeClickHere": "click here", "wantToSeePublicData": "Your contribution helps to build a public dataset. If you want to see the current data, click:" }, + "locationAddress": { + "yourPostalCode": "Your postal code is {ignore_postalcode}", + "xMore": "+{ignore_count} more" + }, "visualize": { "title": "Visualize", "dataWarning": "The following data is community collected and not verified.", diff --git a/src/components/BaseSelect.vue b/src/components/BaseSelect.vue new file mode 100644 index 0000000..c5ccf7d --- /dev/null +++ b/src/components/BaseSelect.vue @@ -0,0 +1,157 @@ + + + diff --git a/src/pages/Home.vue b/src/pages/Home.vue index ed291a1..c0b842e 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -9,7 +9,7 @@
-
+

{{ $t('home.introTitle') }}

diff --git a/src/plugins/globalComponents.js b/src/plugins/globalComponents.js index eb71762..ce988a0 100644 --- a/src/plugins/globalComponents.js +++ b/src/plugins/globalComponents.js @@ -8,6 +8,7 @@ import BaseProgress from "../components/BaseProgress"; import BaseRadio from "../components/BaseRadio"; import BaseSlider from "../components/BaseSlider"; import BaseSwitch from "../components/BaseSwitch"; +import BaseSelect from "../components/BaseSelect"; import Card from "../components/Card"; import Icon from "../components/Icon"; @@ -23,6 +24,7 @@ export default { Vue.component(BaseRadio.name, BaseRadio); Vue.component(BaseSlider.name, BaseSlider); Vue.component(BaseSwitch.name, BaseSwitch); + Vue.component(BaseSelect.name, BaseSelect); Vue.component(Card.name, Card); Vue.component(Icon.name, Icon); } diff --git a/src/store/store.js b/src/store/store.js index 5043256..61a0ad2 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -48,7 +48,7 @@ export const store = new Vuex.Store({ for (const [i, region] of regions.entries()) { if (i === regions.length - 1) { - location.places = region.split('||'); + location.places = region.split('||').sort((a, b) => a.localeCompare(b)); } else { location.regions.push(region); } diff --git a/src/views/LocationEditors/LocationFromAddress.vue b/src/views/LocationEditors/LocationFromAddress.vue index acc8312..bc7e475 100644 --- a/src/views/LocationEditors/LocationFromAddress.vue +++ b/src/views/LocationEditors/LocationFromAddress.vue @@ -1,5 +1,27 @@