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 2021/10/16 12:42:48 UTC

[whimsy] branch master updated: Use Date from email instead of local time

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 289f824  Use Date from email instead of local time
289f824 is described below

commit 289f824368e7f7ad6912650e17ff6231084ee78e
Author: Sebb <se...@apache.org>
AuthorDate: Sat Oct 16 13:41:44 2021 +0100

    Use Date from email instead of local time
---
 www/secretary/workbench/models/mailbox.rb | 1 +
 www/secretary/workbench/views/index.js.rb | 8 +++-----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/www/secretary/workbench/models/mailbox.rb b/www/secretary/workbench/models/mailbox.rb
index 86d6cc7..21bb720 100644
--- a/www/secretary/workbench/models/mailbox.rb
+++ b/www/secretary/workbench/models/mailbox.rb
@@ -178,6 +178,7 @@ class Mailbox
         time: message[:time] || '',
         href: "#{message[:source]}/#{id}/",
         from: (message[:name] || message[:from]).to_s.fix_encoding,
+        date: message['Date'] || '',
         subject: message['Subject'],
         status: message[:status]
       }
diff --git a/www/secretary/workbench/views/index.js.rb b/www/secretary/workbench/views/index.js.rb
index 153eb54..68c507d 100644
--- a/www/secretary/workbench/views/index.js.rb
+++ b/www/secretary/workbench/views/index.js.rb
@@ -23,7 +23,7 @@ class Index < Vue
       _table.table do
         _thead do
           _tr do
-            _th 'Timestamp'
+            _th 'Date'
             _th 'From'
             _th 'Subject'
           end
@@ -38,8 +38,6 @@ class Index < Vue
             color = 'hidden' if message.status == :deleted
             color = 'selected' if message.href == @selected
 
-            time = Date.new(Date.parse(message.time)).toLocaleString()
-
             row_options = {
               :class => color,
               on: {click: self.selectRow, doubleClick: self.nav}
@@ -48,9 +46,9 @@ class Index < Vue
             _tr row_options do
               _td do
                 if[:emeritusReady, :emeritusPending].include? message.status
-                  _a time, href: message.href, title: message.time, target: "_blank"
+                  _a message.date, href: message.href, title: message.time, target: "_blank"
                 else
-                  _a time, href: message.href, title: message.time
+                  _a message.date, href: message.href, title: message.time
                 end
               end
               _td message.from