summaryrefslogtreecommitdiffstats
path: root/comm/mail/components/im/messages/mail
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mail/components/im/messages/mail')
-rw-r--r--comm/mail/components/im/messages/mail/Footer.html0
-rw-r--r--comm/mail/components/im/messages/mail/Header.html0
-rw-r--r--comm/mail/components/im/messages/mail/Incoming/Content.html1
-rw-r--r--comm/mail/components/im/messages/mail/Incoming/Context.html1
-rw-r--r--comm/mail/components/im/messages/mail/Incoming/NextContent.html1
-rw-r--r--comm/mail/components/im/messages/mail/Incoming/NextContext.html0
-rw-r--r--comm/mail/components/im/messages/mail/Incoming/buddy_icon.svg6
-rw-r--r--comm/mail/components/im/messages/mail/Info.plist30
-rw-r--r--comm/mail/components/im/messages/mail/NextStatus.html1
-rw-r--r--comm/mail/components/im/messages/mail/Outgoing/Content.html0
-rw-r--r--comm/mail/components/im/messages/mail/Outgoing/Context.html0
-rw-r--r--comm/mail/components/im/messages/mail/Outgoing/NextContent.html0
-rw-r--r--comm/mail/components/im/messages/mail/Outgoing/NextContext.html0
-rw-r--r--comm/mail/components/im/messages/mail/Status.html1
-rw-r--r--comm/mail/components/im/messages/mail/Variants/Dark.css49
-rw-r--r--comm/mail/components/im/messages/mail/Variants/Light.css49
-rw-r--r--comm/mail/components/im/messages/mail/inline.js40
-rw-r--r--comm/mail/components/im/messages/mail/main.css155
18 files changed, 334 insertions, 0 deletions
diff --git a/comm/mail/components/im/messages/mail/Footer.html b/comm/mail/components/im/messages/mail/Footer.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Footer.html
diff --git a/comm/mail/components/im/messages/mail/Header.html b/comm/mail/components/im/messages/mail/Header.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Header.html
diff --git a/comm/mail/components/im/messages/mail/Incoming/Content.html b/comm/mail/components/im/messages/mail/Incoming/Content.html
new file mode 100644
index 0000000000..cfc6270d37
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Incoming/Content.html
@@ -0,0 +1 @@
+<div class="%messageClasses%" data-prpl="%service%"><div class="sidebar"><img src="%userIconPath%" alt="" class="usericon"/><div class="date">%time{%H:%M}%</div></div><div class="body"><div class="pseudo" style="%senderColor%">%sender%</div>%message%</div></div>
diff --git a/comm/mail/components/im/messages/mail/Incoming/Context.html b/comm/mail/components/im/messages/mail/Incoming/Context.html
new file mode 100644
index 0000000000..6a297f0fba
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Incoming/Context.html
@@ -0,0 +1 @@
+<div class="context %messageClasses%" data-prpl="%service%"><div class="sidebar"><img src="%userIconPath%" alt="" class="usericon"/><div class="date">%time{%H:%M}%</div></div><div class="body"><div class="pseudo" style="%senderColor%">%sender%</div>%message%</div></div>
diff --git a/comm/mail/components/im/messages/mail/Incoming/NextContent.html b/comm/mail/components/im/messages/mail/Incoming/NextContent.html
new file mode 100644
index 0000000000..02c51fd70a
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Incoming/NextContent.html
@@ -0,0 +1 @@
+<div class="%messageClasses%" data-prpl="%service%"><div class="sidebar"><div class="date">%time{%H:%M}%</div></div><div class="body">%message%</div></div>
diff --git a/comm/mail/components/im/messages/mail/Incoming/NextContext.html b/comm/mail/components/im/messages/mail/Incoming/NextContext.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Incoming/NextContext.html
diff --git a/comm/mail/components/im/messages/mail/Incoming/buddy_icon.svg b/comm/mail/components/im/messages/mail/Incoming/buddy_icon.svg
new file mode 100644
index 0000000000..6f9e4e7b93
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Incoming/buddy_icon.svg
@@ -0,0 +1,6 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
+ <path fill="context-fill" fill-opacity="0.25" d="M2 48v-8c-.06-7.74 15.71-6.56 16.01-11.12.1-1.33.34-1.66-.23-3.08-.98-.65-1.41-2.86-1.52-4.1 0-.97-.95-.24-1.01-1.39-.32-1.5-.46-2.91.14-4.37.55-.47.83.74.83-.13a8.1 8.1 0 01.64-4.52c1.27-4.73 11.16-4.57 13.54.36.7 1.98.61 2.86.76 4.84 0 .84.4-.61.81.1a7.9 7.9 0 01-.1 4.01c-.53 1.95-1.39.16-1.52 1.52-.6 1.24-.32 3.04-1.8 3.73-.46 1.13-.28 1.85-.14 2.99 0 4.38 15.1 4.14 15.59 11.16v7.86"/>
+</svg>
diff --git a/comm/mail/components/im/messages/mail/Info.plist b/comm/mail/components/im/messages/mail/Info.plist
new file mode 100644
index 0000000000..042b7b49bb
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Info.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActionMessageTemplate</key>
+ <string>%message%</string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Thunderbird Message Style</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.mozilla.thunderbird.message.style</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>1.0</string>
+ <key>CFBundleName</key>
+ <string>Minimal</string>
+ <key>CFBundlePackageType</key>
+ <string>AdIM</string>
+ <key>DefaultBackgroundColor</key>
+ <string>FFFFFF</string>
+ <key>DefaultVariant</key>
+ <string>Light</string>
+ <key>DisableCustomBackground</key>
+ <false/>
+ <key>MessageViewVersion</key>
+ <integer>4</integer>
+ <key>ShowsUserIcons</key>
+ <true/>
+</dict>
+</plist>
diff --git a/comm/mail/components/im/messages/mail/NextStatus.html b/comm/mail/components/im/messages/mail/NextStatus.html
new file mode 100644
index 0000000000..26dd6fac41
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/NextStatus.html
@@ -0,0 +1 @@
+<div class="event-row"><div class="sidebar"><div class="date">%time{%H:%M}%</div></div><div class="body"><p class="event-paragraph">%message%</p></div></div><span id="insert"/>
diff --git a/comm/mail/components/im/messages/mail/Outgoing/Content.html b/comm/mail/components/im/messages/mail/Outgoing/Content.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Outgoing/Content.html
diff --git a/comm/mail/components/im/messages/mail/Outgoing/Context.html b/comm/mail/components/im/messages/mail/Outgoing/Context.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Outgoing/Context.html
diff --git a/comm/mail/components/im/messages/mail/Outgoing/NextContent.html b/comm/mail/components/im/messages/mail/Outgoing/NextContent.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Outgoing/NextContent.html
diff --git a/comm/mail/components/im/messages/mail/Outgoing/NextContext.html b/comm/mail/components/im/messages/mail/Outgoing/NextContext.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Outgoing/NextContext.html
diff --git a/comm/mail/components/im/messages/mail/Status.html b/comm/mail/components/im/messages/mail/Status.html
new file mode 100644
index 0000000000..a59a34e211
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Status.html
@@ -0,0 +1 @@
+<div aria-live="polite" class="%messageClasses%"><div class="event-row"><div class="sidebar"><div class="date">%time{%H:%M}%</div></div><div class="body"><p class="event-paragraph">%message%</p></div></div><span id="insert"/></div>
diff --git a/comm/mail/components/im/messages/mail/Variants/Dark.css b/comm/mail/components/im/messages/mail/Variants/Dark.css
new file mode 100644
index 0000000000..63044cc7fa
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Variants/Dark.css
@@ -0,0 +1,49 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+body {
+ background-color: #18181a;
+ color: #f9f9fa;
+}
+
+#Chat .event p {
+ color: #999;
+}
+
+#Chat #unread-ruler {
+ border-top: 1px solid #30e60b;
+}
+
+.message:hover,
+.message:focus {
+ background-color: rgba(255, 255, 255, 0.03);
+}
+
+.outgoing .pseudo {
+ color: #007cff;
+}
+
+.incoming .pseudo {
+ color: #e5509f;
+}
+
+.date {
+ color: #999;
+}
+
+.ib-sender.message-encrypted::before {
+ fill: #fff;
+}
+
+.context {
+ color: #aeaeaf;
+}
+
+.sessionstart-ruler {
+ border-top: 1px solid #e9e9ea;
+}
+
+.eventToggle {
+ stroke: #fff;
+}
diff --git a/comm/mail/components/im/messages/mail/Variants/Light.css b/comm/mail/components/im/messages/mail/Variants/Light.css
new file mode 100644
index 0000000000..7f1404cf9c
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/Variants/Light.css
@@ -0,0 +1,49 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+body {
+ background-color: white;
+ color: black;
+}
+
+#Chat .event p {
+ color: GrayText;
+}
+
+#Chat #unread-ruler {
+ border-top: 1px solid #30e60b;
+}
+
+.message:hover,
+.message:focus {
+ background-color: rgba(0, 0, 0, 0.03);
+}
+
+.outgoing .pseudo {
+ color: #0060DF;
+}
+
+.incoming .pseudo {
+ color: #B5007F;
+}
+
+.date {
+ color: GrayText;
+}
+
+.ib-sender.message-encrypted::before {
+ fill: #000;
+}
+
+.context {
+ color: rgb(91, 91, 91);
+}
+
+.sessionstart-ruler {
+ border-top: 1px solid ThreeDDarkShadow;
+}
+
+.eventToggle {
+ stroke: #000;
+}
diff --git a/comm/mail/components/im/messages/mail/inline.js b/comm/mail/components/im/messages/mail/inline.js
new file mode 100644
index 0000000000..a6e7f72302
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/inline.js
@@ -0,0 +1,40 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+function checkNewText(target) {
+ if (target.className == "event-row") {
+ let parent = target.closest(".event");
+ // We need to start a group with this element if there are at least 4
+ // system messages and they aren't already grouped.
+ if (
+ !parent?.grouped &&
+ parent?.querySelector(".event-row:nth-of-type(4)")
+ ) {
+ let toggle = document.createElement("div");
+ toggle.className = "eventToggle";
+ toggle.addEventListener("click", event => {
+ toggle.closest(".event").classList.toggle("hide-children");
+ });
+ parent.insertBefore(
+ toggle,
+ parent.querySelector(".event-row:nth-of-type(2)")
+ );
+ parent.classList.add("hide-children");
+ parent.grouped = true;
+ }
+ }
+}
+
+new MutationObserver(function (aMutations) {
+ for (let mutation of aMutations) {
+ for (let node of mutation.addedNodes) {
+ if (node instanceof HTMLElement) {
+ checkNewText(node);
+ }
+ }
+ }
+}).observe(document.getElementById("ibcontent"), {
+ childList: true,
+ subtree: true,
+});
diff --git a/comm/mail/components/im/messages/mail/main.css b/comm/mail/components/im/messages/mail/main.css
new file mode 100644
index 0000000000..1989b2e3d3
--- /dev/null
+++ b/comm/mail/components/im/messages/mail/main.css
@@ -0,0 +1,155 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#Chat {
+ white-space: normal;
+}
+
+/* The "#chat " is required to override "#Chat *" from conv.css */
+
+.message {
+ display: flex;
+ align-items: flex-start;
+ margin-block: 5px;
+ padding: 5px 6px;
+ border-radius: 4px;
+}
+
+#Chat .event {
+ display: flex;
+ flex-direction: column;
+ margin-left: 0;
+ clear: none;
+ padding-inline: 6px;
+}
+
+.event-row {
+ display: flex;
+ align-items: start;
+}
+
+#Chat .event p {
+ margin: 0;
+ margin-block-end: 5px;
+}
+
+#Chat #unread-ruler {
+ margin: 4px;
+}
+
+.sidebar {
+ display: flex;
+ justify-content: end;
+ margin-inline-end: 10px;
+ margin-block-start: 2px;
+ width: 4.5em;
+ flex-wrap: wrap;
+ text-align: right;
+}
+
+.body {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+}
+
+.pseudo {
+ font-size: 0.9em;
+ font-weight: bold;
+ letter-spacing: 0.01em;
+ margin-block-end: 0;
+}
+
+.message.outgoing + .message.outgoing,
+.message.incoming + .message.incoming {
+ margin-block: 0;
+}
+
+.message:not(.action) > .next {
+ visibility: hidden;
+}
+
+.date {
+ font-size: 0.75em;
+ text-transform: uppercase;
+ font-style: normal;
+ font-weight: normal;
+ white-space: nowrap;
+}
+
+.ib-sender.message-encrypted {
+ position: relative;
+}
+
+.ib-sender.message-encrypted::before {
+ position: relative;
+ display: inline-block;
+ content: '';
+ width: 11px;
+ height: 11px;
+ opacity: 0.5;
+ background: url("chrome://messenger/skin/icons/connection-secure.svg") no-repeat center;
+ background-size: contain;
+ margin-inline-end: 4px;
+ -moz-context-properties: fill;
+}
+
+.usericon {
+ display: none;
+}
+
+.nick {
+ font-weight: bold;
+}
+
+.nick > .pseudo {
+ text-decoration: underline;
+}
+
+.action {
+ font-style: italic;
+}
+
+.context > .pseudo {
+ opacity: 0.7;
+}
+
+p *:any-link img {
+ margin-bottom: 1px;
+ border-bottom: solid 1px;
+}
+
+.sessionstart-ruler {
+ margin: 8px 0 12px;
+ width: 100%;
+ border: none;
+}
+
+/* used by javascript */
+.eventToggle {
+ background: var(--icon-nav-down-sm) no-repeat left center;
+ margin-bottom: -22px;
+ cursor: pointer;
+ height: 22px;
+ width: 20px;
+ z-index: 1;
+ opacity: 0.5;
+ -moz-context-properties: stroke;
+}
+
+.eventToggle:hover {
+ opacity: 1;
+}
+
+.hide-children > :is(.event-row,hr):not(:first-of-type,:last-of-type,.no-collapse) {
+ display: none;
+}
+
+.hide-children .eventToggle {
+ background: var(--icon-nav-right-sm) no-repeat left center;
+}
+
+.hide-children .eventToggle:-moz-locale-dir(rtl) {
+ background: var(--icon-nav-left-sm) no-repeat right center;
+}