mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 14:04:36 +08:00

We already had isIpadOS, but for some themes and components we really need to do different things if the user is on a tablet, including Android tablets. isTablet and isTabletScreen have been introduced to the capabilities service. isTablet is true if the screen size is a tablet, touch is detected, or we have already detected iPad OS, or the device matches tablet UAs isTabletScreen checks both portrait and landscape dimensions of 1280x600 which should cover most cases.