Commit 55d41c5b authored by Randall Leeds's avatar Randall Leeds

Multi-provider user search field

parent c5313dde
......@@ -314,11 +314,12 @@ username = ['$filter', '$window', ($filter, $window) ->
return unless ctrl?
ctrl.$render = ->
scope.uname = ($filter 'persona') ctrl.$viewValue
scope.uname = ($filter 'persona') ctrl.$viewValue, 'username'
scope.provider = ($filter 'persona') ctrl.$viewValue, 'provider'
scope.uclick = (event) ->
event.stopPropagation()
$window.open "/u/" + scope.uname
$window.open "/u/#{scope.uname}@#{scope.provider}"
return
require: '?ngModel'
......
......@@ -107,7 +107,10 @@ class StreamSearch
rules:
user:
formatter: (user) ->
'acct:' + user + '@' + window.location.hostname
# FIXME: inject $window
unless '@' in user
user += '@' + window.location.hostname
'acct:' + user
path: '/user'
exact_match: true
case_sensitive: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment