mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Replaced Native Scrollbars with Tailwind Scrollbars on Windows (#1493)
* feat: scrollbar styling for windows browsers * fix: lint
This commit is contained in:
parent
c8302a6d49
commit
571fc4db75
3 changed files with 31 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue