2025-10-04 10:41:35 -04:00
<div class="min-h-screen bg-gradient-to-br from-base-100 to-base-200 py-12 px-4 mx-auto">
2025-09-30 12:43:26 -04:00
<div class="max-w-4xl mx-auto">
<!-- Hero Section -->
<div class="text-center mb-12">
2025-10-04 10:41:35 -04:00
<div class="mx-auto flex items-center justify-center h-24 w-24 rounded-full bg-primary mb-6 shadow-xl">
<%= icon 'users', class: "h-12 w-12 text-primary-content" %>
2025-09-30 12:43:26 -04:00
</div>
2025-09-27 08:04:10 -04:00
2025-10-04 10:41:35 -04:00
<h1 class="text-5xl font-bold text-base-content mb-4">
2025-09-30 12:43:26 -04:00
Join <%= @invitation.family.name %>!
</h1>
2025-09-27 08:04:10 -04:00
2025-10-04 10:41:35 -04:00
<p class="text-xl text-base-content opacity-80 mb-2">
You've been invited by <strong class="text-base-content"><%= @invitation.invited_by.email %></strong> to join their family. Create your account to accept the invitation and start sharing location data.
2025-09-30 12:43:26 -04:00
</p>
2025-10-04 12:26:41 -04:00
<div class="alert alert-info inline-flex rounded-lg px-4 py-2 mt-4">
2025-10-04 10:41:35 -04:00
<%= icon 'info', class: "h-5 w-5 mr-2" %>
<span class="text-sm font-medium">
2025-09-30 12:43:26 -04:00
Your email (<%= @invitation.email %>) will be used for this account
</span>
2025-09-27 08:04:10 -04:00
</div>
2025-09-30 12:43:26 -04:00
</div>
2025-09-27 08:04:10 -04:00
2025-09-30 12:43:26 -04:00
<!-- Benefits Section -->
2025-10-04 10:41:35 -04:00
<div class="bg-base-200 shadow-xl rounded-2xl p-8 mb-8">
<h2 class="text-2xl font-bold text-base-content mb-6 text-center">
2025-09-30 12:43:26 -04:00
What benefits does joining a family bring?
</h2>
<div class="grid md:grid-cols-2 gap-6 mb-8">
2025-10-04 10:41:35 -04:00
<div class="flex items-start space-x-4 p-4 bg-info/10 rounded-lg border border-info/20">
2025-09-30 12:43:26 -04:00
<div class="flex-shrink-0">
2025-10-04 10:41:35 -04:00
<div class="h-10 w-10 rounded-full bg-info flex items-center justify-center">
<%= icon 'map-pin', class: "h-6 w-6 text-info-content" %>
2025-09-30 12:43:26 -04:00
</div>
</div>
2025-09-27 08:04:10 -04:00
<div>
2025-10-04 10:41:35 -04:00
<h3 class="font-semibold text-base-content mb-1">
2025-09-30 12:43:26 -04:00
Share Location Data
</h3>
2025-10-04 10:41:35 -04:00
<p class="text-sm text-base-content opacity-70">
2025-09-30 12:43:26 -04:00
Share your location history with family members and see where they are
</p>
2025-09-27 08:04:10 -04:00
</div>
2025-09-30 12:43:26 -04:00
</div>
2025-09-27 08:04:10 -04:00
2025-10-04 10:41:35 -04:00
<div class="flex items-start space-x-4 p-4 bg-secondary/10 rounded-lg border border-secondary/20">
2025-09-30 12:43:26 -04:00
<div class="flex-shrink-0">
2025-10-04 10:41:35 -04:00
<div class="h-10 w-10 rounded-full bg-secondary flex items-center justify-center">
<%= icon 'chart-column', class: "h-6 w-6 text-secondary-content" %>
2025-09-30 12:43:26 -04:00
</div>
</div>
2025-09-27 08:04:10 -04:00
<div>
2025-10-04 10:41:35 -04:00
<h3 class="font-semibold text-base-content mb-1">
2025-09-30 12:43:26 -04:00
Track your location history
</h3>
2025-10-04 10:41:35 -04:00
<p class="text-sm text-base-content opacity-70">
2025-09-30 12:43:26 -04:00
Access interactive maps and personal travel statistics
</p>
2025-09-27 08:04:10 -04:00
</div>
2025-09-30 12:43:26 -04:00
</div>
2025-09-27 08:04:10 -04:00
2025-10-04 10:41:35 -04:00
<div class="flex items-start space-x-4 p-4 bg-success/10 rounded-lg border border-success/20">
2025-09-30 12:43:26 -04:00
<div class="flex-shrink-0">
2025-10-04 10:41:35 -04:00
<div class="h-10 w-10 rounded-full bg-success flex items-center justify-center">
<%= icon 'heart', class: "h-6 w-6 text-success-content" %>
2025-09-30 12:43:26 -04:00
</div>
</div>
2025-09-27 08:04:10 -04:00
<div>
2025-10-04 10:41:35 -04:00
<h3 class="font-semibold text-base-content mb-1">
2025-09-30 12:43:26 -04:00
Stay Connected
</h3>
2025-10-04 10:41:35 -04:00
<p class="text-sm text-base-content opacity-70">
2025-09-30 12:43:26 -04:00
Keep track of your loved ones' travels and adventures in real-time
</p>
2025-09-27 08:04:10 -04:00
</div>
2025-09-30 12:43:26 -04:00
</div>
2025-09-27 08:04:10 -04:00
2025-10-04 10:41:35 -04:00
<div class="flex items-start space-x-4 p-4 bg-warning/10 rounded-lg border border-warning/20">
2025-09-30 12:43:26 -04:00
<div class="flex-shrink-0">
2025-10-04 10:41:35 -04:00
<div class="h-10 w-10 rounded-full bg-warning flex items-center justify-center">
<%= icon 'shield-check', class: "h-6 w-6 text-warning-content" %>
2025-09-30 12:43:26 -04:00
</div>
</div>
2025-09-27 08:04:10 -04:00
<div>
2025-10-04 10:41:35 -04:00
<h3 class="font-semibold text-base-content mb-1">
2025-09-30 12:43:26 -04:00
Full Control & Privacy
</h3>
2025-10-04 10:41:35 -04:00
<p class="text-sm text-base-content opacity-70">
2025-09-30 12:43:26 -04:00
You control what and how long you share and can leave the family anytime
</p>
2025-09-27 08:04:10 -04:00
</div>
2025-09-30 12:43:26 -04:00
</div>
2025-09-27 08:04:10 -04:00
</div>
2025-09-30 12:43:26 -04:00
<!-- Invitation Details -->
2025-10-04 10:41:35 -04:00
<div class="bg-base-300 rounded-lg p-6 mb-6">
<h3 class="text-sm font-medium text-base-content opacity-70 mb-3">Invitation Details</h3>
2025-09-30 12:43:26 -04:00
<div class="grid grid-cols-2 gap-4 text-sm">
<div>
2025-10-04 10:41:35 -04:00
<span class="text-base-content opacity-60">Family:</span>
<span class="ml-2 font-semibold text-base-content"><%= @invitation.family.name %></span>
2025-09-30 12:43:26 -04:00
</div>
<div>
2025-10-04 10:41:35 -04:00
<span class="text-base-content opacity-60">Invited by:</span>
<span class="ml-2 font-semibold text-base-content"><%= @invitation.invited_by.email %></span>
2025-09-30 12:43:26 -04:00
</div>
<div>
2025-10-04 10:41:35 -04:00
<span class="text-base-content opacity-60">Your email:</span>
<span class="ml-2 font-semibold text-base-content"><%= @invitation.email %></span>
2025-09-30 12:43:26 -04:00
</div>
<div>
2025-10-04 10:41:35 -04:00
<span class="text-base-content opacity-60">Expires:</span>
<span class="ml-2 font-semibold text-base-content"><%= @invitation.expires_at.strftime('%b %d, %Y') %></span>
2025-09-30 12:43:26 -04:00
</div>
</div>
2025-09-27 08:04:10 -04:00
</div>
<!-- Action Buttons -->
<div class="space-y-4">
<% if user_signed_in? %>
<!-- User is logged in, show accept button -->
2025-10-07 12:38:06 -04:00
<%= link_to accept_family_invitation_path(token: @invitation.token),
2025-09-27 08:04:10 -04:00
method: :post,
2025-10-04 10:41:35 -04:00
class: "btn btn-success btn-lg w-full text-lg shadow-lg" do %>
2025-09-30 12:43:26 -04:00
✓ Accept Invitation & Join Family
2025-09-27 08:04:10 -04:00
<% end %>
2025-10-04 10:41:35 -04:00
<p class="text-sm text-base-content opacity-60 text-center">
2025-09-30 12:43:26 -04:00
Logged in as <%= current_user.email %>
·
2025-10-04 10:41:35 -04:00
<%= link_to destroy_user_session_path, method: :delete, class: "link link-info" do %>
2025-09-30 12:43:26 -04:00
Logout
2025-09-27 08:04:10 -04:00
<% end %>
</p>
<% else %>
2025-09-30 12:43:26 -04:00
<!-- User is not logged in, show register button prominently -->
<%= link_to new_user_registration_path(invitation_token: @invitation.token),
2025-10-04 10:41:35 -04:00
class: "btn btn-primary btn-lg w-full text-lg shadow-lg" do %>
2025-09-30 12:43:26 -04:00
Create Account & Join Family →
<% end %>
2025-09-27 08:04:10 -04:00
2025-09-30 12:43:26 -04:00
<div class="text-center">
2025-10-04 12:26:41 -04:00
<p class="text-sm text-gray-300 mb-2">
2025-09-30 12:43:26 -04:00
Already have an account?
</p>
<%= link_to new_user_session_path(invitation_token: @invitation.token),
2025-10-04 10:41:35 -04:00
class: "link link-info font-medium" do %>
2025-09-30 12:43:26 -04:00
Sign in to accept invitation
2025-09-27 08:04:10 -04:00
<% end %>
</div>
<% end %>
<!-- Decline Option -->
2025-10-04 10:41:35 -04:00
<div class="pt-6 border-t border-base-300 text-center">
<p class="text-sm text-base-content opacity-60">
2025-09-30 12:43:26 -04:00
Not interested? You can simply close this page.
2025-09-27 08:04:10 -04:00
</p>
</div>
</div>
</div>
</div>
2025-09-30 12:43:26 -04:00
</div>