mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 12:03:25 -04:00
#50 pronouns cards - default words
This commit is contained in:
parent
be627d1726
commit
1ec86c6173
@ -76,5 +76,12 @@ contact:
|
||||
user:
|
||||
enabled: true
|
||||
route: 'account'
|
||||
profileEditorRoute: 'my-card'
|
||||
profile:
|
||||
defaultWords:
|
||||
- ['mx.', 'mr.', 'miss', 'sir', 'ma''am']
|
||||
- ['person', 'man', 'woman', 'lady', 'dude', 'boy', 'girl', 'bro', 'sis']
|
||||
- ['pretty', 'handsome', 'cute']
|
||||
- ['partner', 'boyfriend', 'girlfriend', 'joyfriend']
|
||||
|
||||
redirects: []
|
||||
|
@ -222,6 +222,12 @@ user:
|
||||
enabled: true
|
||||
route: 'konto'
|
||||
profileEditorRoute: 'wizytówka'
|
||||
profile:
|
||||
defaultWords:
|
||||
- ['pan', 'pani', 'pań', 'panu']
|
||||
- ['osoba', 'mężczyzna', 'kobieta', 'enby', 'facet', 'baba', 'ziom', 'laska']
|
||||
- ['ładnx', 'przystojnx', 'słodkx']
|
||||
- ['partner', 'chłopak', 'dziewczyna']
|
||||
|
||||
redirects:
|
||||
- { from: '^/neutratywy', to: '/rzeczowniki' }
|
||||
|
@ -85,9 +85,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { head, dictToList, listToDict } from "../src/helpers";
|
||||
import { head, dictToList, listToDict, buildList } from "../src/helpers";
|
||||
import { templates } from "~/src/data";
|
||||
import { buildTemplate } from "../src/buildTemplate";
|
||||
import config from '../data/config.suml';
|
||||
|
||||
const defaultWords = config.user.profile.defaultWords.map(c => buildList(function* () {
|
||||
for (let word of c) {
|
||||
yield {key: word, value: 0};
|
||||
}
|
||||
}))
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -134,7 +141,7 @@
|
||||
birthday: profile.birthday,
|
||||
links: profile.links,
|
||||
flags: dictToList(profile.flags),
|
||||
words: [{}, {}, {}, {}], // TODO defaults
|
||||
words: defaultWords,
|
||||
};
|
||||
}
|
||||
|
||||
@ -145,7 +152,7 @@
|
||||
birthday: null,
|
||||
links: {},
|
||||
flags: {},
|
||||
words: [{}, {}, {}, {}],
|
||||
words: defaultWords,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -124,6 +124,9 @@ export const dictToList = dict => {
|
||||
}
|
||||
|
||||
export const listToDict = list => {
|
||||
if (Object.keys(list).length === 0) {
|
||||
return {}
|
||||
}
|
||||
const dict = {};
|
||||
for (let el of list) {
|
||||
dict[el.key] = el.value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user