mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:43:16 +08:00
FIX: User agent browser detection (#6352)
This commit is contained in:
parent
ddfd02ad36
commit
39414068ff
|
@ -39,7 +39,7 @@ class UserAuthTokenSerializer < ApplicationSerializer
|
||||||
'Linux'
|
'Linux'
|
||||||
when /Windows/i
|
when /Windows/i
|
||||||
'Windows'
|
'Windows'
|
||||||
when /macOS/i
|
when /Macintosh|Mac OS X|macOS/i
|
||||||
'macOS'
|
'macOS'
|
||||||
when /iPhone|iPad|iPod/i
|
when /iPhone|iPad|iPod/i
|
||||||
'iOS'
|
'iOS'
|
||||||
|
@ -56,7 +56,7 @@ class UserAuthTokenSerializer < ApplicationSerializer
|
||||||
I18n.t('user_auth_tokens.devices.linux')
|
I18n.t('user_auth_tokens.devices.linux')
|
||||||
when /Windows/i
|
when /Windows/i
|
||||||
I18n.t('user_auth_tokens.devices.windows')
|
I18n.t('user_auth_tokens.devices.windows')
|
||||||
when /macOS/i
|
when /Macintosh|Mac OS X|macOS/i
|
||||||
I18n.t('user_auth_tokens.devices.mac')
|
I18n.t('user_auth_tokens.devices.mac')
|
||||||
when /iPhone/i
|
when /iPhone/i
|
||||||
I18n.t('user_auth_tokens.devices.iphone')
|
I18n.t('user_auth_tokens.devices.iphone')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user