mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 20:24:18 -04:00
#50 pronouns cards - default words
This commit is contained in:
parent
be627d1726
commit
1ec86c6173
@ -76,5 +76,12 @@ contact:
|
|||||||
user:
|
user:
|
||||||
enabled: true
|
enabled: true
|
||||||
route: 'account'
|
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: []
|
redirects: []
|
||||||
|
@ -222,6 +222,12 @@ user:
|
|||||||
enabled: true
|
enabled: true
|
||||||
route: 'konto'
|
route: 'konto'
|
||||||
profileEditorRoute: 'wizytówka'
|
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:
|
redirects:
|
||||||
- { from: '^/neutratywy', to: '/rzeczowniki' }
|
- { from: '^/neutratywy', to: '/rzeczowniki' }
|
||||||
|
@ -85,9 +85,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { head, dictToList, listToDict } from "../src/helpers";
|
import { head, dictToList, listToDict, buildList } from "../src/helpers";
|
||||||
import { templates } from "~/src/data";
|
import { templates } from "~/src/data";
|
||||||
import { buildTemplate } from "../src/buildTemplate";
|
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 {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -134,7 +141,7 @@
|
|||||||
birthday: profile.birthday,
|
birthday: profile.birthday,
|
||||||
links: profile.links,
|
links: profile.links,
|
||||||
flags: dictToList(profile.flags),
|
flags: dictToList(profile.flags),
|
||||||
words: [{}, {}, {}, {}], // TODO defaults
|
words: defaultWords,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +152,7 @@
|
|||||||
birthday: null,
|
birthday: null,
|
||||||
links: {},
|
links: {},
|
||||||
flags: {},
|
flags: {},
|
||||||
words: [{}, {}, {}, {}],
|
words: defaultWords,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -124,6 +124,9 @@ export const dictToList = dict => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const listToDict = list => {
|
export const listToDict = list => {
|
||||||
|
if (Object.keys(list).length === 0) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
const dict = {};
|
const dict = {};
|
||||||
for (let el of list) {
|
for (let el of list) {
|
||||||
dict[el.key] = el.value;
|
dict[el.key] = el.value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user