From 83aa5667e25266cb4fc172f10ec529b2753f4347 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Wed, 26 Feb 2020 22:26:26 +0100 Subject: [PATCH] Add Language setting to Profile front-end --- resources/js/components/FormSelect.vue | 54 +++++++++++++++++++++++++ resources/js/components/index.js | 2 + resources/js/langs/locales.js | 2 + resources/js/views/profile/Settings.vue | 10 +++-- resources/lang/en/settings.php | 1 + resources/lang/fr/settings.php | 1 + resources/views/landing.blade.php | 2 +- 7 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 resources/js/components/FormSelect.vue diff --git a/resources/js/components/FormSelect.vue b/resources/js/components/FormSelect.vue new file mode 100644 index 00000000..03de2f52 --- /dev/null +++ b/resources/js/components/FormSelect.vue @@ -0,0 +1,54 @@ + + + \ No newline at end of file diff --git a/resources/js/components/index.js b/resources/js/components/index.js index e4191871..b2cd7d31 100644 --- a/resources/js/components/index.js +++ b/resources/js/components/index.js @@ -3,6 +3,7 @@ import Button from './Button' import FieldError from './FieldError' import FormWrapper from './FormWrapper' import FormField from './FormField' +import FormSelect from './FormSelect' import FormButtons from './FormButtons' import VueFooter from './Footer' @@ -12,6 +13,7 @@ import VueFooter from './Footer' FieldError, FormWrapper, FormField, + FormSelect, FormButtons, VueFooter, ].forEach(Component => { diff --git a/resources/js/langs/locales.js b/resources/js/langs/locales.js index d30a61e8..8461bfa6 100644 --- a/resources/js/langs/locales.js +++ b/resources/js/langs/locales.js @@ -69,6 +69,7 @@ export default { "settings": "Settings", "account": "Account", "password": "Password", + "language": "Language", "confirm": [], "forms": { "edit_settings": "Edit settings" @@ -311,6 +312,7 @@ export default { "settings": "Réglages", "account": "Compte", "password": "Mot de passe", + "language": "Langue", "confirm": [], "forms": { "edit_settings": "Modifier les réglages" diff --git a/resources/js/views/profile/Settings.vue b/resources/js/views/profile/Settings.vue index a9650fed..c8dacd07 100644 --- a/resources/js/views/profile/Settings.vue +++ b/resources/js/views/profile/Settings.vue @@ -1,7 +1,7 @@