pleroma-fe/src/components/user_finder/user_finder.js

21 lines
423 B
JavaScript
Raw Normal View History

2017-05-13 02:54:12 +10:00
const UserFinder = {
data: () => ({
username: undefined,
2017-09-11 03:46:42 +10:00
hidden: true,
error: false,
loading: false
2017-05-13 02:54:12 +10:00
}),
methods: {
findUser (username) {
2018-11-15 06:29:45 +11:00
this.$router.push({ name: 'user-search', query: { query: username } })
2019-02-26 01:08:52 +11:00
this.$refs.userSearchInput.focus()
},
toggleHidden () {
this.hidden = !this.hidden
this.$emit('toggled', this.hidden)
2017-05-13 02:54:12 +10:00
}
}
}
export default UserFinder