mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-27 07:56:48 +09:00
Only room pages posted the subscription again, so a browser that changed its password and closed the profile page went without notifications until it next opened a room. A small controller in the layout does it now, still once per session, and the bell is back to how it was. Two tabs posting at once after a password change could both miss the row and insert two, so the endpoint is looked up again under the same write lock as the session check.
75 lines
2.8 KiB
ERB
75 lines
2.8 KiB
ERB
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%= page_title_tag %>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, interactive-widget=resizes-content">
|
|
<meta name="view-transition" content="same-origin">
|
|
<meta name="color-scheme" content="light dark">
|
|
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
|
<meta name="theme-color" content="#000000" media="(prefers-color-scheme: dark)">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<%= csp_meta_tag %>
|
|
<%= current_user_meta_tags %>
|
|
<%= script_aware_action_cable_meta_tag %>
|
|
|
|
<%= tag.meta name: "vapid-public-key", content: Rails.configuration.x.vapid.public_key %>
|
|
<%= tag.meta name: "turbo-prefetch", content: "true" %>
|
|
|
|
<%= tag.link rel: "manifest", href: webmanifest_path(format: :json) %>
|
|
<%= tag.link rel: "icon", href: fresh_account_logo_path, type: "image/png" %>
|
|
<%= tag.link rel: "apple-touch-icon", href: fresh_account_logo_path %>
|
|
|
|
<%= stylesheet_link_tag :all, "data-turbo-track": "reload" %>
|
|
<%= custom_styles_tag %>
|
|
|
|
<%= javascript_importmap_tags %>
|
|
|
|
<%= yield :head %>
|
|
</head>
|
|
|
|
<body class="<%= body_classes %>" data-controller="local-time lightbox">
|
|
<a href="#main-content" class="skip-navigation btn">Skip to main content</a>
|
|
|
|
<nav id="nav">
|
|
<%= yield :nav %>
|
|
</nav>
|
|
|
|
<% if notice = flash[:notice] || flash[:alert] %>
|
|
<div class="flash" data-controller="element-removal" data-action="animationend->element-removal#remove">
|
|
<div class="flash__inner shadow" style="<%= "--flash-background: var(--color-negative)" if flash[:alert] %>">
|
|
<% if flash[:alert] %>
|
|
<%= image_tag "alert.svg", aria: { hidden: true }, size: 24, class: "colorize--white" %>
|
|
<% else %>
|
|
<%= image_tag "check.svg", aria: { hidden: true }, size: 24, class: "colorize--white" %>
|
|
<% end %>
|
|
</div>
|
|
<span class="for-screen-reader" role="alert" aria-atomic="true"><%= notice %></span>
|
|
</div>
|
|
<% end %>
|
|
|
|
<main id="main-content">
|
|
<%= yield %>
|
|
|
|
<footer id="footer">
|
|
<%= yield :footer %>
|
|
</footer>
|
|
</main>
|
|
|
|
<aside id="sidebar" data-controller="toggle-class" data-toggle-class-toggle-class="open">
|
|
<%= yield :sidebar %>
|
|
</aside>
|
|
|
|
<%= render "layouts/lightbox" %>
|
|
|
|
<% if Current.session %>
|
|
<%= tag.div hidden: true, data: { controller: "push-subscription-sync",
|
|
push_subscription_sync_url_value: user_push_subscriptions_path, push_subscription_sync_session_value: push_subscription_session_marker } %>
|
|
<% end %>
|
|
|
|
<a href="https://once.com" id="app-logo" target="_blank" aria-label="Once software from 37signals home page">
|
|
<%= image_tag "campfire-icon.png", alt: "Campfire logo", width: 256, height: 216 %>
|
|
</a>
|
|
</body>
|
|
</html>
|