diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mail/components/im/messages/dark | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/mail/components/im/messages/dark')
13 files changed, 277 insertions, 0 deletions
diff --git a/comm/mail/components/im/messages/dark/Incoming/Content.html b/comm/mail/components/im/messages/dark/Incoming/Content.html new file mode 100644 index 0000000000..3db2719441 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Incoming/Content.html @@ -0,0 +1,2 @@ +<p class="%messageClasses%" data-senderColor="%senderColor%"><span class="pseudo">%sender%</span> <span class="message-style">%message%</span></p> +<div id="insert"/> diff --git a/comm/mail/components/im/messages/dark/Incoming/Context.html b/comm/mail/components/im/messages/dark/Incoming/Context.html new file mode 100644 index 0000000000..0b8c7ec20f --- /dev/null +++ b/comm/mail/components/im/messages/dark/Incoming/Context.html @@ -0,0 +1,2 @@ +<p class="context %messageClasses%" data-senderColor="%senderColor%"><span class="pseudo">%sender%</span><span class="message-style">%message%</span></p> +<div id="insert"/> diff --git a/comm/mail/components/im/messages/dark/Incoming/NextContent.html b/comm/mail/components/im/messages/dark/Incoming/NextContent.html new file mode 100644 index 0000000000..c62098d838 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Incoming/NextContent.html @@ -0,0 +1,2 @@ +<p class="%messageClasses%" data-senderColor="%senderColor%"><span class="message-style">%message%</span></p> +<div id="insert"/> diff --git a/comm/mail/components/im/messages/dark/Incoming/NextContext.html b/comm/mail/components/im/messages/dark/Incoming/NextContext.html new file mode 100644 index 0000000000..d57fd3b1a6 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Incoming/NextContext.html @@ -0,0 +1,2 @@ +<p class="context %messageClasses%" data-senderColor="%senderColor%"><span class="message-style">%message%</span></p> +<div id="insert"/> diff --git a/comm/mail/components/im/messages/dark/Info.plist b/comm/mail/components/im/messages/dark/Info.plist new file mode 100644 index 0000000000..3de1af0f4d --- /dev/null +++ b/comm/mail/components/im/messages/dark/Info.plist @@ -0,0 +1,41 @@ +<?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>%sender% %message%</string> + + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + + <key>CFBundleGetInfoString</key> + <string>Instantbird Dark Message Style</string> + + <key>CFBundleIdentifier</key> + <string>org.instantbird.dark.message.style</string> + + <key>CFBundleInfoDictionaryVersion</key> + <string>1.0</string> + + <key>CFBundleName</key> + <string>Dark</string> + + <key>CFBundlePackageType</key> + <string>AdIM</string> + + <key>DefaultBackgroundColor</key> + <string>000000</string> + + <key>DefaultVariant</key> + <string>Blue</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/dark/Status.html b/comm/mail/components/im/messages/dark/Status.html new file mode 100644 index 0000000000..cb3bedf216 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Status.html @@ -0,0 +1 @@ +<p class="event-messages">%time% - %message%</p> diff --git a/comm/mail/components/im/messages/dark/Variants/Blue.css b/comm/mail/components/im/messages/dark/Variants/Blue.css new file mode 100644 index 0000000000..d32a90406f --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Blue.css @@ -0,0 +1,8 @@ +/* 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/. */ + +p.incoming { + border-top: 1px solid hsla(215, 100%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(215, 100%, 80%, 0.3), hsla(215, 100%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/Variants/Green.css b/comm/mail/components/im/messages/dark/Variants/Green.css new file mode 100644 index 0000000000..d2a8ecca33 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Green.css @@ -0,0 +1,8 @@ +/* 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/. */ + +p.incoming { + border-top: 1px solid hsla(150, 80%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(150, 80%, 80%, 0.3), hsla(150, 80%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/Variants/Purple.css b/comm/mail/components/im/messages/dark/Variants/Purple.css new file mode 100644 index 0000000000..bf26f8d549 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Purple.css @@ -0,0 +1,8 @@ +/* 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/. */ + +p.incoming { + border-top: 1px solid hsla(275, 100%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(275, 100%, 80%, 0.3), hsla(275, 100%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/Variants/Red.css b/comm/mail/components/im/messages/dark/Variants/Red.css new file mode 100644 index 0000000000..5bb6dab2ed --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Red.css @@ -0,0 +1,8 @@ +/* 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/. */ + +p.incoming { + border-top: 1px solid hsla(0, 100%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(0, 100%, 80%, 0.3), hsla(0, 100%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/Variants/Yellow.css b/comm/mail/components/im/messages/dark/Variants/Yellow.css new file mode 100644 index 0000000000..aa493bfdc7 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Yellow.css @@ -0,0 +1,8 @@ +/* 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/. */ + +p.incoming { + border-top: 1px solid hsla(50, 100%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(50, 100%, 80%, 0.3), hsla(50, 100%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/inline.js b/comm/mail/components/im/messages/dark/inline.js new file mode 100644 index 0000000000..71cbd46475 --- /dev/null +++ b/comm/mail/components/im/messages/dark/inline.js @@ -0,0 +1,60 @@ +/* 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/. */ + +const p_border_top = "1px solid hsla(#, 100%, 80%, 0.4)"; +const p_background = + "-moz-linear-gradient(top, hsla(#, 100%, 80%, 0.3), hsla(#, 100%, 80%, 0.1) 30px)"; +const nick_background = + "-moz-linear-gradient(top, hsla(#, 100%, 80%, 0.3), hsla(#, 100%, 80%, 0.1) 1em)"; + +function setColors(target) { + var senderColor = target.getAttribute("data-senderColor"); + + if (!senderColor) { + return; + } + + var regexp = + /color:\s*hsl\(\s*(\d{1,3})\s*,\s*\d{1,3}\%\s*,\s*\d{1,3}\%\s*\)/; + var parsed = regexp.exec(senderColor); + + if (!parsed) { + return; + } + + var senderHue = parsed[1]; + + target.style.borderTop = p_border_top.replace("#", senderHue); + target.style.background = p_background.replace(/#/g, senderHue); +} + +function checkNewText(target) { + if (target.tagName == "P" && target.className != "event-messages") { + setColors(target); + } + + var nicks = target.getElementsByClassName("ib-nick"); + for (var i = 0; i < nicks.length; ++i) { + var nick = nicks[i]; + if (!nick.hasAttribute("data-left")) { + nick.style.background = nick_background.replace( + /#/g, + nick.getAttribute("data-nickColor") + ); + } + } +} + +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/dark/main.css b/comm/mail/components/im/messages/dark/main.css new file mode 100644 index 0000000000..b3f94d9d2c --- /dev/null +++ b/comm/mail/components/im/messages/dark/main.css @@ -0,0 +1,127 @@ +/* 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 { + margin: 0; + padding: 0; + background-color: black; +} + +p { + font-family: sans-serif; + margin: 0; + padding: 0; + color: rgba(255, 255, 255, 0.6); +} + +p.message { + margin: 0; + padding: 4px 15px 6px 15px; + border-bottom: 1px solid black; + border-top: 1px solid rgba(255, 255, 255, 0.3); + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07) 30px); +} + +p.context:not(:hover) { + opacity: 0.5; + color: rgba(255, 255, 255, 1); +} + +span.message-style, +p.event-messages { + font-size: 90%; +} + +p.event-messages { + margin: 5px 0px 5px 0px; + text-align: center; + opacity: 0.4; + -moz-transition-property: opacity; + -moz-transition-duration: 0.3s; +} + +p.event-messages:hover { + opacity: 1; +} + +.message-style { + display: block; +} + +.pseudo { + margin-bottom: 3px; + font-weight: bold; + color: white; + display: block; +} + +.nick > .message-style { + font-weight: bold; +} + +.action > .message-style { + font-style: italic; +} + +.action > .message-style::before { + content: "*** "; +} + +a, +a:hover { + color: rgba(255, 255, 255, 0.6); +} + +a:active { + color: rgba(255, 255, 255, 1); +} + +a:visited { + color: rgba(255, 255, 255, 0.4); +} + +#Chat { + white-space: normal; +} + +p *:any-link img { + margin-bottom: 1px; + border-bottom: solid 1px; +} + +.ib-nick { + color: white !important; + border-radius: 3px; + padding: 0 0.25em; +} + +.ib-nick[left] { + color: white !important; + background-color: black; + opacity: 0.4; + -moz-transition-property: opacity; + -moz-transition-duration: 0.3s; +} + +.ib-nick[left]:hover { + opacity: 1; +} + +.ib-sender.message-encrypted { + position: relative; +} + +.ib-sender.message-encrypted::after { + 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-start: 4px; + -moz-context-properties: fill; + fill: currentColor; +} |