diff --git a/components/ButtonList.vue b/components/ButtonList.vue new file mode 100644 index 00000000..5be50c2f --- /dev/null +++ b/components/ButtonList.vue @@ -0,0 +1,69 @@ + + + + + + diff --git a/locale/pl/translations.suml b/locale/pl/translations.suml index 31ebf1ed..9583c5d4 100644 --- a/locale/pl/translations.suml +++ b/locale/pl/translations.suml @@ -690,6 +690,8 @@ profile: words: 'Słowa' birthday: 'Wiek' birthdayInfo: 'Nie pokazujemy publicznie pełnej daty urodzenia, jedynie obliczony wiek.' + flags: 'Flagi' + flagsInfo: 'Przeciągnij swoje pride''owe flagi do poniższej ramki.' links: 'Linki' column: 'Kolumna' diff --git a/nuxt.config.js b/nuxt.config.js index 9157a007..6494910e 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,6 +1,7 @@ import translations from './server/translations'; import config from './server/config'; import fs from 'fs'; +import {buildDict} from "./src/helpers"; const locale = config.locale; const title = translations.title; @@ -87,6 +88,16 @@ export default { BASE_URL: process.env.BASE_URL, PUBLIC_KEY: fs.readFileSync(__dirname + '/keys/public.pem').toString(), LOCALE: config.locale, + FLAGS: buildDict(function *() { + for (let flag of fs.readdirSync(__dirname + '/static/flags/')) { + yield [ + flag.replace(new RegExp('\.png$'), ''), + flag.replace(new RegExp('\.png$'), '') + .replace(new RegExp('_', 'g'), '') + .trim() + ]; + } + }), }, serverMiddleware: { '/': bodyParser.json(), diff --git a/routes/profile.vue b/routes/profile.vue index be23364c..663e76b3 100644 --- a/routes/profile.vue +++ b/routes/profile.vue @@ -33,7 +33,7 @@

-
+
-
+
    -
  • - +
  • +
@@ -102,6 +102,7 @@ username: this.$route.params.pathMatch, profiles: {}, glue: ' ' + this.$t('template.or') + ' ', + allFlags: process.env.FLAGS, } }, async asyncData({ app, route }) { diff --git a/routes/profileEditor.vue b/routes/profileEditor.vue index eea3669d..4ea2010d 100644 --- a/routes/profileEditor.vue +++ b/routes/profileEditor.vue @@ -28,10 +28,10 @@ profile.pronouns - -

+

profile.pronounsInfo

+
@@ -42,6 +42,19 @@