mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00:00
Add ipados-device class, move ios-device class to clientside
This commit is contained in:
parent
cc901cc8e6
commit
76243fce15
@ -8,5 +8,13 @@ export default {
|
||||
} else {
|
||||
html.classList.add("no-touch", "discourse-no-touch");
|
||||
}
|
||||
|
||||
if (caps.isIpadOS) {
|
||||
html.classList.add("ipados-device");
|
||||
}
|
||||
|
||||
if (caps.isIOS) {
|
||||
html.classList.add("ios-device");
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -175,7 +175,6 @@ module ApplicationHelper
|
||||
list = []
|
||||
list << (mobile_view? ? "mobile-view" : "desktop-view")
|
||||
list << (mobile_device? ? "mobile-device" : "not-mobile-device")
|
||||
list << "ios-device" if ios_device?
|
||||
list << "rtl" if rtl?
|
||||
list << text_size_class
|
||||
list << "anon" unless current_user
|
||||
@ -446,10 +445,6 @@ module ApplicationHelper
|
||||
MobileDetection.mobile_device?(request.user_agent)
|
||||
end
|
||||
|
||||
def ios_device?
|
||||
MobileDetection.ios_device?(request.user_agent)
|
||||
end
|
||||
|
||||
def customization_disabled?
|
||||
request.env[ApplicationController::NO_THEMES]
|
||||
end
|
||||
|
@ -20,10 +20,6 @@ module MobileDetection
|
||||
end
|
||||
end
|
||||
|
||||
def self.ios_device?(user_agent)
|
||||
user_agent =~ /iPad|iPhone|iPod/
|
||||
end
|
||||
|
||||
MODERN_MOBILE_REGEX =
|
||||
%r{
|
||||
\(.*iPhone\ OS\ 1[5-9].*\)|
|
||||
|
Loading…
x
Reference in New Issue
Block a user