From 0fc2ea4af0ce63910b7cc0f08408e3f583f5fe1e Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Thu, 26 Feb 2026 17:15:02 +0100 Subject: [PATCH 1/8] Use public layout --- saas/app/controllers/devices_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/saas/app/controllers/devices_controller.rb b/saas/app/controllers/devices_controller.rb index e6b6b1d19..66977bf1a 100644 --- a/saas/app/controllers/devices_controller.rb +++ b/saas/app/controllers/devices_controller.rb @@ -2,6 +2,8 @@ class DevicesController < ApplicationController disallow_account_scope before_action :set_device, only: :destroy + layout "public" + def index @devices = Current.identity.devices.order(created_at: :desc) end From 6c9668d870d330c14c0ff1f019ed7710aa53a5cf Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Thu, 26 Feb 2026 17:15:32 +0100 Subject: [PATCH 2/8] Style device list and empty state --- saas/app/views/devices/index.html.erb | 44 ++++++++++++++++++--------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/saas/app/views/devices/index.html.erb b/saas/app/views/devices/index.html.erb index 9e467731a..b9a3bfb35 100644 --- a/saas/app/views/devices/index.html.erb +++ b/saas/app/views/devices/index.html.erb @@ -1,16 +1,30 @@ -

Registered Devices

+<% @page_title = "Registered devices" %> -<% if @devices.any? %> - -<% else %> -

No devices registered. Install the mobile app to receive push notifications.

-<% end %> +
+ <% if @devices.any? %> +

+ Registered devices +

+
    + <% @devices.each do |device| %> +
  • +
    + + <%= device.name || "Unnamed device" %> + (<%= device.platform == "apple" ? "iOS" : "Android" %>) + + <%= tag.time "Added #{time_ago_in_words(device.created_at)} ago", datetime: device.created_at.to_i, class: "txt-subtle txt-x-small" %> +
    + <%= button_to "Remove", saas.device_path(device), method: :delete, class: "btn txt-small", data: { confirm: "Remove this device?" }, form: { class: "flex-item-no-shrink" } %> +
  • + <% end %> +
+ <% else %> +

No devices registered

+

Install the mobile app to receive push notifications.

+ <% end %> + + <%= link_to session_menu_path, class: "btn center txt-small margin-block-start hide-on-native", data: { turbo_prefetch: false } do %> + Your Fizzy accounts + <% end %> +
From 21b12fe16a580c1c2acb69fb74eca0bd00e4c9cd Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Thu, 26 Feb 2026 17:22:20 +0100 Subject: [PATCH 3/8] Add platform attribute and bridge controllers to public layout --- app/views/layouts/public.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/public.html.erb b/app/views/layouts/public.html.erb index e728cc8d4..9f34c1706 100644 --- a/app/views/layouts/public.html.erb +++ b/app/views/layouts/public.html.erb @@ -2,7 +2,7 @@ <%= render "layouts/shared/head" %> - +
<%= button_to saas.device_path(device), method: :delete, class: "btn btn--circle-mobile txt-small", data: { confirm: "Remove this device?" }, form: { class: "flex-item-no-shrink" } do %> <%= icon_tag "trash", class: "icon--mobile-only" %>