diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 6d989d27..d9ea7d48 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -162,4 +162,20 @@ .scrollbar::-webkit-scrollbar-thumb:hover { background: #a6a6a6; } +} + +/* Custom scrollbar implementation for Windows browsers */ +.windows { + ::-webkit-scrollbar { + width: 4px; + } + + ::-webkit-scrollbar-thumb { + background: #d6d6d6; + border-radius: 10px; + } + + ::-webkit-scrollbar-thumb:hover { + background: #a6a6a6; + } } \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e9788920..3643c9c7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -4,6 +4,8 @@ class ApplicationController < ActionController::Base helper_method :require_upgrade?, :subscription_pending? + before_action :detect_os + private def require_upgrade? return false if self_hosted? @@ -24,4 +26,16 @@ class ApplicationController < ActionController::Base "with_sidebar" end + + def detect_os + user_agent = request.user_agent + @os = case user_agent + when /Windows/i then "windows" + when /Macintosh/i then "mac" + when /Linux/i then "linux" + when /Android/i then "android" + when /iPhone|iPad/i then "ios" + else "" + end + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e6f026d3..8c8abc9c 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,5 +1,5 @@ - + <%= content_for(:title) || "Maybe" %>