From 6d1a4d1e2a36b986e464aaef635cc95a46ebf79a Mon Sep 17 00:00:00 2001 From: STDquantum <405720329@qq.com> Date: Sat, 3 Feb 2024 01:27:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=BD=AC=E8=B4=A6=E5=92=8C?= =?UTF-8?q?=E9=9F=B3=E8=A7=86=E9=A2=91=E9=80=9A=E8=AF=9D=E7=9A=84=E5=89=8D?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/resources/data/template.html | 166 +++++++++++++++++++++++++ app/ui/contact/export/export_dialog.py | 4 +- app/ui/menu/export.py | 2 +- 3 files changed, 169 insertions(+), 3 deletions(-) diff --git a/app/resources/data/template.html b/app/resources/data/template.html index 8bf2d1a..3b6b087 100644 --- a/app/resources/data/template.html +++ b/app/resources/data/template.html @@ -569,6 +569,128 @@ input { font-weight: bold; } +/* 转账 */ + +.transfer-box { + width: 200px; + height: 80px; + margin-left: 18px; + margin-right: 18px; + border-radius: 3px; + padding-left: 11px; + padding-right: 11px; + position: relative; +} + +.transfer-box[paysubtype="1"], .transfer-box[paysubtype="1"]::before { + background: #f79c46; +} + +.transfer-box[paysubtype="1"] i { + background-image: url(./icon/transfer1.png); +} + +.transfer-box:not([paysubtype="1"]), .transfer-box:not([paysubtype="1"])::before { + background: #f8e2c6; +} + +.transfer-box[paysubtype="3"] i { + background-image: url(./icon/transfer2.png); +} + +.transfer-box[paysubtype="4"] i { + background-image: url(./icon/transfer3.png); +} + +.transfer-box::before { + content: ""; + width: 8px; + height: 8px; + position: absolute; + transform: rotate(45deg); + top: 18px; +} + +.transfer-box[issend="0"]::before { + left: -3px; +} + +.transfer-box[issend="1"]::before { + left: 218px; +} + +.trans-content { + display: flex; + height: 60px; + align-items: center; + position: relative; +} + +.trans-content>i { + display: block; + width: 36px; + height: 36px; + background-repeat: no-repeat; + background-size: cover; +} + +.transfer-texts { + margin-left: 7px; + display: flex; + align-items: flex-start; + flex-direction: column; +} + +.transfer-texts>span, .transfer-texts>font, .trans-bottom>span { + color: white; + font-weight: 500; +} + +.transfer-texts>span { + font-size: 15px; +} + +.transfer-texts>font { + font-size: 12px; + padding-left: 2px; +} + +.transfer { + height: 60px; +} + +.trans-bottom { + height: 16px; + margin-top: 1px; + display: flex; + align-items: center; +} + +.trans-bottom>span { + font-size: 10px; +} + +/* 音视频通话 */ + +.call i{ + display: inline-block; + width: 18px; + height: 18px; + background-repeat: no-repeat; + background-size: cover; + vertical-align: middle; + margin-right: 4px; + margin-top: -2px; +} + +.call[calltype='1'] i { + background-image: url(./icon/phone.png); +} + +.call[calltype='0'] i { + background-image: url(./icon/video.png); +} + @media screen and (max-width: 768px) { .button-row, .jump-row, @@ -1406,6 +1528,26 @@ function renderPage(page) { } return messageMusicAudioTag; } + function messageTransfer(message) { + const transfer_box = document.createElement("div"); + transfer_box.className = "transfer-box"; + transfer_box.setAttribute("issend", message.is_send); + transfer_box.setAttribute("paysubtype", message.paysubtype); + transfer_box.innerHTML = `