From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- comm/mail/components/im/messages/mail/Footer.html | 0 comm/mail/components/im/messages/mail/Header.html | 0 .../im/messages/mail/Incoming/Content.html | 1 + .../im/messages/mail/Incoming/Context.html | 1 + .../im/messages/mail/Incoming/NextContent.html | 1 + .../im/messages/mail/Incoming/NextContext.html | 0 .../im/messages/mail/Incoming/buddy_icon.svg | 6 + comm/mail/components/im/messages/mail/Info.plist | 30 ++++ .../components/im/messages/mail/NextStatus.html | 1 + .../im/messages/mail/Outgoing/Content.html | 0 .../im/messages/mail/Outgoing/Context.html | 0 .../im/messages/mail/Outgoing/NextContent.html | 0 .../im/messages/mail/Outgoing/NextContext.html | 0 comm/mail/components/im/messages/mail/Status.html | 1 + .../components/im/messages/mail/Variants/Dark.css | 49 +++++++ .../components/im/messages/mail/Variants/Light.css | 49 +++++++ comm/mail/components/im/messages/mail/inline.js | 40 ++++++ comm/mail/components/im/messages/mail/main.css | 155 +++++++++++++++++++++ 18 files changed, 334 insertions(+) create mode 100644 comm/mail/components/im/messages/mail/Footer.html create mode 100644 comm/mail/components/im/messages/mail/Header.html create mode 100644 comm/mail/components/im/messages/mail/Incoming/Content.html create mode 100644 comm/mail/components/im/messages/mail/Incoming/Context.html create mode 100644 comm/mail/components/im/messages/mail/Incoming/NextContent.html create mode 100644 comm/mail/components/im/messages/mail/Incoming/NextContext.html create mode 100644 comm/mail/components/im/messages/mail/Incoming/buddy_icon.svg create mode 100644 comm/mail/components/im/messages/mail/Info.plist create mode 100644 comm/mail/components/im/messages/mail/NextStatus.html create mode 100644 comm/mail/components/im/messages/mail/Outgoing/Content.html create mode 100644 comm/mail/components/im/messages/mail/Outgoing/Context.html create mode 100644 comm/mail/components/im/messages/mail/Outgoing/NextContent.html create mode 100644 comm/mail/components/im/messages/mail/Outgoing/NextContext.html create mode 100644 comm/mail/components/im/messages/mail/Status.html create mode 100644 comm/mail/components/im/messages/mail/Variants/Dark.css create mode 100644 comm/mail/components/im/messages/mail/Variants/Light.css create mode 100644 comm/mail/components/im/messages/mail/inline.js create mode 100644 comm/mail/components/im/messages/mail/main.css (limited to 'comm/mail/components/im/messages/mail') 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 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 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 @@ +
%sender%
%message%
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 @@ +
%sender%
%message%
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 @@ +
%message%
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 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 @@ + + + + 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 @@ + + + + + ActionMessageTemplate + %message% + CFBundleDevelopmentRegion + English + CFBundleGetInfoString + Thunderbird Message Style + CFBundleIdentifier + org.mozilla.thunderbird.message.style + CFBundleInfoDictionaryVersion + 1.0 + CFBundleName + Minimal + CFBundlePackageType + AdIM + DefaultBackgroundColor + FFFFFF + DefaultVariant + Light + DisableCustomBackground + + MessageViewVersion + 4 + ShowsUserIcons + + + 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 @@ +

%message%

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 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 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 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 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 @@ +

%message%

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; +} -- cgit v1.2.3