bible270 1.18.0 → 1.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1932d8cdbae32aa00b8a05785ca6c680b403fa3be0be733752e9a6a2af1f99f6
4
- data.tar.gz: ddb45896f1678fff0b941444a7a321b3769952160e8bfc5e4cc6929019d8b8d0
3
+ metadata.gz: e05722a707b9ded33b258dbc2636df5f1bbf93b782649f84ff8fc6efa7b2d6a3
4
+ data.tar.gz: f53179ed25244dd464fe5815426543e0f32efa9ab7835713c4d99d382b17f03f
5
5
  SHA512:
6
- metadata.gz: b9b08e64471767bab9832574dbbdfc6c44f9fa23989fdc4cc99c2ca84c64cfdd939bd1ad1d3d95446cbe8b11e8121738306c5eac27e2ffab9fbea073d99967e9
7
- data.tar.gz: 5b4412c468de22d275f2274056f381ec980785273177dc1333e7a5eaba30b853a04ded9598e6ad557e42b4106a4883e7c18775ecc97326c693de9aa7b85a3dd2
6
+ metadata.gz: e8aab969ee632687d27b77e410448b1c41ad97b22ea79d2412e545f98d2fff39b70d01747317c15c11c0a19596ef9ba4d10edc2004841a77a2ebfc43999e1bd2
7
+ data.tar.gz: 83cf6dd7f75f5d0ac3bc22260f0db6166081e3321544f80f53f00bf01ee9101782ad8ad83fc96e9cbc2f31928e749f25c0f392ff58484a4b2b04acffda5e665f
data/CHANGELOG.md CHANGED
@@ -11,6 +11,14 @@ Notable changes, following [Keep a Changelog](https://keepachangelog.com/en/1.1.
11
11
 
12
12
  **Setup:** Install migration `20260101000028` on each instance, configure trusted connections, and schedule delivery on the primary. Progress sync is off until configured.
13
13
 
14
+ ### Changed
15
+
16
+ - collapse Progress sync, Their reflections, and Completions on Admin reader pages; keep the completion summary visible
17
+
18
+ ### Fixed
19
+
20
+ - display the last sync time in the system time zone instead of UTC
21
+
14
22
  ## [1.17.2] - 2026-11-13
15
23
 
16
24
  ### Added
data/README.md CHANGED
@@ -264,6 +264,8 @@ The `admin_resolver` callback takes precedence over `admin_emails`.
264
264
 
265
265
  Authorized readers get an **Admin** link. **View as non-admin** hides admin details and disables all administration for this session, including role and membership changes. You remain signed in; reflections and active check-offs still work. Use **Return to admin view** in the Admin tab or sign in again to restore access. Roles and other sessions are unchanged.
266
266
 
267
+ Reader pages start with **Progress sync**, **Their reflections**, and **Completions** collapsed. Completion counts, percentage, and schedule status remain visible.
268
+
267
269
  The panel supports:
268
270
 
269
271
  - Sort active readers by name, completed days, activity, or consistency; **Reader Stats** follows the same sort.
@@ -321,22 +323,26 @@ On the **primary**:
321
323
 
322
324
  ```ruby
323
325
  config.progress_sync_instance_id = 'primary'
324
- config.progress_sync_destinations = {
325
- 'church' => {
326
- label: 'Church', url: 'https://church.example/daily-bread',
327
- secret: ENV.fetch('B270_PRIMARY_CHURCH_SYNC_SECRET')
326
+ if (sync_secret = ENV['B270_PRIMARY_CHURCH_SYNC_SECRET'])
327
+ config.progress_sync_destinations = {
328
+ 'church' => {
329
+ label: 'Church', url: 'https://church.example/daily-bread',
330
+ secret: sync_secret
331
+ }
328
332
  }
329
- }
333
+ end
330
334
  ```
331
335
 
332
336
  On the **destination**:
333
337
 
334
338
  ```ruby
335
- config.progress_sync_sources = {
336
- 'primary' => { secret: ENV.fetch('B270_PRIMARY_CHURCH_SYNC_SECRET') }
337
- }
339
+ if (sync_secret = ENV['B270_PRIMARY_CHURCH_SYNC_SECRET'])
340
+ config.progress_sync_sources = { 'primary' => { secret: sync_secret } }
341
+ end
338
342
  ```
339
343
 
344
+ Supply the secret at container runtime, not during image builds. Without it, sync stays disabled.
345
+
340
346
  Use the same randomly generated secret on both sides, at least 32 characters; `bin/rails secret` can generate one. Use a separate secret for each destination. URLs must be canonical HTTPS engine mount URLs, without redirects. Trust authorizes the primary's admins to link accounts by email; grant it only to installations you control or trust.
341
347
 
342
348
  Schedule this command **every minute on the primary**, using the host's scheduler:
@@ -7,8 +7,12 @@
7
7
  .where(bible270_participations: { reader_id: @reader.id }).includes(:participation).order(created_at: :desc, id: :desc).to_a : []
8
8
  %>
9
9
  <% if destinations.any? || links.any? %>
10
- <section class="b270-panel b270-progress-sync" id="b270-progress-sync" aria-labelledby="b270-progress-sync-heading">
11
- <h2 class="b270-subhead" id="b270-progress-sync-heading">Progress sync</h2>
10
+ <details class="b270-panel b270-admin-section" id="b270-progress-sync-panel">
11
+ <summary id="b270-progress-sync-heading">
12
+ <span class="b270-disclosure-show">Show Progress sync</span>
13
+ <span class="b270-disclosure-hide">Hide Progress sync</span>
14
+ </summary>
15
+ <section class="b270-progress-sync b270-admin-section-content" id="b270-progress-sync" aria-labelledby="b270-progress-sync-heading">
12
16
  <p class="b270-hint">New check-offs sync one way to an account with the same email.</p>
13
17
  <% unless schema_available %>
14
18
  <p class="b270-flash alert">Progress sync needs a site update. Contact the site administrator.</p>
@@ -62,7 +66,7 @@
62
66
  <p><strong><%= label %></strong> · <%= link.remote_name %> · <%= link.status %></p>
63
67
  <p class="b270-hint">
64
68
  Run <%= link.participation.plan_run_id %> ·
65
- Last synced: <%= link.last_synced_at ? link.last_synced_at.strftime('%b %-d, %Y %H:%M %Z') : 'Never' %> ·
69
+ Last synced: <%= link.last_synced_at ? b270_datetime(link.last_synced_at) : 'Never' %> ·
66
70
  Pending: <%= link.pending_count %>
67
71
  <% unless link.last_added.nil? || link.last_existing.nil? %>
68
72
  · <%= link.last_added %> added; <%= link.last_existing %> already present
@@ -88,5 +92,6 @@
88
92
  </ul>
89
93
  <% end %>
90
94
  <% end %>
91
- </section>
95
+ </section>
96
+ </details>
92
97
  <% end %>
@@ -0,0 +1,4 @@
1
+ <%# locals: (reader:, days_completed:, percentage: false) %>
2
+ <%= days_completed %>/<%= Bible270::Plan::DAYS %> days
3
+ <% if percentage %>· <%= (days_completed.to_f / Bible270::Plan::DAYS * 100).round %>%<% end %>
4
+ · <%= reader.progress_status(completed_days: days_completed) %>
@@ -19,8 +19,7 @@
19
19
  <%= reader.provider %>
20
20
  <% end %>
21
21
  <% if reader.dated? %>· started <%= reader.effective_start_date.strftime('%b %-d, %Y') %><% end %>
22
- · <%= days_completed[reader.id] %>/<%= Bible270::Plan::DAYS %> days
23
- · <%= report.status_for(reader) %>
22
+ · <%= render 'bible270/admin/reader_completion_summary', reader: reader, days_completed: days_completed[reader.id] %>
24
23
  </div>
25
24
  <% consistency = report.consistency_for(reader) %>
26
25
  <div class="sub b270-reader-consistency">
@@ -201,14 +201,29 @@
201
201
 
202
202
  <%= render 'progress_sync' %>
203
203
 
204
- <div class="b270-panel">
205
- <%= render "bible270/shared/interaction_status" %>
206
- <%= render "bible270/shared/reflections", comments: @comments, moderate: true, editable: true, actions: true %>
207
- </div>
204
+ <%= render "bible270/shared/interaction_status" %>
205
+ <details class="b270-panel b270-admin-section" id="b270-reader-reflections">
206
+ <summary>
207
+ <span class="b270-disclosure-show">Show Their reflections</span>
208
+ <span class="b270-disclosure-hide">Hide Their reflections</span>
209
+ </summary>
210
+ <div class="b270-admin-section-content">
211
+ <%= render "bible270/shared/reflections", comments: @comments, title: nil, moderate: true, editable: true, actions: true %>
212
+ </div>
213
+ </details>
208
214
 
209
215
 
210
- <div class="b270-panel">
211
- <h2 class="b270-subhead">Completions</h2>
216
+ <details class="b270-panel b270-admin-section" id="b270-reader-completions">
217
+ <summary>
218
+ <span class="b270-disclosure-label">
219
+ <span class="b270-disclosure-show">Show Completions</span>
220
+ <span class="b270-disclosure-hide">Hide Completions</span>
221
+ </span>
222
+ <span class="b270-completions-summary">
223
+ <%= render 'reader_completion_summary', reader: @reader, days_completed: @days_completed, percentage: true %>
224
+ </span>
225
+ </summary>
226
+ <div class="b270-admin-section-content">
212
227
  <% unless @reader.alumni? %>
213
228
  <%= form_with url: admin_reader_through_path(@reader), method: :patch, class: "b270-startform" do %>
214
229
  <%= hidden_field_tag :participation_id, @reader.participation.id %>
@@ -234,7 +249,8 @@
234
249
  <% end %>
235
250
  </div>
236
251
  <p class="b270-hint"><%= @reader.alumni? ? 'Archived completions are read-only.' : 'Click a day to toggle it complete.' %></p>
237
- </div>
252
+ </div>
253
+ </details>
238
254
 
239
255
  <% if @past_participations.any? %>
240
256
  <div class="b270-panel" id="b270-run-history">
@@ -779,6 +779,17 @@
779
779
  .b270-footer p{margin:0;line-height:1.5}
780
780
  details.b270-index>summary{cursor:pointer;font-family:"Spectral",serif;font-size:18px;font-weight:600;list-style:none;margin-top:30px}
781
781
  details.b270-index>summary::-webkit-details-marker{display:none}
782
+ details.b270-admin-section>summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;cursor:pointer;
783
+ list-style:none;font-family:"Spectral",serif;font-size:18px;font-weight:600}
784
+ details.b270-admin-section>summary::-webkit-details-marker{display:none}
785
+ details.b270-admin-section>summary:focus-visible{outline:2px solid var(--gold);outline-offset:4px;border-radius:4px}
786
+ .b270-admin-section>summary .b270-disclosure-hide{display:none}
787
+ .b270-admin-section[open]>summary .b270-disclosure-show{display:none}
788
+ .b270-admin-section[open]>summary .b270-disclosure-hide{display:inline}
789
+ .b270-admin-section:not([open])>:not(summary){display:none}
790
+ .b270-admin-section-content{margin-top:12px}
791
+ .b270-disclosure-label{flex:none}
792
+ .b270-completions-summary{min-width:0;font-family:system-ui,sans-serif;font-size:12.5px;font-weight:400;color:var(--muted)}
782
793
  details.b270-active-readers{margin-bottom:24px}
783
794
  details.b270-active-readers>summary{margin:0 0 12px}
784
795
  details.b270-active-readers .b270-active-readers-hide{display:none}
@@ -92,6 +92,16 @@
92
92
  but it shall accomplish that which I purpose,
93
93
  and shall succeed in the thing for which I sent it.
94
94
  attribution: ESV © 2001 Crossway.
95
+ - id: isaiah-66-2
96
+ reference: Isaiah 66:2
97
+ translation: ESV
98
+ text: |-
99
+ All these things my hand has made,
100
+ and so all these things came to be, declares the LORD.
101
+ But this is the one to whom I will look:
102
+ he who is humble and contrite in spirit
103
+ and trembles at my word.
104
+ attribution: ESV © 2001 Crossway.
95
105
  - id: jeremiah-15-16
96
106
  reference: Jeremiah 15:16
97
107
  translation: NASB95
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bible270
4
- VERSION = '1.18.0'
4
+ VERSION = '1.18.1'
5
5
  end
@@ -54,12 +54,16 @@ Bible270.configure do |config|
54
54
  # --- Progress sync (optional) ---------------------------------------------
55
55
  # Admin-managed one-way check-offs between trusted installations. See README.
56
56
  # config.progress_sync_instance_id = 'primary'
57
- # config.progress_sync_destinations = {
58
- # 'church' => { label: 'Church', url: 'https://church.example/daily-bread',
59
- # secret: ENV.fetch('B270_PRIMARY_CHURCH_SYNC_SECRET') }
60
- # }
57
+ # Credentials are runtime-only; leave sync disabled during image builds.
58
+ # if (sync_secret = ENV['B270_PRIMARY_CHURCH_SYNC_SECRET'])
59
+ # config.progress_sync_destinations = {
60
+ # 'church' => { label: 'Church', url: 'https://church.example/daily-bread', secret: sync_secret }
61
+ # }
62
+ # end
61
63
  # On the receiving installation, authorize that source with the same secret:
62
- # config.progress_sync_sources = { 'primary' => { secret: ENV.fetch('B270_PRIMARY_CHURCH_SYNC_SECRET') } }
64
+ # if (sync_secret = ENV['B270_PRIMARY_CHURCH_SYNC_SECRET'])
65
+ # config.progress_sync_sources = { 'primary' => { secret: sync_secret } }
66
+ # end
63
67
  # Schedule bible270:progress_sync:deliver every minute on the primary.
64
68
  # config.progress_sync_deliver_later = true # optional: persistent Active Job backend + worker
65
69
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bible270
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew vonderLuft
@@ -176,6 +176,7 @@ files:
176
176
  - app/models/bible270/setting.rb
177
177
  - app/models/bible270/sign_in_token.rb
178
178
  - app/views/bible270/admin/_progress_sync.html.erb
179
+ - app/views/bible270/admin/_reader_completion_summary.html.erb
179
180
  - app/views/bible270/admin/_reader_list.html.erb
180
181
  - app/views/bible270/admin/_scripture_frames.html.erb
181
182
  - app/views/bible270/admin/_scripture_text.html.erb