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

21 lines
416 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-22 06:20:46 +11:00
this.$refs.username.focus()
},
toggleHidden () {
this.hidden = !this.hidden
this.$emit('toggled', this.hidden)
2017-05-13 02:54:12 +10:00
}
}
}
export default UserFinder