mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-20 05:39: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
|
@ -163,3 +163,19 @@
|
||||||
background: #a6a6a6;
|
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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,8 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
helper_method :require_upgrade?, :subscription_pending?
|
helper_method :require_upgrade?, :subscription_pending?
|
||||||
|
|
||||||
|
before_action :detect_os
|
||||||
|
|
||||||
private
|
private
|
||||||
def require_upgrade?
|
def require_upgrade?
|
||||||
return false if self_hosted?
|
return false if self_hosted?
|
||||||
|
@ -24,4 +26,16 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
"with_sidebar"
|
"with_sidebar"
|
||||||
end
|
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
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="h-full" lang="en">
|
<html class="h-full <%= @os %>" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title><%= content_for(:title) || "Maybe" %></title>
|
<title><%= content_for(:title) || "Maybe" %></title>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue