This repository has been archived by the owner on Aug 13, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Email threading, cleanup and inbox (#1304)
- Loading branch information
Eric Berry
authored
May 29, 2020
1 parent
a261f59
commit 12e8686
Showing
39 changed files
with
1,124 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<div class="page<%= " has-sidebar has-sidebar-expand-xl" if sidebar %>"> | ||
<%= content_tag("div", class: classes) do %> | ||
<%= tag.div(class: "sidebar-backdrop") if sidebar %> | ||
<div class="page-inner" data-controller="auto-height"> | ||
<%= header %> | ||
<%= render(tabs) if tabs %> | ||
<%= tag.hr(class: "my-3") if !tabs %> | ||
<%= tag.hr(class: "my-3") if !tabs && header %> | ||
<div class="page-section"><%= body %></div> | ||
<%= render "/#{subject_view_directory}/sidebar", subject: subject if sidebar %> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/javascript/themes/current/stylesheets/components/page.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.page-fixed { | ||
display: flex; | ||
flex-direction: column; | ||
height: 100%; | ||
|
||
.page-fixed-header { | ||
position: relative; | ||
padding: 0.5rem 0.5rem 0.5rem 0.25rem; | ||
display: flex; | ||
align-items: center; | ||
height: 3.5rem; | ||
background-color: #fff; | ||
box-shadow: 0 1px 0 0 rgba(20, 20, 31, 0.075); | ||
z-index: 5; | ||
border-bottom: 1px solid #ecedf1; | ||
} | ||
.page-fixed-body { | ||
padding: 0rem; | ||
flex: 1; | ||
overflow-y: auto; | ||
} | ||
.page-fixed-footer { | ||
position: relative; | ||
padding: 0.5rem; | ||
background-color: #fff; | ||
box-shadow: 0 -1px 0 0 rgba(20, 20, 31, 0.075); | ||
z-index: 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Emails | ||
module Presentable | ||
extend ActiveSupport::Concern | ||
include ActionView::Helpers::DateHelper | ||
|
||
def human_delivered_at | ||
from_time = Time.now | ||
distance_of_time_in_words(from_time, delivered_at, scope: "datetime.distance_in_words.email") # => "2H" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class EmailsReflex < ApplicationReflex | ||
def mark_read | ||
email.mark_read_for_user! current_user | ||
end | ||
|
||
def mark_unread | ||
email.mark_unread_for_user! current_user | ||
end | ||
|
||
def toggle_date_format | ||
session[:email_date_format] = element.dataset["date-format"] == "default" ? "human" : "default" | ||
end | ||
|
||
private | ||
|
||
def email | ||
@email ||= Email.find_by(id: element.dataset["email-id"]) | ||
end | ||
end |
Oops, something went wrong.