Big first commit
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

authentication-zero and first layout
This commit is contained in:
2026-05-21 02:54:39 +02:00
parent 6e7fe9797a
commit 6f192274ab
49 changed files with 1933 additions and 17 deletions

View File

@@ -1,2 +1,36 @@
module ApplicationHelper
def nav_link_class(target_controller)
base_classes = "flex items-center gap-3 px-3 py-2.5 text-sm font-medium rounded-lg transition-colors duration-200"
if controller_name == target_controller
"#{base_classes} bg-blue-50 text-blue-600 font-semibold"
else
"#{base_classes} text-gray-700 hover:bg-gray-50"
end
end
def parse_user_agent(user_agent_string)
ua = user_agent_string.to_s.downcase
# Browser-Erkennung via Case-Regex (nutzt === im Hintergrund)
browser = case ua
when /firefox/ then "Firefox"
when /chrome/ then "Chrome"
when /safari/ then "Safari"
when /edge/ then "Edge"
else "Unbekannter Browser"
end
# Betriebssystem-Erkennung via Case-Regex
os = case ua
when /windows/ then "Windows"
when /macintosh|mac os/ then "macOS"
when /iphone/ then "iPhone"
when /android/ then "Android"
when /linux/ then "Linux"
else "Betriebssystem"
end
"#{browser} auf #{os}"
end
end