diff --git a/src/constants/displayStyle.js b/src/constants/displayStyle.js new file mode 100644 index 00000000..efeeaf36 --- /dev/null +++ b/src/constants/displayStyle.js @@ -0,0 +1,16 @@ +import i18n from '../config/i18n' + +export default { + DisplayNameAndUsername: { + name: i18n.t('preferences.general.display_style.display_name_and_username'), + value: 0 + }, + DisplayName: { + name: i18n.t('preferences.general.display_style.display_name'), + value: 1 + }, + Username: { + name: i18n.t('preferences.general.display_style.username'), + value: 2 + } +} diff --git a/src/constants/visibility.js b/src/constants/visibility.js index e8947447..2fe77498 100644 --- a/src/constants/visibility.js +++ b/src/constants/visibility.js @@ -3,18 +3,22 @@ import i18n from '../config/i18n' export default { Public: { name: i18n.t('preferences.general.visibility.public'), - value: 0 + value: 0, + key: 'public' }, Unlisted: { name: i18n.t('preferences.general.visibility.unlisted'), - value: 1 + value: 1, + key: 'unlisted' }, Private: { name: i18n.t('preferences.general.visibility.private'), - value: 2 + value: 2, + key: 'private' }, Direct: { name: i18n.t('preferences.general.visibility.direct'), - value: 3 + value: 3, + key: 'direct' } } diff --git a/src/main/preferences.js b/src/main/preferences.js index 2f8ceddf..0afea83f 100644 --- a/src/main/preferences.js +++ b/src/main/preferences.js @@ -1,6 +1,7 @@ import storage from 'electron-json-storage' import objectAssignDeep from 'object-assign-deep' import Visibility from '../constants/visibility' +import DisplayStyle from '../constants/displayStyle' const Base = { general: { @@ -10,7 +11,7 @@ const Base = { }, theme: 'white', fontSize: 14, - displayNameStyle: 0, + displayNameStyle: DisplayStyle.DisplayNameAndUsername.value, tootVisibility: Visibility.Public.value }, state: { diff --git a/src/renderer/components/Preferences/General.vue b/src/renderer/components/Preferences/General.vue index ec122205..d33b56de 100644 --- a/src/renderer/components/Preferences/General.vue +++ b/src/renderer/components/Preferences/General.vue @@ -85,6 +85,7 @@