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.
 
 

618 lines
18 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;
/* 间距 */
--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;
}
/* 用户信息卡片 */
.user-info-card {
display: flex;
align-items: center;
padding: 20px 16px;
background: var(--youth-bg-card);
margin: 12px 16px 0;
border-radius: 12px;
box-shadow: var(--youth-shadow-card);
cursor: pointer;
transition: opacity 0.15s ease;
}
.user-info-card:active {
opacity: 0.85;
}
.user-avatar-lg {
width: 60px;
height: 60px;
border-radius: 50%;
background: linear-gradient(135deg, #FFD93D, #FF9F45);
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 22px;
font-weight: 700;
flex-shrink: 0;
margin-right: 14px;
position: relative;
}
.user-info-main {
flex: 1;
min-width: 0;
}
.user-name-row {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 4px;
}
.user-name-lg {
font-size: 18px;
font-weight: 700;
color: var(--youth-text-primary);
}
.verified-badge {
display: inline-flex;
align-items: center;
gap: 2px;
padding: 1px 6px;
background: var(--youth-teal-50);
color: var(--youth-primary);
border-radius: 10px;
font-size: 10px;
font-weight: 500;
flex-shrink: 0;
}
.user-id-text {
font-size: 12px;
color: var(--youth-text-tertiary);
margin-bottom: 4px;
}
.user-school {
font-size: 12px;
color: var(--youth-text-secondary);
display: flex;
align-items: center;
gap: 4px;
}
.setting-arrow {
color: var(--youth-text-tertiary);
flex-shrink: 0;
}
/* 设置卡片组 */
.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.blue {
background: #E6F4FF;
color: #1890FF;
}
.setting-icon.orange {
background: var(--youth-orange-50);
color: var(--youth-warning);
}
.setting-icon.danger {
background: #FFE8E8;
color: var(--youth-danger-500);
}
.setting-icon.gray {
background: #F0F1F3;
color: var(--youth-text-secondary);
}
.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;
}
/* 开关 */
.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;
}
/* 危险操作 */
.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);
position: relative;
}
.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);
}
/* 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;
}
</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="user-info-card" data-dom-id="user-info-card" onclick="goToProfile()">
<div class="user-avatar-lg">陈</div>
<div class="user-info-main">
<div class="user-name-row">
<span class="user-name-lg">陈思远</span>
<span class="verified-badge">
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
<polyline points="22 4 12 14.01 9 11.01"></polyline>
</svg>
已认证
</span>
</div>
<div class="user-id-text">青青号:10086233</div>
<div class="user-school">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 21v-7a9 9 0 0 1 18 0v7"></path>
<path d="M7 21V10a5 5 0 0 1 10 0v11"></path>
<path d="M12 3v4"></path>
</svg>
清华大学 · 计算机学院
</div>
</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-group-title">消息设置</div>
<div class="setting-group" data-dom-id="setting-message">
<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="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>
<!-- 聊天设置 -->
<div class="setting-group-title">聊天设置</div>
<div class="setting-group">
<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">
<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">
<div class="setting-label">聊天图片</div>
<div class="setting-value">128张</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-block" onclick="toggleSwitch(this)"></div>
</div>
<div class="setting-item" onclick="goReport()">
<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="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-delete-friend" onclick="deleteFriend()" style="color: var(--youth-text-primary);">删除好友</div>
</div>
<div style="height: 16px;"></div>
</div>
</div>
<script>
// 开关切换
function toggleSwitch(el) {
el.classList.toggle('active');
}
// 返回
function goBack() {
window.history.back();
}
// 跳转用户资料
function goToProfile() {
window.location.href = 'user-profile.html';
}
// 举报
function goReport() {
window.location.href = 'report.html';
}
// 清空聊天记录
function clearChat() {
if (confirm('确定要清空聊天记录吗?清空后不可恢复。')) {
alert('聊天记录已清空');
}
}
// 删除好友
function deleteFriend() {
if (confirm('确定要删除该好友吗?删除后聊天记录将一同清除。')) {
alert('已删除好友');
window.location.href = 'message-list.html';
}
}
</script>
</body>
</html>