mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-02-03 02:37:55 +01:00
Merge pull request #404 from h3poteto/iss-380
closes #380 Set visibility from source message when reply
This commit is contained in:
commit
14bb991b98
@ -70,7 +70,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openNewTootModal () {
|
||||
this.$store.commit('TimelineSpace/Modals/NewToot/changeModal', true)
|
||||
this.$store.dispatch('TimelineSpace/Modals/NewToot/openModal')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,11 @@ export default {
|
||||
return this.$store.state.TimelineSpace.Modals.NewToot.modalOpen
|
||||
},
|
||||
set (value) {
|
||||
this.$store.dispatch('TimelineSpace/Modals/NewToot/changeModal', value)
|
||||
if (value) {
|
||||
this.$store.dispatch('TimelineSpace/Modals/NewToot/openModal')
|
||||
} else {
|
||||
this.$store.dispatch('TimelineSpace/Modals/NewToot/closeModal')
|
||||
}
|
||||
}
|
||||
},
|
||||
status: {
|
||||
@ -136,7 +140,7 @@ export default {
|
||||
methods: {
|
||||
close () {
|
||||
this.resetImage()
|
||||
this.$store.dispatch('TimelineSpace/Modals/NewToot/changeModal', false)
|
||||
this.$store.dispatch('TimelineSpace/Modals/NewToot/closeModal')
|
||||
},
|
||||
toot () {
|
||||
if (!this.newTootModal) {
|
||||
|
@ -121,9 +121,9 @@ const TimelineSpace = {
|
||||
ipcRenderer.send('stop-local-streaming')
|
||||
return 'stopLocalStreaming'
|
||||
},
|
||||
watchShortcutEvents ({ commit }) {
|
||||
watchShortcutEvents ({ commit, dispatch }) {
|
||||
ipcRenderer.on('CmdOrCtrl+N', () => {
|
||||
commit('TimelineSpace/Modals/NewToot/changeModal', true, { root: true })
|
||||
dispatch('TimelineSpace/Modals/NewToot/openModal', {}, { root: true })
|
||||
})
|
||||
ipcRenderer.on('CmdOrCtrl+K', () => {
|
||||
commit('TimelineSpace/Modals/Jump/changeModal', true, { root: true })
|
||||
|
@ -65,19 +65,22 @@ const NewToot = {
|
||||
const mentionAccounts = [message.account.acct].concat(message.mentions.map(a => a.acct))
|
||||
.filter((a, i, self) => self.indexOf(a) === i)
|
||||
.filter((a) => a !== rootState.TimelineSpace.account.username)
|
||||
commit('changeModal', true)
|
||||
commit('updateStatus', `${mentionAccounts.map(m => `@${m}`).join(' ')} `)
|
||||
commit('changeVisibility', message.visibility)
|
||||
},
|
||||
openModal ({ commit }) {
|
||||
commit('changeModal', true)
|
||||
},
|
||||
changeModal ({ commit }, value) {
|
||||
commit('changeModal', value)
|
||||
if (!value) {
|
||||
commit('updateStatus', '')
|
||||
commit('setReplyTo', null)
|
||||
commit('changeBlockSubmit', false)
|
||||
commit('clearAttachedMedias')
|
||||
commit('changeSensitive', false)
|
||||
commit('updateSpoiler', '')
|
||||
}
|
||||
closeModal ({ commit }) {
|
||||
commit('changeModal', false)
|
||||
commit('updateStatus', '')
|
||||
commit('setReplyTo', null)
|
||||
commit('changeBlockSubmit', false)
|
||||
commit('clearAttachedMedias')
|
||||
commit('changeSensitive', false)
|
||||
commit('updateSpoiler', '')
|
||||
commit('changeVisibility', 'public')
|
||||
},
|
||||
uploadImage ({ state, commit, rootState }, image) {
|
||||
commit('changeBlockSubmit', true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user