You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

817 lines
24 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=375, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>青核 Youthome - 群聊设置</title>
<link rel="stylesheet" href="../colors_and_type.css">
<script src="https://cdn.tailwindcss.com"></script>
<style>
:root {
--youth-primary: #26C2BB;
--youth-primary-light: #54CAC5;
--primary-bg: #E6F7F6;
--primary-border: #B3E8E4;
--bg-page: #F7F8FA;
--bg-card: #FFFFFF;
--text-title: #1F1F1F;
--text-body: #595959;
--text-muted: #8C8C8C;
--youth-border-light: #E8E8E8;
--youth-success: #52C41A;
--youth-warning: #FAAD14;
--danger: #F5222D;
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
--tag-bg: #F0F1F3;
--mint-light: #E8F8F5;
--orange-light: #FFF4E8;
--btn-gradient: linear-gradient(135deg, #54CAC5 0%, #26C2BB 50%, #1FA8A2 100%);
/* =====================================================
* Traework 设计系统 - 组件规范
* 圆角 / 间距 / 阴影 / 高度
* ===================================================== */
--radius-xs: 4px;
--radius-sm: 8px; /* 按钮、输入框 */
--radius-md: 12px; /* 卡片 */
--radius-lg: 16px; /* 标签、弹窗 */
--radius-xl: 20px;
--radius-full: 9999px;
/* 组件高度 */
--height-btn: 44px;
--height-input: 44px;
--height-nav-bottom: 64px;
/* 间距(4px 基础栅格) */
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-page-x: 16px;
--space-card: 16px;
/* 柔和弥散阴影 */
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
--shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.06);
--shadow-btn: 0 2px 8px rgba(38, 194, 187, 0.25);
--shadow-btn-hover: 0 4px 16px rgba(38, 194, 187, 0.35);
--shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.12);
--shadow-float: 0 4px 24px rgba(0, 0, 0, 0.08);
/* 内阴影浮雕(输入框) */
--shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.04);
--shadow-inset-focus: inset 0 1px 3px rgba(38, 194, 187, 0.08);
/* 毛玻璃 */
--glass-bg: rgba(255, 255, 255, 0.72);
--glass-blur: blur(20px);
--glass-border: rgba(255, 255, 255, 0.3);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', 'Helvetica Neue', sans-serif;
background: var(--youth-bg-page);
color: var(--youth-text-secondary);
min-height: 100vh;
overflow-x: hidden;
}
.app-container {
width: 375px;
height: 812px;
margin: 0 auto;
background: var(--youth-bg-page);
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* 状态栏 */
.status-bar {
height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
font-size: 15px;
font-weight: 600;
color: var(--youth-text-primary);
flex-shrink: 0;
}
.status-bar .right-icons {
display: flex;
align-items: center;
gap: 6px;
}
/* 顶部导航 */
.top-nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px;
height: 44px;
flex-shrink: 0;
}
.nav-left, .nav-right {
display: flex;
align-items: center;
}
.nav-btn {
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
color: var(--youth-text-primary);
cursor: pointer;
transition: background 0.2s ease;
border: none;
background: transparent;
}
.nav-btn:active {
background: var(--youth-border-light);
}
.nav-title {
font-size: 17px;
font-weight: 700;
color: var(--youth-text-primary);
}
/* 内容区 */
.content-area {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
.content-area::-webkit-scrollbar {
display: none;
}
/* 群信息卡片 */
.group-info-card {
display: flex;
align-items: center;
padding: 16px;
background: var(--youth-bg-card);
margin: 12px 16px 0;
border-radius: 12px;
box-shadow: var(--youth-shadow-card);
}
.group-avatar {
width: 56px;
height: 56px;
border-radius: 12px;
background: var(--youth-gradient-primary);
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 20px;
font-weight: 700;
flex-shrink: 0;
margin-right: 12px;
position: relative;
overflow: hidden;
}
.group-avatar::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
}
.group-info {
flex: 1;
min-width: 0;
}
.group-name {
font-size: 17px;
font-weight: 700;
color: var(--youth-text-primary);
margin-bottom: 4px;
display: flex;
align-items: center;
gap: 6px;
}
.group-tag {
font-size: 10px;
padding: 1px 6px;
background: var(--youth-teal-50);
color: var(--youth-primary);
border-radius: 10px;
font-weight: 500;
flex-shrink: 0;
}
.group-desc {
font-size: 12px;
color: var(--youth-text-tertiary);
display: flex;
align-items: center;
gap: 4px;
}
.group-desc .dot {
width: 2px;
height: 2px;
background: var(--youth-text-tertiary);
border-radius: 50%;
}
.edit-icon {
color: var(--youth-text-tertiary);
cursor: pointer;
padding: 6px;
}
/* 设置卡片组 */
.setting-group {
background: var(--youth-bg-card);
margin: 12px 16px 0;
border-radius: 12px;
box-shadow: var(--youth-shadow-card);
overflow: hidden;
}
.setting-group-title {
font-size: 12px;
font-weight: 500;
color: var(--youth-text-tertiary);
padding: 12px 16px 6px;
margin-top: 4px;
}
.setting-item {
display: flex;
align-items: center;
padding: 12px 16px;
cursor: pointer;
transition: background 0.15s ease;
position: relative;
}
.setting-item:active {
background: var(--youth-primary-bg);
}
.setting-item + .setting-item::before {
content: '';
position: absolute;
top: 0;
left: 16px;
right: 16px;
height: 1px;
background: var(--youth-border-light);
}
.setting-icon {
width: 28px;
height: 28px;
border-radius: 8px;
background: var(--youth-primary-bg);
display: flex;
align-items: center;
justify-content: center;
color: var(--youth-primary);
flex-shrink: 0;
margin-right: 10px;
}
.setting-icon.warning {
background: var(--youth-orange-50);
color: var(--youth-warning);
}
.setting-icon.danger {
background: #FFE8E8;
color: var(--youth-danger-500);
}
.setting-label {
flex: 1;
font-size: 14px;
color: var(--youth-text-primary);
font-weight: 500;
}
.setting-value {
font-size: 13px;
color: var(--youth-text-tertiary);
margin-right: 6px;
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.setting-arrow {
color: var(--youth-text-tertiary);
flex-shrink: 0;
}
/* 开关 */
.switch {
width: 44px;
height: 26px;
border-radius: 13px;
background: var(--tag-bg);
position: relative;
cursor: pointer;
transition: background 0.2s ease;
flex-shrink: 0;
}
.switch.active {
background: var(--youth-primary);
}
.switch::after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 20px;
height: 20px;
border-radius: 50%;
background: #FFFFFF;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
transition: all 0.2s ease;
}
.switch.active::after {
left: 21px;
}
/* 群成员区 */
.members-section {
background: var(--youth-bg-card);
margin: 12px 16px 0;
border-radius: 12px;
box-shadow: var(--youth-shadow-card);
padding: 14px 16px;
}
.members-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.members-title {
font-size: 14px;
font-weight: 600;
color: var(--youth-text-primary);
display: flex;
align-items: center;
gap: 6px;
}
.members-count {
font-size: 12px;
color: var(--youth-text-tertiary);
font-weight: 400;
}
.members-more {
font-size: 12px;
color: var(--youth-text-tertiary);
display: flex;
align-items: center;
gap: 2px;
cursor: pointer;
}
.members-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 10px 4px;
}
.member-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
cursor: pointer;
}
.member-item:active {
opacity: 0.7;
}
.member-avatar-wrap {
position: relative;
}
.member-avatar-sm {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 600;
color: #FFFFFF;
}
.member-role {
position: absolute;
bottom: -2px;
right: -2px;
width: 16px;
height: 16px;
border-radius: 50%;
background: var(--youth-warning);
border: 2px solid var(--youth-bg-card);
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
}
.member-role svg {
width: 8px;
height: 8px;
}
.member-name {
font-size: 11px;
color: var(--youth-text-secondary);
max-width: 50px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}
.add-member-btn {
width: 40px;
height: 40px;
border-radius: 50%;
border: 1px dashed var(--youth-border-light);
display: flex;
align-items: center;
justify-content: center;
color: var(--youth-text-tertiary);
background: transparent;
}
/* 危险操作 */
.danger-section {
background: var(--youth-bg-card);
margin: 12px 16px 24px;
border-radius: 12px;
box-shadow: var(--youth-shadow-card);
overflow: hidden;
}
.danger-item {
display: flex;
align-items: center;
justify-content: center;
padding: 14px 16px;
cursor: pointer;
transition: background 0.15s ease;
font-size: 15px;
font-weight: 500;
color: var(--youth-danger-500);
}
.danger-item:active {
background: #FFE8E8;
}
.danger-item + .danger-item::before {
content: '';
position: absolute;
top: 0;
left: 16px;
right: 16px;
height: 1px;
background: var(--youth-border-light);
}
.danger-item {
position: relative;
}
/* SVG 图标统一尺寸 */
.icon-svg {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1em;
height: 1em;
vertical-align: middle;
line-height: 1;
}
.icon-svg svg {
width: 100%;
height: 100%;
stroke: currentColor;
}
/* 侧栏图标 */
.sidebar-icon .icon-svg { width: 22px; height: 22px; font-size: 22px; }
/* 社团logo图标 */
.club-logo .icon-svg { width: 28px; height: 28px; font-size: 28px; color: #fff; }
/* 头图大图标 */
.hero-icon .icon-svg { width: 56px; height: 56px; font-size: 56px; opacity: 0.3; }
/* meta 小图标 */
.club-meta .icon-svg { width: 12px; height: 12px; font-size: 12px; }
/* 分类选择网格图标 */
.cat-option .icon-svg { width: 26px; height: 26px; font-size: 26px; }
/* logo预览图标 */
.logo-preview .icon-svg { width: 40px; height: 40px; font-size: 40px; color: #fff; }
/* 提示图标 */
.notice-icon .icon-svg { width: 18px; height: 18px; font-size: 18px; }
</style>
</head>
<body>
<div class="app-container" data-dom-id="app-container">
<!-- 状态栏 -->
<div class="status-bar">
<span>9:41</span>
<div class="right-icons">
<svg width="17" height="11" viewBox="0 0 17 11" fill="currentColor">
<rect x="0" y="7" width="3" height="4" rx="0.5"></rect>
<rect x="4.5" y="5" width="3" height="6" rx="0.5"></rect>
<rect x="9" y="2.5" width="3" height="8.5" rx="0.5"></rect>
<rect x="13.5" y="0" width="3" height="11" rx="0.5"></rect>
</svg>
<svg width="15" height="11" viewBox="0 0 15 11" fill="currentColor">
<path d="M7.5 1C5.3 1 3.2 1.7 1.5 3C-0.5 4.7 -0.5 7.5 1.5 9.2C1.9 9.6 2.5 9.6 2.9 9.2C3.3 8.8 3.3 8.2 2.9 7.8C1.6 6.5 1.6 4.4 2.9 3.1C4.2 1.8 6.3 1.4 8 2C10.1 2.7 11.7 4.4 12.2 6.5C12.5 7.3 12.4 8.1 11.8 8.7C11.4 9.1 11.4 9.7 11.8 10.1C12.2 10.5 12.8 10.5 13.2 10.1C14.2 9.1 14.5 7.7 14.2 6.3C13.6 4 12.1 2.3 10.2 1.3C9.3 1 8.4 0.9 7.5 1Z"></path>
<path d="M7.5 4.5C6 4.5 4.5 5 3.4 6.2C2.3 7.4 2 9 2.4 10.4C2.5 10.8 2.8 11 3.2 11C3.5 11 3.8 10.8 3.9 10.5C4.2 9.5 4.8 8.6 5.7 8C6.6 7.4 7.6 7.1 8.6 7.2C9.8 7.3 10.9 7.8 11.6 8.7C12.3 9.6 12.6 10.7 12.4 11.8L12.4 12C12.3 12.4 12.6 12.7 13 12.8C13.4 12.9 13.7 12.6 13.8 12.2C14.1 10.5 13.5 8.8 12.4 7.5C11.3 6.2 9.6 5.3 7.8 4.9L7.5 4.5Z"></path>
</svg>
<svg width="25" height="12" viewBox="0 0 25 12" fill="none">
<rect x="0.5" y="0.5" width="21" height="11" rx="2.5" stroke="currentColor" opacity="0.5"></rect>
<rect x="2" y="2" width="18" height="8" rx="1.5" fill="currentColor"></rect>
<rect x="22.5" y="4" width="1.5" height="4" rx="0.5" fill="currentColor" opacity="0.5"></rect>
</svg>
</div>
</div>
<!-- 顶部导航 -->
<div class="top-nav">
<div class="nav-left">
<button class="nav-btn" data-dom-id="btn-back" onclick="goBack()">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
</button>
</div>
<div class="nav-title" data-dom-id="nav-title">群聊信息</div>
<div class="nav-right" style="width: 36px;"></div>
</div>
<!-- 内容区 -->
<div class="content-area">
<!-- 群信息卡片 -->
<div class="group-info-card" data-dom-id="group-info-card">
<div class="group-avatar">狼</div>
<div class="group-info">
<div class="group-name">
周末狼人杀组局群
<span class="group-tag">实名群</span>
</div>
<div class="group-desc">
12人 <span class="dot"></span> 清华大学桌游社
</div>
</div>
<div class="edit-icon">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 20h9"></path>
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
</svg>
</div>
</div>
<!-- 群成员 -->
<div class="members-section" data-dom-id="members-section">
<div class="members-header">
<div class="members-title">
群成员
<span class="members-count">12人</span>
</div>
<div class="members-more" data-dom-id="btn-all-members" onclick="viewAllMembers()">
查看全部
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</div>
</div>
<div class="members-grid">
<div class="member-item" onclick="goToProfile(1)">
<div class="member-avatar-wrap">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #FFD93D, #FF9F45);">陈</div>
<div class="member-role">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<polygon points="20 6 9 17 4 12"></polygon>
</svg>
</div>
</div>
<div class="member-name">群主</div>
</div>
<div class="member-item" onclick="goToProfile(2)">
<div class="member-avatar-wrap">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #7ED6E8, #26C2BB);">小</div>
<div class="member-role" style="background: var(--youth-primary);">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2L15 8L22 9L17 14L18 21L12 18L6 21L7 14L2 9L9 8L12 2Z"></path>
</svg>
</div>
</div>
<div class="member-name">管理员</div>
</div>
<div class="member-item" onclick="goToProfile(3)">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #FFB0C7, #FF6B9D);">林</div>
<div class="member-name">林小雨</div>
</div>
<div class="member-item" onclick="goToProfile(4)">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #A29BFE, #6C5CE7);">王</div>
<div class="member-name">王思远</div>
</div>
<div class="member-item" onclick="goToProfile(5)">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #55EFC4, #00B894);">李</div>
<div class="member-name">李子涵</div>
</div>
<div class="member-item" onclick="goToProfile(6)">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #FFEAA7, #FDCB6E);">张</div>
<div class="member-name">张晓桐</div>
</div>
<div class="member-item" onclick="goToProfile(7)">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #74B9FF, #0984E3);">刘</div>
<div class="member-name">刘宇航</div>
</div>
<div class="member-item" onclick="goToProfile(8)">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #FD79A8, #E84393);">赵</div>
<div class="member-name">赵雨萱</div>
</div>
<div class="member-item" onclick="goToProfile(9)">
<div class="member-avatar-sm" style="background: linear-gradient(135deg, #81ECEC, #00CEC9);">周</div>
<div class="member-name">周梓豪</div>
</div>
<div class="member-item">
<div class="add-member-btn" data-dom-id="btn-add-member" onclick="addMember()">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</div>
<div class="member-name">添加</div>
</div>
</div>
</div>
<!-- 群设置 -->
<div class="setting-group-title">群管理</div>
<div class="setting-group" data-dom-id="setting-group">
<div class="setting-item" onclick="goNotice()">
<div class="setting-label">群公告</div>
<div class="setting-value">本周六晚狼人杀活动</div>
<svg class="setting-arrow" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</div>
<div class="setting-item">
<div class="setting-label">管理群成员</div>
<svg class="setting-arrow" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</div>
<div class="setting-item" onclick="transferOwner()">
<div class="setting-label">转让群主</div>
<svg class="setting-arrow" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</div>
</div>
<!-- 消息设置 -->
<div class="setting-group-title">消息设置</div>
<div class="setting-group">
<div class="setting-item">
<div class="setting-label">消息免打扰</div>
<div class="switch" data-dom-id="switch-mute" onclick="toggleSwitch(this)"></div>
</div>
<div class="setting-item">
<div class="setting-label">置顶聊天</div>
<div class="switch active" data-dom-id="switch-top" onclick="toggleSwitch(this)"></div>
</div>
<div class="setting-item">
<div class="setting-label">屏蔽群聊</div>
<div class="switch" data-dom-id="switch-block" onclick="toggleSwitch(this)"></div>
</div>
</div>
<!-- 危险操作 -->
<div class="setting-group-title">更多操作</div>
<div class="danger-section" data-dom-id="danger-section">
<div class="danger-item" data-dom-id="btn-clear-chat" onclick="clearChat()">清空聊天记录</div>
<div class="danger-item" data-dom-id="btn-leave" onclick="leaveGroup()">退出群聊</div>
</div>
<div style="height: 16px;"></div>
</div>
</div>
<script>// 主题切换
icon.innerHTML = '<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>';
}
}
// 开关切换
function toggleSwitch(el) {
el.classList.toggle('active');
}
// 返回
function goBack() {
window.history.back();
}
// 跳转用户资料
function goToProfile(id) {
window.location.href = 'user-profile.html?id=' + id;
}
// 群公告
function goNotice() {
// 跳转公告页
}
// 查看全部成员
function viewAllMembers() {
// 跳转到成员列表
}
// 添加成员
function addMember() {
// 跳转加好友
}
// 转让群主
function transferOwner() {
alert('请选择要转让的群成员');
}
// 清空聊天记录
function clearChat() {
if (confirm('确定要清空聊天记录吗?清空后不可恢复。')) {
alert('聊天记录已清空');
}
}
// 退出群聊
function leaveGroup() {
if (confirm('确定要退出群聊吗?退出后将不再接收群消息。')) {
alert('已退出群聊');
window.history.back();
}
}</script>
</body>
</html>