diff --git a/src/main/preferences.js b/src/main/preferences.js
index ac3482b082..3c0b1e1b96 100644
--- a/src/main/preferences.js
+++ b/src/main/preferences.js
@@ -9,7 +9,8 @@ const Base = {
},
theme: 'white',
fontSize: 14,
- displayNameStyle: 0
+ displayNameStyle: 0,
+ tootVisibility: 0
},
state: {
collapse: false
diff --git a/src/renderer/components/Preferences/General.vue b/src/renderer/components/Preferences/General.vue
index 98b6df1d27..83763a0c7a 100644
--- a/src/renderer/components/Preferences/General.vue
+++ b/src/renderer/components/Preferences/General.vue
@@ -34,6 +34,26 @@
+
+
Toot
+
+
+
+ Default Visibility: |
+
+
+
+
+
+ |
+
+
+
+
Sounds
@@ -82,6 +102,20 @@ export default {
name: 'username',
value: 2
}
+ ],
+ visibilities: [
+ {
+ name: 'public',
+ value: 0
+ },
+ {
+ name: 'unlisted',
+ value: 1
+ },
+ {
+ name: 'private',
+ value: 2
+ }
]
}
},
@@ -106,6 +140,14 @@ export default {
this.$store.dispatch('Preferences/General/updateDisplayNameStyle', value)
}
},
+ tootVisibility: {
+ get () {
+ return this.$store.state.Preferences.General.general.tootVisibility
+ },
+ set (value) {
+ this.$store.dispatch('Preferences/General/updateTootVisibility', value)
+ }
+ },
sound_fav_rb: {
get () {
return this.$store.state.Preferences.General.general.sound.fav_rb
@@ -146,52 +188,41 @@ export default {
diff --git a/src/renderer/store/Preferences/General.js b/src/renderer/store/Preferences/General.js
index fd3cd3b502..8aa33d3391 100644
--- a/src/renderer/store/Preferences/General.js
+++ b/src/renderer/store/Preferences/General.js
@@ -10,7 +10,8 @@ const General = {
},
theme: 'white',
fontSize: 14,
- displayNameStyle: 0
+ displayNameStyle: 0,
+ tootVisibility: 0
},
loading: false
},
@@ -94,6 +95,23 @@ const General = {
commit('updateGeneral', conf.general)
})
},
+ updateTootVisibility ({ dispatch, commit, state }, value) {
+ const newGeneral = Object.assign({}, state.general, {
+ tootVisibility: value
+ })
+ const config = {
+ general: newGeneral
+ }
+ ipcRenderer.send('save-preferences', config)
+ ipcRenderer.once('error-save-preferences', (event, err) => {
+ ipcRenderer.removeAllListeners('response-save-preferences')
+ })
+ ipcRenderer.once('response-save-preferences', (event, conf) => {
+ ipcRenderer.removeAllListeners('error-save-preferences')
+ dispatch('App/loadPreferences', null, { root: true })
+ commit('updateGeneral', conf.general)
+ })
+ },
updateSound ({ commit, state }, sound) {
commit('changeLoading', true)
const newSound = Object.assign({}, state.general.sound, sound)