biome format --write
This commit is contained in:
parent
8372348148
commit
9262e803ec
415 changed files with 54076 additions and 17419 deletions
|
|
@ -6,29 +6,29 @@ import { usePostStatusStore } from 'src/stores/post_status'
|
|||
const PostStatusModal = {
|
||||
components: {
|
||||
PostStatusForm,
|
||||
Modal
|
||||
Modal,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
resettingForm: false
|
||||
resettingForm: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isLoggedIn () {
|
||||
isLoggedIn() {
|
||||
return !!this.$store.state.users.currentUser
|
||||
},
|
||||
modalActivated () {
|
||||
modalActivated() {
|
||||
return usePostStatusStore().modalActivated
|
||||
},
|
||||
isFormVisible () {
|
||||
isFormVisible() {
|
||||
return this.isLoggedIn && !this.resettingForm && this.modalActivated
|
||||
},
|
||||
params () {
|
||||
params() {
|
||||
return usePostStatusStore().params || {}
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
params (newVal, oldVal) {
|
||||
params(newVal, oldVal) {
|
||||
if (get(newVal, 'repliedUser.id') !== get(oldVal, 'repliedUser.id')) {
|
||||
this.resettingForm = true
|
||||
this.$nextTick(() => {
|
||||
|
|
@ -36,21 +36,23 @@ const PostStatusModal = {
|
|||
})
|
||||
}
|
||||
},
|
||||
isFormVisible (val) {
|
||||
isFormVisible(val) {
|
||||
if (val) {
|
||||
this.$nextTick(() => this.$el && this.$el.querySelector('textarea').focus())
|
||||
this.$nextTick(
|
||||
() => this.$el && this.$el.querySelector('textarea').focus(),
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
closeModal () {
|
||||
closeModal() {
|
||||
usePostStatusStore().closePostStatusModal()
|
||||
},
|
||||
resetAndClose () {
|
||||
resetAndClose() {
|
||||
usePostStatusStore().resetPostStatusModal()
|
||||
usePostStatusStore().closePostStatusModal()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default PostStatusModal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue