You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2022/04/20 11:26:25 UTC
[whimsy] branch master updated: Show secmail status on index screen
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 607f74ae Show secmail status on index screen
607f74ae is described below
commit 607f74ae7d9af62180f81330a379cea9e77f9b22
Author: Sebb <se...@apache.org>
AuthorDate: Wed Apr 20 12:26:16 2022 +0100
Show secmail status on index screen
---
www/secretary/workbench/models/mailbox.rb | 7 ++++++-
www/secretary/workbench/views/index.js.rb | 10 +++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/www/secretary/workbench/models/mailbox.rb b/www/secretary/workbench/models/mailbox.rb
index 21bb7200..801f19f8 100644
--- a/www/secretary/workbench/models/mailbox.rb
+++ b/www/secretary/workbench/models/mailbox.rb
@@ -174,7 +174,7 @@ class Mailbox
# extract relevant fields from the headers
headers.map! do |id, message|
- {
+ entry = {
time: message[:time] || '',
href: "#{message[:source]}/#{id}/",
from: (message[:name] || message[:from]).to_s.fix_encoding,
@@ -182,6 +182,11 @@ class Mailbox
subject: message['Subject'],
status: message[:status]
}
+ if message[:secmail]
+ status = message[:secmail][:status]
+ entry[:secmail_status] = status if status
+ end
+ entry
end
# return messages sorted in reverse chronological order
diff --git a/www/secretary/workbench/views/index.js.rb b/www/secretary/workbench/views/index.js.rb
index ef8bf253..41a61aa1 100644
--- a/www/secretary/workbench/views/index.js.rb
+++ b/www/secretary/workbench/views/index.js.rb
@@ -55,7 +55,15 @@ class Index < Vue
if %i[emeritusReady emeritusPending].include? message.status
_td message.subject, class: message.status
else
- _td message.subject
+ if message.secmail_status
+ _td do
+ _ message.subject
+ _ ' - '
+ _b message.secmail_status
+ end
+ else
+ _td message.subject
+ end
end
end
end