mirror of
https://github.com/Cola-Echo/Cola.git
synced 2026-06-06 07:45:50 +00:00
Add files via upload
This commit is contained in:
27
gift.js
27
gift.js
@@ -796,20 +796,29 @@ export function appendMultiGiftMessage(role, gifts, customDesc, contact, target
|
|||||||
: firstChar;
|
: firstChar;
|
||||||
}
|
}
|
||||||
|
|
||||||
const giftEmojis = gifts.map(g => g.emoji).join(' ');
|
const giftTypeLabel = target === 'character' ? '送TA' : '送自己';
|
||||||
const giftNames = gifts.map(g => escapeHtml(g.name)).join('、');
|
|
||||||
const giftTypeLabel = target === 'character' ? '情趣套装·送TA' : '情趣套装·送自己';
|
// 生成每个礼物的标签
|
||||||
|
const giftTagsHtml = gifts.map(g => `
|
||||||
|
<div class="wechat-multi-gift-tag">
|
||||||
|
<span class="wechat-multi-gift-tag-emoji">${g.emoji}</span>
|
||||||
|
<span class="wechat-multi-gift-tag-name">${escapeHtml(g.name)}</span>
|
||||||
|
</div>
|
||||||
|
`).join('');
|
||||||
|
|
||||||
messageDiv.innerHTML = `
|
messageDiv.innerHTML = `
|
||||||
<div class="wechat-message-avatar">${avatarContent}</div>
|
<div class="wechat-message-avatar">${avatarContent}</div>
|
||||||
<div class="wechat-message-content">
|
<div class="wechat-message-content">
|
||||||
<div class="wechat-gift-bubble wechat-gift-bubble-toy wechat-gift-bubble-multi">
|
<div class="wechat-multi-gift-card">
|
||||||
<div class="wechat-gift-bubble-emoji">${giftEmojis}</div>
|
<div class="wechat-multi-gift-header">
|
||||||
<div class="wechat-gift-bubble-info">
|
<span class="wechat-multi-gift-icon">🎁</span>
|
||||||
<div class="wechat-gift-bubble-name">${giftNames}</div>
|
<span class="wechat-multi-gift-title">情趣套装</span>
|
||||||
${customDesc ? `<div class="wechat-gift-bubble-desc">${escapeHtml(customDesc)}</div>` : ''}
|
<span class="wechat-multi-gift-target">${giftTypeLabel}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wechat-gift-bubble-label">${giftTypeLabel}</div>
|
<div class="wechat-multi-gift-tags">
|
||||||
|
${giftTagsHtml}
|
||||||
|
</div>
|
||||||
|
${customDesc ? `<div class="wechat-multi-gift-desc">${escapeHtml(customDesc)}</div>` : ''}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
75
style.css
75
style.css
@@ -10778,6 +10778,81 @@
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ========== 多选礼物卡片样式 ========== */
|
||||||
|
.wechat-multi-gift-card {
|
||||||
|
background: linear-gradient(135deg, #2d1f3d, #1f1a2a);
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
max-width: 240px;
|
||||||
|
border: 1px solid rgba(156, 39, 176, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-icon {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #e9e9e9;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-target {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #ff6b8a;
|
||||||
|
background: rgba(255, 107, 138, 0.15);
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-tags {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-tag {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
background: rgba(255, 255, 255, 0.08);
|
||||||
|
padding: 5px 10px;
|
||||||
|
border-radius: 16px;
|
||||||
|
transition: background 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-tag:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-tag-emoji {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-tag-name {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-multi-gift-desc {
|
||||||
|
margin-top: 8px;
|
||||||
|
padding-top: 8px;
|
||||||
|
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
/* ========== 拉黑样式 ========== */
|
/* ========== 拉黑样式 ========== */
|
||||||
.wechat-blocked-badge {
|
.wechat-blocked-badge {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
Reference in New Issue
Block a user