From 210157a5a80389d364b517c5caa645c6f23abf6a Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sat, 25 Dec 2021 22:03:01 +0200 Subject: [PATCH] Several changes - made selectbox component - added language selection box - renamed languages --- README.md | 7 +- public/locales/en-us.yaml | 12 ++ public/locales/en.yaml | 7 - public/locales/{ru.yaml => ru-ru.yaml} | 7 +- settings.html | 10 +- src/assets/svgs/arrow.svg | 1 + src/components/Checkbox.vue | 4 +- src/components/Selectbox.vue | 77 +++++++++++ src/pages/settings.ts | 26 +++- src/sass/components.sass | 183 ------------------------- src/sass/components/selectbox.sass | 132 ++++++++++++++++++ src/ts/core/Locales.ts | 4 +- 12 files changed, 261 insertions(+), 209 deletions(-) create mode 100644 public/locales/en-us.yaml delete mode 100644 public/locales/en.yaml rename public/locales/{ru.yaml => ru-ru.yaml} (52%) create mode 100644 src/assets/svgs/arrow.svg create mode 100644 src/components/Selectbox.vue create mode 100644 src/sass/components/selectbox.sass diff --git a/README.md b/README.md index 99fb05c..6508aca 100644 --- a/README.md +++ b/README.md @@ -149,12 +149,13 @@ This is our current roadmap goals. You can find older ones [here](ROADMAP.md) * Patch unavailable * Test patch available * Make Vue components - * Checkbox - * Selection + * Checkbox + * Selectbox * SelectionList + * SelectableCheckbox * PropertiesEditor * Rewrite sass code, provide more flexible theming ability -* Add `vue-i18n` +* Add `vue-i18n` ### Features diff --git a/public/locales/en-us.yaml b/public/locales/en-us.yaml new file mode 100644 index 0000000..36a98d1 --- /dev/null +++ b/public/locales/en-us.yaml @@ -0,0 +1,12 @@ +settings: + # General + general: + title: General + items: + test1: Hello 1 + test2: Hello 2 + test3: Hello 3 + + # Language selection + lang: + launcher: Language \ No newline at end of file diff --git a/public/locales/en.yaml b/public/locales/en.yaml deleted file mode 100644 index 4859542..0000000 --- a/public/locales/en.yaml +++ /dev/null @@ -1,7 +0,0 @@ -settings: - general: - title: General - items: - test1: Hello 1 - test2: Hello 2 - test3: Hello 3 \ No newline at end of file diff --git a/public/locales/ru.yaml b/public/locales/ru-ru.yaml similarity index 52% rename from public/locales/ru.yaml rename to public/locales/ru-ru.yaml index 4d4216b..9b07eb0 100644 --- a/public/locales/ru.yaml +++ b/public/locales/ru-ru.yaml @@ -1,7 +1,12 @@ settings: + # General general: title: Основное items: test1: Привет 1 test2: Привет 2 - test3: Привет 3 \ No newline at end of file + test3: Привет 3 + + # Language selection + lang: + launcher: Язык \ No newline at end of file diff --git a/settings.html b/settings.html index a55ff75..f1c3360 100644 --- a/settings.html +++ b/settings.html @@ -16,16 +16,14 @@

{{ $t('settings.general.title') }}

- -
- -
+ + +
  • {{ lang }}
  • +
    diff --git a/src/assets/svgs/arrow.svg b/src/assets/svgs/arrow.svg new file mode 100644 index 0000000..80b7270 --- /dev/null +++ b/src/assets/svgs/arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Checkbox.vue b/src/components/Checkbox.vue index 90bf494..b5b0e2a 100644 --- a/src/components/Checkbox.vue +++ b/src/components/Checkbox.vue @@ -1,6 +1,6 @@