diff --git a/app/views/admin/users/edit.html.erb b/app/views/admin/users/edit.html.erb index 83cafc5..e714542 100644 --- a/app/views/admin/users/edit.html.erb +++ b/app/views/admin/users/edit.html.erb @@ -1,67 +1,67 @@ -
+
- <%= link_to "← Back to User", admin_user_path(@user), class: "text-indigo-600 hover:text-indigo-900" %> + <%= link_to "← Back to User", admin_user_path(@user), class: DesignSystemHelper::LINK_SUBTLE %>
- -
-
-

Edit User

- + +
+
+

Edit User

+ <%= form_with model: @user, url: admin_user_path(@user), method: :patch do |form| %>
- <%= form.label :email, class: "block text-sm font-medium text-gray-700" %> - <%= form.email_field :email, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" %> + <%= form.label :email, class: DesignSystemHelper::FORM_LABEL %> + <%= form.email_field :email, class: DesignSystemHelper::FORM_INPUT %>
- +
- <%= form.check_box :admin, class: "h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" %> - <%= form.label :admin, "Administrator", class: "ml-2 text-sm font-medium text-gray-700" %> + <%= form.check_box :admin, class: "h-4 w-4 text-accent-500 focus:ring-accent-500 border-primary-600 rounded" %> + <%= form.label :admin, "Administrator", class: "ml-2 #{DesignSystemHelper::TEXT_BODY_SM} #{DesignSystemHelper::TEXT_SECONDARY}" %>
- +
- <%= form.submit "Update User", class: "bg-indigo-600 text-white px-4 py-2 rounded-md font-semibold hover:bg-indigo-700" %> + <%= form.submit "Update User", class: btn_accent(:sm) %>
<% end %>
- -
-
-

Manage Subscription

- + +
+
+

Manage Subscription

+ <% if @user.subscription %> -
-

- Current plan: <%= @user.subscription.plan.name %> +

+

+ Current plan: <%= @user.subscription.plan.name %> (<%= @user.subscription.status.humanize %>)

<% if @user.subscription.trial_ends_at %> -

+

Trial ends: <%= @user.subscription.trial_ends_at.strftime("%B %d, %Y") %>

<% end %>
<% else %> -
-

User has no active subscription

+
+

User has no active subscription

<% end %> - + <%= form_with url: update_subscription_admin_user_path(@user), method: :patch do |form| %>
- <%= form.label :plan_id, "Plan", class: "block text-sm font-medium text-gray-700" %> - <%= form.select :plan_id, + <%= form.label :plan_id, "Plan", class: DesignSystemHelper::FORM_LABEL %> + <%= form.select :plan_id, options_from_collection_for_select(@plans, :id, :name, @user.subscription&.plan_id), { prompt: "Select a plan" }, - class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" %> + class: DesignSystemHelper::FORM_INPUT %>
- +
- <%= form.label :status, "Status", class: "block text-sm font-medium text-gray-700" %> - <%= form.select :status, + <%= form.label :status, "Status", class: DesignSystemHelper::FORM_LABEL %> + <%= form.select :status, options_for_select([ ["Trialing", "trialing"], ["Active", "active"], @@ -70,19 +70,19 @@ ["Unpaid", "unpaid"] ], @user.subscription&.status), { prompt: "Select status" }, - class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" %> + class: DesignSystemHelper::FORM_INPUT %>
- +
- <%= form.label :trial_ends_at, "Trial End Date (optional)", class: "block text-sm font-medium text-gray-700" %> - <%= form.datetime_field :trial_ends_at, + <%= form.label :trial_ends_at, "Trial End Date (optional)", class: DesignSystemHelper::FORM_LABEL %> + <%= form.datetime_field :trial_ends_at, value: @user.subscription&.trial_ends_at, - class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" %> -

Leave blank to keep current trial end date

+ class: DesignSystemHelper::FORM_INPUT %> +

Leave blank to keep current trial end date

- +
- <%= form.submit "Update Subscription", class: "bg-green-600 text-white px-4 py-2 rounded-md font-semibold hover:bg-green-700" %> + <%= form.submit "Update Subscription", class: btn_primary(:sm) %>
<% end %> diff --git a/app/views/admin/users/show.html.erb b/app/views/admin/users/show.html.erb index b95f416..ff2be26 100644 --- a/app/views/admin/users/show.html.erb +++ b/app/views/admin/users/show.html.erb @@ -1,46 +1,42 @@ -
+
- <%= link_to "← Back to Users", admin_users_path, class: "text-indigo-600 hover:text-indigo-900" %> + <%= link_to "← Back to Users", admin_users_path, class: DesignSystemHelper::LINK_SUBTLE %>
- -
-
-

+ +
+
+

User Information

-

+

Personal details and subscription information

-
+
-
-
Email
-
<%= @user.email %>
+
+
Email
+
<%= @user.email %>
-
-
Admin
-
+
+
Admin
+
<% if @user.admin? %> - - Yes - + Yes <% else %> - - No - + No <% end %>
-
-
Created
-
+
+
Created
+
<%= @user.created_at.strftime("%B %d, %Y at %l:%M %p") %>
-
-
Stripe Customer ID
-
+
+
Stripe Customer ID
+
<%= @user.stripe_customer_id || "Not created" %>
@@ -49,50 +45,44 @@
<% if @user.subscription %> -
-
-

+
+
+

Subscription Details

-
+
-
-
Plan
-
+
+
Plan
+
<%= @user.subscription.plan.name %>
-
-
Status
-
+
+
Status
+
<% if @user.subscription.trialing? %> - - Trial (<%= @user.subscription.days_remaining_in_trial %> days left) - + Trial (<%= @user.subscription.days_remaining_in_trial %> days left) <% elsif @user.subscription.active? %> - - Active - + Active <% else %> - - <%= @user.subscription.status.humanize %> - + <%= @user.subscription.status.humanize %> <% end %>
<% if @user.subscription.trial_ends_at %> -
-
Trial Ends
-
+
+
Trial Ends
+
<%= @user.subscription.trial_ends_at.strftime("%B %d, %Y at %l:%M %p") %>
<% end %> <% if @user.subscription.current_period_end %> -
-
Current Period End
-
+
+
Current Period End
+
<%= @user.subscription.current_period_end.strftime("%B %d, %Y") %>
@@ -101,13 +91,12 @@
<% else %> -
-

This user does not have a subscription.

+
+

This user does not have a subscription.

<% end %> - +
- <%= link_to "Edit User", edit_admin_user_path(@user), - class: "bg-indigo-600 text-white px-4 py-2 rounded-md font-semibold hover:bg-indigo-700" %> + <%= link_to "Edit User", edit_admin_user_path(@user), class: btn_secondary(:sm) %>
\ No newline at end of file diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index adcdbd0..3abde2a 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,67 +1,68 @@ -
-
+
+
-

Edit Account

-

Update your account information

+

Edit Account

+

Update your account information

-
- <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }, class: "space-y-6") do |f| %> +
+
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }, class: "space-y-6") do |f| %> <%= render "devise/shared/error_messages", resource: resource %>
- <%= f.label :email, "Email address", class: "block text-sm font-medium text-gray-700 mb-2" %> - <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "w-full px-3 py-3 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" %> + <%= f.label :email, "Email address", class: DesignSystemHelper::FORM_LABEL %> + <%= f.email_field :email, autofocus: true, autocomplete: "email", class: DesignSystemHelper::FORM_INPUT %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> -
-

Currently waiting confirmation for: <%= resource.unconfirmed_email %>

+
+

Currently waiting confirmation for: <%= resource.unconfirmed_email %>

<% end %>
- <%= f.label :password, class: "block text-sm font-medium text-gray-700 mb-2" do %> + <%= f.label :password, class: DesignSystemHelper::FORM_LABEL do %> New Password - (leave blank if you don't want to change it) + (leave blank if you don't want to change it) <% end %> - <%= f.password_field :password, autocomplete: "new-password", placeholder: "Enter new password", class: "w-full px-3 py-3 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" %> + <%= f.password_field :password, autocomplete: "new-password", placeholder: "Enter new password", class: DesignSystemHelper::FORM_INPUT %> <% if @minimum_password_length %> -

<%= @minimum_password_length %> characters minimum

+

<%= @minimum_password_length %> characters minimum

<% end %>
- <%= f.label :password_confirmation, "Confirm new password", class: "block text-sm font-medium text-gray-700 mb-2" %> - <%= f.password_field :password_confirmation, autocomplete: "new-password", placeholder: "Confirm new password", class: "w-full px-3 py-3 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" %> + <%= f.label :password_confirmation, "Confirm new password", class: DesignSystemHelper::FORM_LABEL %> + <%= f.password_field :password_confirmation, autocomplete: "new-password", placeholder: "Confirm new password", class: DesignSystemHelper::FORM_INPUT %>
- <%= f.label :current_password, class: "block text-sm font-medium text-gray-700 mb-2" do %> + <%= f.label :current_password, class: DesignSystemHelper::FORM_LABEL do %> Current Password - (we need your current password to confirm changes) + (we need your current password to confirm changes) <% end %> - <%= f.password_field :current_password, autocomplete: "current-password", placeholder: "Enter current password", class: "w-full px-3 py-3 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" %> + <%= f.password_field :current_password, autocomplete: "current-password", placeholder: "Enter current password", class: DesignSystemHelper::FORM_INPUT %>
- <%= f.submit "Update Account", class: "w-full bg-blue-600 text-white font-bold py-3 px-4 rounded-lg hover:bg-blue-700 transition duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2" %> + <%= f.submit "Update Account", class: btn_accent(:lg) + " w-full" %>
<% end %> -
-

Danger Zone

-
-

Once you delete your account, there is no going back. Please be certain.

- <%= button_to "Delete Account", registration_path(resource_name), - data: { confirm: "Are you sure? This action cannot be undone.", turbo_confirm: "Are you sure? This action cannot be undone." }, - method: :delete, - class: "bg-red-600 text-white font-medium py-2 px-4 rounded-lg hover:bg-red-700 transition duration-300 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2" %> +
+

Danger Zone

+
+

Once you delete your account, there is no going back. Please be certain.

+ <%= button_to "Delete Account", registration_path(resource_name), + data: { confirm: "Are you sure? This action cannot be undone.", turbo_confirm: "Are you sure? This action cannot be undone." }, + method: :delete, + class: btn_danger(:sm) %>
- +
- <%= link_to "← Back", :back, class: "text-sm font-medium text-gray-600 hover:text-gray-500" %> + <%= link_to "← Back", :back, class: DesignSystemHelper::LINK_SUBTLE %>
diff --git a/app/views/pricing/index.html.erb b/app/views/pricing/index.html.erb index 8197285..17e199a 100644 --- a/app/views/pricing/index.html.erb +++ b/app/views/pricing/index.html.erb @@ -145,30 +145,30 @@ -
-
+
+
-

+

Trusted by teams worldwide

- +
-
99.9%
-
Uptime guarantee
+
99.9%
+
Uptime guarantee
-
24/7
-
Customer support
+
24/7
+
Customer support
-
256-bit
-
SSL encryption
+
256-bit
+
SSL encryption
-
GDPR
-
Compliant
+
GDPR
+
Compliant