about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorbeatrix-bitrot <beatrix.bitrot@gmail.com>2017-06-27 20:46:13 +0000
committerbeatrix-bitrot <beatrix.bitrot@gmail.com>2017-06-27 20:46:13 +0000
commitddafde942ca53816c19b0ea0cb40bb1b46cf5668 (patch)
treec0ac2138fe994c4c2a15c23b47d4155f75148945 /app/helpers
parente6300de1421d28d173658e61601b9e016c3d0a6d (diff)
parentda42bfadb58888e3a18afd66395f0f3edc2fa622 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/settings_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb
index 172ef33ca..847eff2e7 100644
--- a/app/helpers/settings_helper.rb
+++ b/app/helpers/settings_helper.rb
@@ -41,4 +41,16 @@ module SettingsHelper
   def hash_to_object(hash)
     HashObject.new(hash)
   end
+
+  def session_device_icon(session)
+    device = session.detection.device
+
+    if device.mobile?
+      'mobile'
+    elsif device.tablet?
+      'tablet'
+    else
+      'desktop'
+    end
+  end
 end