From da22814584dd4c02fb0ae3bbc099192252e4e15e Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 1 Nov 2026 22:43:27 +0800 Subject: [PATCH] Polish /social H5: Ways order, dock, mobile sheets, and chat/date touch UX. Add dedicated h5.css so group chat leads CTAs, orbit stays compact on phones, and composer/actions clear the bottom dock. Co-authored-by: Cursor --- src/app/social/layout.tsx | 1 + src/lib/remote-config.ts | 2 + src/modules/social/app/depth.css | 278 +++- src/modules/social/app/h5.css | 1157 +++++++++++++++++ src/modules/social/app/home.css | 45 +- src/modules/social/app/interaction.css | 39 + src/modules/social/app/vivid.css | 145 ++- .../social/components/AttractiveRoster.tsx | 3 + .../social/components/CafeDirectory.tsx | 19 +- .../social/components/ChannelDirectory.tsx | 19 +- .../social/components/ChatWorkspace.tsx | 86 +- .../social/components/CommunityWelcome.tsx | 10 +- .../social/components/ConnectionHero.tsx | 40 +- src/modules/social/components/DateClient.tsx | 102 +- .../social/components/EventDirectory.tsx | 43 +- src/modules/social/components/HomeClient.tsx | 111 +- .../social/components/MeetupLiveClient.tsx | 18 +- .../social/components/PeopleClient.tsx | 10 +- .../social/components/PeopleProfileClient.tsx | 7 +- .../social/components/ProfileStudio.tsx | 24 +- .../social/components/ResourceLibrary.tsx | 170 ++- src/modules/social/components/RoleBoard.tsx | 181 ++- src/modules/social/components/SiteShell.tsx | 2 +- .../social/components/SocialNavigation.tsx | 4 +- .../social/components/SocialQuickRail.tsx | 4 +- src/modules/social/components/SocialUI.tsx | 12 +- src/modules/social/lib/landing.ts | 1 + 27 files changed, 2353 insertions(+), 180 deletions(-) create mode 100644 src/modules/social/app/h5.css diff --git a/src/app/social/layout.tsx b/src/app/social/layout.tsx index d6301fa..217faa9 100644 --- a/src/app/social/layout.tsx +++ b/src/app/social/layout.tsx @@ -11,6 +11,7 @@ import "@social/app/studio.css"; import "@social/app/motion.css"; import "@social/app/depth.css"; import "@social/app/vivid.css"; +import "@social/app/h5.css"; import SocialExperience from "@social/components/SocialExperience"; export const metadata = { diff --git a/src/lib/remote-config.ts b/src/lib/remote-config.ts index 6312d1a..5760118 100644 --- a/src/lib/remote-config.ts +++ b/src/lib/remote-config.ts @@ -155,6 +155,7 @@ export type NomadroRemoteConfig = { meetups?: Array>; gigs?: Array>; }; + socialWayGroup?: string; socialWayChat?: string; socialWayDate?: string; socialWayCafe?: string; @@ -394,6 +395,7 @@ export const DEFAULT_REMOTE_CONFIG: NomadroRemoteConfig = { socialOnlineTitle: "随时,聊得来", socialOfflineTitle: "同城,见一面", socialTeamTitle: "一起,做点事", + socialWayGroup: "群组聊天", socialWayChat: "开视频聊聊", socialWayDate: "认识一下", socialWayCafe: "找个地方见面", diff --git a/src/modules/social/app/depth.css b/src/modules/social/app/depth.css index 36df40f..f763fd3 100644 --- a/src/modules/social/app/depth.css +++ b/src/modules/social/app/depth.css @@ -732,7 +732,7 @@ html[data-theme="light"] .social-ambient { } .social-home .connection-ways { display: grid; - grid-template-columns: repeat(4, minmax(0, 1fr)); + grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: -8px; margin-bottom: 28px; @@ -803,10 +803,13 @@ html[data-theme="light"] .social-ambient { background: linear-gradient(120deg, #7aefe4, #4ecdc4); } -@media (max-width: 900px) { +@media (max-width: 1200px) and (min-width: 901px) { .social-home .connection-ways { - grid-template-columns: repeat(2, minmax(0, 1fr)); + grid-template-columns: repeat(3, minmax(0, 1fr)); } +} + +@media (max-width: 900px) { .social-home .connection-hero { padding-top: 108px; min-height: auto; @@ -820,10 +823,6 @@ html[data-theme="light"] .social-ambient { } @media (max-width: 560px) { - .social-home .connection-ways { - grid-template-columns: 1fr 1fr; - gap: 10px; - } .social-composer-toolbar .social-nick-label { order: 3; width: 100%; @@ -1398,6 +1397,265 @@ html[data-theme="light"] .social-ambient { } } +/* —— Apply / contribute forms —— */ +.social-apply { + display: grid; + gap: 16px; +} +.social-apply-hero { + display: grid; + gap: 8px; + padding: 14px 16px; + border-radius: 16px; + border: 1px solid color-mix(in srgb, var(--sx-mint, #5ce1d6) 28%, transparent); + background: + radial-gradient(circle at 12% 0%, #5ce1d61a, transparent 55%), + color-mix(in srgb, var(--bg-primary) 70%, transparent); +} +.social-apply-hero strong { + font-size: 1.15rem; + letter-spacing: -0.03em; +} +.social-apply-kind { + display: inline-flex; + width: fit-content; + min-height: 26px; + align-items: center; + padding: 0 10px; + border-radius: 999px; + background: #5ce1d61a; + color: var(--sx-mint, #5ce1d6); + font-size: 11px; + font-weight: 650; +} +.social-apply-progress { + display: grid; + gap: 8px; +} +.social-apply-progress-track { + display: block; + height: 8px; + border-radius: 999px; + background: #ffffff10; + overflow: hidden; +} +.social-apply-progress-track > i { + display: block; + height: 100%; + border-radius: inherit; + background: linear-gradient(90deg, #5ce1d6, #ffe66d); + transition: width 0.35s ease; +} +.social-apply-progress > small { + font-size: 12px; + color: var(--text-muted); +} +.social-apply-prompts { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-top: 8px; +} +.social-apply-chip { + border: 1px solid #ffffff18; + background: #ffffff08; + color: var(--text-secondary); + border-radius: 999px; + min-height: 32px; + padding: 0 12px; + font: inherit; + font-size: 12px; + cursor: pointer; +} +.social-apply-chip:hover { + border-color: #5ce1d644; + color: #5ce1d6; +} +.social-apply-done { + display: grid; + gap: 12px; + justify-items: start; + padding: 8px 2px 4px; +} +.social-apply-done-mark { + display: grid; + place-items: center; + width: 48px; + height: 48px; + border-radius: 16px; + background: #5ce1d622; + color: #5ce1d6; +} +.social-apply-done strong { + font-size: 1.2rem; + letter-spacing: -0.03em; +} +.social-apply-summary { + display: flex; + flex-wrap: wrap; + gap: 8px; + align-items: center; + padding: 10px 12px; + border-radius: 12px; + background: #ffffff08; + border: 1px solid #ffffff12; +} +.social-apply-summary em { + font-style: normal; + font-weight: 650; +} +.social-contribute-btn { + margin-left: auto; +} +.social-event-bars { + gap: 4px !important; + height: 64px !important; +} +.social-event-bars i { + display: block; + width: 3px; + border-radius: 2px; + opacity: 1 !important; + background: linear-gradient(to top, #4ecdc41f, #4ecdc4a3) !important; + animation: connection-audio 1.55s ease-in-out infinite !important; +} +.social-event-card.event-1 .social-event-bars i { + background: linear-gradient(to top, #ff6b6b1f, #ff6b6ba3) !important; +} +.social-event-art.is-live { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 12px; +} +.social-event-art.is-live .social-video-grid { + margin-left: auto; +} +.social-event-body .social-meetup-faces { + margin: 0 0 10px; +} +.social-event-body .social-meetup-faces > * { + border-color: #0c0c0f; +} +.social-live-faces { + justify-content: center; + margin: 14px 0 18px; +} +.social-live-faces > em { + color: #7aefe4; +} +.social-date-hint.is-alive { + display: flex; + align-items: center; + justify-content: center; + gap: 14px; + flex-wrap: wrap; +} +.social-date-hint-side { + font-weight: 650; + font-size: 12px; +} +.social-date-hint-side.pass { + color: #94a3b8; + animation: social-date-hint-nudge 2.4s ease-in-out infinite; +} +.social-date-hint-side.like { + color: #ff8f8f; + animation: social-date-hint-nudge 2.4s ease-in-out infinite 0.35s; +} +.social-date-actions.is-alive .social-date-act.like:not(:disabled) { + animation: social-date-act-glow 2.6s ease-in-out infinite; +} +@keyframes social-date-hint-nudge { + 0%, + 100% { + opacity: 0.55; + transform: translateX(0); + } + 50% { + opacity: 1; + transform: translateX(3px); + } +} +@keyframes social-date-act-glow { + 0%, + 100% { + box-shadow: 0 0 0 0 #ff6b6b00; + } + 50% { + box-shadow: 0 0 0 8px #ff6b6b18; + } +} + +.social-profile-meter { + margin-left: auto; + font-size: 12px; + font-weight: 700; + color: #7aefe4; +} +.social-chat-bar-tools { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; +} +.social-chat-presence { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 12px; + margin: 0 16px 10px; + padding: 10px 14px; + border-radius: 16px; + border: 1px solid #5ce1d628; + background: + radial-gradient(circle at 0% 50%, #5ce1d618, transparent 45%), + color-mix(in srgb, var(--sx-glass, #12141a) 88%, transparent); +} +.social-chat-presence-avs { + display: flex; +} +.social-chat-presence-avs > * { + margin-left: -8px; + border: 2px solid #0c0c0f; + border-radius: 999px; +} +.social-chat-presence-avs > *:first-child { + margin-left: 0; +} +.social-chat-presence > p { + display: inline-flex; + align-items: center; + gap: 6px; + margin: 0; + font-size: 12px; + color: var(--text-muted); +} +.social-chat-presence > p strong { + color: #7aefe4; +} +.social-chat-presence-link { + margin-left: auto; + font-size: 12px; + font-weight: 650; + color: #7aefe4; + text-decoration: none; +} +.social-chat-presence-link:hover { + text-decoration: underline; +} +@media (max-width: 720px) { + .social-chat-presence { + margin: 0 10px 8px; + } + .social-chat-presence-link { + margin-left: 0; + } + .social-chat-bar-tools { + width: 100%; + } +} + @media (prefers-reduced-motion: reduce) { .social-workspace .social-card, .social-workspace .social-panel, @@ -1413,7 +1671,9 @@ html[data-theme="light"] .social-ambient { .social-people-chip:hover { transform: none; } - .social-live-radar i { - animation: none; + .social-live-radar i, + .social-date-hint-side, + .social-date-actions.is-alive .social-date-act.like { + animation: none !important; } } diff --git a/src/modules/social/app/h5.css b/src/modules/social/app/h5.css new file mode 100644 index 0000000..72861e9 --- /dev/null +++ b/src/modules/social/app/h5.css @@ -0,0 +1,1157 @@ +/* Social H5 — clean mobile adaptation (load last). ≤900px */ + +@media (max-width: 900px) { + /* —— Basics —— */ + .social-home, + .social-workspace, + .social-live-root, + .social-date-root { + -webkit-tap-highlight-color: transparent; + } + + /* iOS: avoid input zoom */ + .social-form input, + .social-form textarea, + .social-form select, + .social-select, + .social-nick-label input, + .social-live-nick input, + .social-chat-composer textarea, + .social-join-field input, + .social-search input, + input[type="search"], + input[type="text"], + input[type="email"], + textarea { + font-size: 16px; + } + + /* —— Ways: clear full-width list (not carousel) —— */ + .social-home .connection-ways, + .connection-ways { + display: grid !important; + grid-template-columns: 1fr !important; + gap: 8px !important; + overflow: visible !important; + margin: 4px 0 16px !important; + padding: 0 14px !important; + scroll-snap-type: none !important; + } + .social-home .connection-ways::before { + content: "选一种方式开始"; + display: block; + grid-column: 1 / -1; + margin: 0 2px 2px; + font-size: 11px; + font-weight: 600; + letter-spacing: 0.04em; + color: color-mix(in srgb, var(--text-primary, #111) 48%, transparent); + } + .social-home .connection-way, + .connection-way { + flex: none !important; + width: 100%; + min-height: 64px; + padding: 14px 14px; + border-radius: 16px; + gap: 12px; + background: color-mix(in srgb, var(--bg-card, #fff) 92%, transparent); + border: 1px solid color-mix(in srgb, var(--text-primary, #111) 10%, transparent); + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); + } + html[data-theme="dark"] .social-home .connection-way, + html[data-theme="dark"] .connection-way { + background: color-mix(in srgb, var(--sx-glass, #12141a) 92%, transparent); + border-color: var(--connection-border, #ffffff18); + box-shadow: none; + } + .connection-way-icon { + width: 40px; + height: 40px; + } + .connection-way-index { + font-size: 48px; + top: -4px; + right: 40px; + opacity: 0.05; + } + .connection-way-copy { + flex: 1; + min-width: 0; + } + .connection-way-copy strong { + font-size: 15px; + letter-spacing: -0.02em; + } + .connection-way-copy small { + margin-top: 2px; + font-size: 12px; + line-height: 1.4; + } + .connection-way-copy em { + display: none; /* keep mobile row compact; arrow is enough */ + } + .connection-way-arrow { + flex-shrink: 0; + } + + /* —— Hero —— */ + .social-home .connection-hero { + padding-top: calc(68px + env(safe-area-inset-top, 0px)); + padding-bottom: 8px; + min-height: auto; + } + .social-home .social-emoji-field { + display: none; /* quieter fold on phone */ + } + .social-home .connection-eyebrow { + font-size: 11px; + margin-bottom: 10px; + } + .social-home .connection-copy h1 { + font-size: clamp(26px, 7.2vw, 34px); + line-height: 1.18; + margin-bottom: 10px; + } + .social-home .connection-description { + font-size: 13px; + line-height: 1.55; + max-width: none; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + margin-bottom: 14px; + } + .social-home .connection-actions { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 8px; + align-items: stretch; + } + .social-home .connection-actions .connection-join, + .social-home .connection-actions .btn { + grid-column: 1 / -1; + width: 100%; + min-height: 48px; + justify-content: center; + gap: 10px; + padding-inline: 16px; + font-size: 15px; + } + .social-home .connection-actions .connection-film { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 8px; + width: 100%; + min-height: 44px; + padding: 0 10px; + border-radius: 12px; + border: 1px solid color-mix(in srgb, var(--text-primary, #111) 12%, transparent); + background: color-mix(in srgb, var(--bg-card, #fff) 80%, transparent); + color: var(--text-primary, #1a1a1a); + font-size: 13px; + font-weight: 600; + } + /* 群组聊天 | 认识一下 side-by-side; story demoted */ + .social-home .connection-actions .connection-film-story { + grid-column: 1 / -1; + min-height: 40px; + border: 0; + background: transparent; + color: color-mix(in srgb, var(--text-primary, #111) 62%, transparent); + font-weight: 500; + font-size: 12px; + justify-content: flex-start; + padding-inline: 4px; + box-shadow: none; + } + + /* —— Hero universe: compact, don’t eat the fold —— */ + .social-home .connection-universe { + max-width: 100%; + max-height: 220px; + margin: 2px auto 0; + transform: none !important; + overflow: hidden; + } + .social-home .connection-orbit-scene { + aspect-ratio: 1.35 / 1; + max-height: 180px; + margin-inline: auto; + } + .social-home .connection-person { + min-width: 88px; + transform: scale(0.78); + } + .social-home .connection-person strong { + font-size: 11px; + } + .social-home .connection-person span, + .social-home .connection-person small { + font-size: 9px; + } + .social-home .connection-universe-label, + .social-home .connection-universe-footer { + font-size: 10px; + } + .social-home .connection-scroll-hint { + margin-top: 4px; + font-size: 11px; + } + .social-home .connection-proof { + margin-top: 12px; + gap: 8px; + } + .social-home .connection-proof strong { + font-size: 12px; + } + .social-home .connection-proof span { + font-size: 11px; + } + .social-home .connection-hero-bottom { + margin-top: 4px; + } + + /* —— Path chips —— */ + .social-home .social-path { + position: sticky; + top: calc(52px + env(safe-area-inset-top, 0px)); + z-index: 30; + margin: 0 0 10px; + padding: 6px 0; + background: color-mix(in srgb, var(--bg-body, #f7f8fa) 88%, transparent); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + } + html[data-theme="dark"] .social-home .social-path { + background: color-mix(in srgb, #0c0c0f 88%, transparent); + } + .social-home .social-path .container { + padding-inline: 12px; + } + .social-home .social-path-track { + gap: 6px; + padding: 4px; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + scrollbar-width: none; + } + .social-home .social-path-track::-webkit-scrollbar { + display: none; + } + .social-home .social-path-link { + flex: 0 0 auto; + min-height: 36px; + padding: 0 11px; + font-size: 12px; + } + + /* —— Sections —— */ + .social-home .section.section-compact { + padding-block: 28px; + } + .social-home .container { + padding-inline: 14px; + } + .social-home .section-header h2 { + font-size: clamp(22px, 6vw, 28px); + } + .social-home .section-header > p { + font-size: 13px; + line-height: 1.6; + } + + /* —— Date hero —— */ + .social-home .social-date-hero { + display: grid; + grid-template-columns: 1fr; + gap: 16px; + padding: 18px 14px 20px; + border-radius: 20px; + } + .social-home .social-date-hero-copy h2 { + font-size: clamp(22px, 6vw, 28px); + margin: 8px 0 10px; + } + .social-home .social-date-hero-copy > p { + font-size: 13px; + margin-bottom: 12px; + } + .social-home .social-date-hero-steps { + gap: 8px; + margin-bottom: 14px; + } + .social-home .social-date-hero-steps li { + min-height: 36px; + font-size: 12px; + padding: 0 10px; + } + .social-date-stage-acts { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + .social-date-stage-acts .btn { + min-height: 44px; + flex: 1 1 auto; + justify-content: center; + } + .social-home .social-date-hero-deck { + min-height: 320px; + margin: 0 auto; + width: 100%; + } + .social-home .social-date-hero-card { + width: min(230px, 72%); + } + .social-home .social-date-hero-cta { + right: 50%; + bottom: 8px; + transform: translateX(50%); + min-height: 36px; + } + .social-home .social-date-hero-deck::before, + .social-home .social-date-hero-deck::after { + width: 32px; + height: 32px; + font-size: 12px; + } + + /* —— Meetup / team panels —— */ + .social-panel-grid, + .social-panel-grid-2, + .social-panel-grid-3 { + grid-template-columns: 1fr !important; + gap: 12px; + } + .social-home .social-panel { + padding: 18px 16px; + border-radius: 18px; + } + .connection-meetup-art { + min-height: 72px; + padding-bottom: 12px; + } + .connection-meetup-number { + font-size: 48px; + } + .connection-audio-bars, + .social-event-bars { + height: 48px; + gap: 3px; + opacity: 1; + visibility: visible; + } + .social-event-art .connection-audio-bars i, + .social-event-bars i { + min-width: 3px; + border-radius: 2px; + } + .social-event-art { + min-height: 120px; + } + .social-event-cta { + margin-top: 8px; + } + .social-event-cta .social-btn { + min-height: 44px; + } + .social-video-grid { + grid-template-columns: repeat(2, 32px); + gap: 4px; + } + .social-video-tile { + width: 32px; + height: 32px; + border-radius: 8px; + } + .social-meetup-faces { + margin: 4px 0 10px; + } + .social-home .social-panel .btn { + width: 100%; + min-height: 44px; + justify-content: center; + margin-top: 10px; + } + .social-home .social-section-actions { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-top: 14px; + } + .social-home .social-section-actions .btn { + flex: 1 1 calc(50% - 8px); + min-height: 44px; + justify-content: center; + } + + /* —— People —— */ + .social-people-bar { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 10px; + padding: 12px; + border-radius: 16px; + } + .social-people-bar .btn { + margin-left: auto; + min-height: 40px; + } + .social-people-filters { + display: flex; + gap: 8px; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + scrollbar-width: none; + margin-bottom: 12px; + } + .social-people-filters::-webkit-scrollbar { + display: none; + } + .social-people-filter { + flex: 0 0 auto; + min-height: 40px; + padding: 0 14px; + } + .social-people-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 10px; + } + .social-people-chip { + min-height: 96px; + padding: 12px 10px 14px; + border-radius: 16px; + } + .social-people-chip-ava { + width: 44px; + height: 44px; + } + .social-people-chip-want { + font-size: 11px; + line-height: 1.35; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + } + .social-people-chip-like { + width: 40px; + height: 40px; + } + .social-people-hint { + margin: 12px 0 8px; + font-size: 12px; + } + + /* —— UGC / cities —— */ + .social-ugc-row { + grid-template-columns: 1fr !important; + gap: 10px; + } + .social-ugc-card { + padding: 14px; + border-radius: 16px; + min-height: 72px; + } + .social-city-grid, + .social-city-dir.is-compact .social-city-grid { + grid-template-columns: 1fr 1fr; + gap: 10px; + } + .social-city-card { + padding: 12px; + border-radius: 14px; + } + .social-together-tabs { + margin-bottom: 12px; + } + + /* —— Invite / footer —— */ + .social-home .connection-invite { + margin: 24px 14px 32px; + padding: 22px 18px; + border-radius: 20px; + display: grid; + gap: 14px; + } + .social-home .connection-invite .btn, + .social-home .connection-invite .connection-join { + width: 100%; + min-height: 48px; + justify-content: center; + } + .footer-grid-rings { + grid-template-columns: 1fr !important; + gap: 20px; + } + + /* —— Workspace pages —— */ + .social-workspace { + padding: 12px 12px calc(96px + env(safe-area-inset-bottom, 0px)); + } + .social-toolbar { + display: flex; + flex-direction: column; + gap: 10px; + } + .social-filters { + display: flex; + gap: 8px; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + scrollbar-width: none; + } + .social-filters::-webkit-scrollbar { + display: none; + } + .social-filters button, + .social-filters .social-btn { + flex: 0 0 auto; + min-height: 40px; + } + .social-grid, + .social-role-grid, + .social-library-grid, + .social-event-grid, + .social-onboarding-grid { + grid-template-columns: 1fr !important; + gap: 12px; + } + .social-event-cta, + .social-card-actions { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + .social-event-cta .social-btn, + .social-card-actions .social-btn { + flex: 1 1 auto; + min-height: 44px; + justify-content: center; + } + .social-actions { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + .social-actions .social-btn { + min-height: 44px; + } + .social-role-card > .social-btn, + .social-library-card .social-btn { + width: 100%; + min-height: 48px; + justify-content: center; + } + .social-apply-form .social-btn.primary, + .social-form .social-btn.primary { + width: 100%; + min-height: 48px; + justify-content: center; + } + .social-apply-progress { + margin-bottom: 4px; + } + .social-page-intro .social-actions { + width: 100%; + } + .social-page-intro .social-actions .social-btn { + flex: 1 1 auto; + justify-content: center; + } + .social-people-cta-bar { + position: sticky; + bottom: calc(72px + env(safe-area-inset-bottom, 0px)); + z-index: 25; + display: grid !important; + grid-template-columns: 1fr 1fr; + gap: 8px; + margin: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); + padding: 10px; + border-radius: 16px; + background: color-mix(in srgb, var(--bg-card, #fff) 92%, transparent); + border: 1px solid color-mix(in srgb, var(--text-primary, #111) 10%, transparent); + box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); + } + .social-people-cta-bar .social-btn { + width: 100%; + min-height: 44px; + justify-content: center; + margin: 0; + font-size: 13px; + } + .social-profile-studio { + grid-template-columns: 1fr !important; + } + .social-profile-actions { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + .social-profile-actions .social-btn { + flex: 1 1 calc(50% - 8px); + min-height: 44px; + justify-content: center; + } + + /* —— Dialogs: bottom sheet —— */ + .social-dialog { + width: 100%; + max-width: 100vw; + margin: 0; + padding: 0; + border: 0; + background: transparent; + } + .social-dialog[open] { + display: flex; + align-items: flex-end; + } + .social-dialog-sheet { + width: 100%; + max-height: min(86dvh, 720px); + border-radius: 20px 20px 0 0; + display: flex; + flex-direction: column; + overflow: hidden; + } + .social-dialog-sheet header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + min-height: 52px; + padding: 12px 16px; + flex-shrink: 0; + } + .social-dialog-sheet header h2 { + font-size: 1rem; + margin: 0; + } + .social-dialog-sheet header button { + width: 40px; + height: 40px; + border: 0; + border-radius: 10px; + background: #ffffff12; + color: inherit; + display: grid; + place-items: center; + } + .social-dialog-body { + overflow: auto; + -webkit-overflow-scrolling: touch; + padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); + } + .social-join-sheet { + width: 100%; + max-width: none; + border-radius: 20px 20px 0 0; + padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); + } + .social-join-title { + font-size: 1.25rem; + margin: 4px 0 8px; + } + .social-join-field { + margin-top: 14px; + } + .social-join-field input { + min-height: 48px; + font-size: 16px; + } + .social-join-submit { + width: 100%; + min-height: 52px; + justify-content: center; + gap: 8px; + } + .social-join-privacy { + margin-top: 10px; + font-size: 11px; + } + .social-join-paths { + display: grid; + grid-template-columns: 1fr; + gap: 12px; + } + .social-join-path .social-btn, + .social-join-path .btn { + width: 100%; + min-height: 48px; + justify-content: center; + } + + /* —— Date swipe —— */ + .social-date-root { + min-height: 100dvh; + padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); + } + .social-date-root .social-date-bar { + padding: 10px 12px; + gap: 8px; + } + .social-date-root .social-date-bar .social-demo-badge, + .social-date-root .DemoBadge { + display: none; + } + .social-date-root .social-live-bar-main > div > p { + font-size: 11px; + } + .social-date-root .social-date-bar-tools { + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + gap: 8px; + } + .social-date-root .social-date-stage { + padding: 4px 12px 0; + } + .social-date-root .social-date-progress { + margin: 0 12px 8px; + height: 4px; + border-radius: 999px; + } + .social-date-root .social-date-deck { + width: 100%; + max-width: 420px; + margin-inline: auto; + height: min(52dvh, 480px); + min-height: 300px; + } + .social-date-card.is-top { + touch-action: none; + } + .social-date-root .social-date-hint, + .social-date-hint.is-alive { + display: none !important; + } + .social-date-root .social-date-actions { + gap: 18px; + padding: 10px 16px 4px; + margin-bottom: 0; + justify-content: center; + } + .social-date-root .social-fx-control { + display: none; + } + .social-date-root .social-date-act { + width: 56px; + height: 56px; + box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12); + } + .social-date-root .social-date-act.like { + width: 66px; + height: 66px; + } + .social-date-root .social-date-bar-tools .social-filters { + flex: 1; + min-width: 0; + } + .social-date-root .social-date-bar-tools .social-btn { + flex: 0 0 auto; + min-height: 36px; + padding-inline: 12px; + } + .social-date-root .social-date-likes { + margin: 8px 12px 0; + min-height: 48px; + border-radius: 14px; + font-size: 12px; + } + .social-date-toast { + left: 50%; + right: auto; + bottom: calc(92px + env(safe-area-inset-bottom, 0px)); + transform: translateX(-50%); + max-width: calc(100% - 32px); + padding: 10px 14px; + border-radius: 999px; + font-size: 13px; + } + .social-date-empty { + padding: 28px 16px; + text-align: center; + } + .social-date-empty .social-btn { + width: min(100%, 280px); + min-height: 44px; + justify-content: center; + } + .social-date-match-list { + display: grid; + gap: 10px; + } + .social-date-match-row { + display: grid; + grid-template-columns: auto 1fr; + gap: 8px 10px; + align-items: center; + padding: 10px; + border-radius: 14px; + background: #ffffff08; + } + .social-date-match-row .social-btn { + min-height: 40px; + } + + /* —— Chat —— */ + .social-chat-live { + min-height: 100dvh; + display: flex; + flex-direction: column; + padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); + } + .social-chat-live-bar { + padding: 8px 12px; + gap: 6px; + } + .social-chat-live-bar .social-live-bar-main > div > strong { + font-size: 16px; + } + .social-chat-live-bar .social-muted { + font-size: 11px; + } + .social-chat-bar-tools { + display: flex; + flex-wrap: nowrap; + gap: 6px; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + scrollbar-width: none; + } + .social-chat-bar-tools::-webkit-scrollbar { + display: none; + } + .social-chat-bar-tools .social-btn { + flex: 0 0 auto; + min-height: 34px; + padding-inline: 10px; + font-size: 12px; + } + .social-chat-live-bar .social-demo-badge { + display: none; + } + .social-chat-presence { + margin: 0 12px 6px; + padding: 6px 10px; + border-radius: 12px; + gap: 8px; + } + .social-chat-presence > p { + font-size: 11px; + } + .social-chat-live .social-connection-status { + margin: 0 12px 6px; + min-height: 28px; + font-size: 11px; + } + .social-chat-live .social-live-stage { + flex: 1; + min-height: 0; + } + .social-chat-live .social-conversation { + height: 100%; + display: flex; + flex-direction: column; + border-radius: 0; + border-left: 0; + border-right: 0; + } + .social-chat-live .social-conversation-top { + display: none; /* bar already shows room title */ + } + .social-chat-live .social-thread-wrap, + .social-chat-live .social-chat-thread { + flex: 1; + min-height: 180px; + } + .social-chat-live .social-chat-composer { + flex-shrink: 0; + padding: 8px 12px 10px; + border-top: 1px solid color-mix(in srgb, var(--text-primary, #111) 10%, transparent); + background: color-mix(in srgb, var(--bg-card, #fff) 94%, transparent); + margin-bottom: calc(var(--vv-offset, 0px)); + position: relative; + z-index: 20; + } + html[data-theme="dark"] .social-chat-live .social-chat-composer { + background: #0b121c; + border-top-color: #ffffff14; + } + .social-chat-composer textarea { + min-height: 44px; + max-height: 100px; + } + .social-composer-toolbar { + gap: 8px; + align-items: center; + } + .social-composer-toolbar .social-nick-label { + display: none; /* keep composer clean on H5; nick stays in storage */ + } + .social-composer-toolbar small { + display: none; + } + .social-composer-toolbar .social-btn.primary { + min-height: 44px; + min-width: 88px; + margin-left: auto; + } + .social-composer-emoji { + width: 44px; + height: 44px; + flex: 0 0 auto; + } + .social-emoji-picker { + display: grid; + grid-template-columns: repeat(8, 1fr); + gap: 4px; + max-height: 140px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + padding: 8px; + margin-bottom: 6px; + border-radius: 12px; + } + .social-emoji-picker button { + min-width: 36px; + min-height: 36px; + font-size: 20px; + } + .social-reply-chip { + margin-bottom: 6px; + font-size: 12px; + } + .social-jump-latest { + bottom: calc(120px + env(safe-area-inset-bottom, 0px)); + min-height: 36px; + padding-inline: 12px; + } + .social-chat-starters { + display: grid; + gap: 8px; + } + .social-chat-starters .social-btn { + width: 100%; + min-height: 44px; + justify-content: flex-start; + text-align: left; + white-space: normal; + } + .social-message { + max-width: 92%; + gap: 8px; + } + .social-chat-thread { + gap: 10px; + padding: 8px 12px 12px; + } + .social-message-avatar { + width: 28px; + height: 28px; + border-radius: 9px; + font-size: 12px; + } + .social-message-body header { + margin-bottom: 4px; + gap: 6px; + } + .social-message-body > p { + padding: 10px 12px; + font-size: 14px; + line-height: 1.55; + } + .social-message-tools { + gap: 6px; + margin-top: 4px; + } + .social-message-tools button { + min-height: 32px; + padding-inline: 8px; + font-size: 11px; + } + + /* —— Meetup live —— */ + .social-meetup-live { + padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); + } + .social-live-bar { + padding: 10px 12px; + } + .social-live-bar-tools { + width: 100%; + } + .social-live-tabs { + display: grid; + grid-template-columns: repeat(3, 1fr); + width: 100%; + } + .social-live-tab { + min-height: 40px; + } + .social-live-gate { + padding: 28px 16px; + text-align: center; + } + .social-live-gate .social-btn.primary { + width: min(100%, 280px); + min-height: 48px; + justify-content: center; + } + + /* —— Dock / nav —— */ + .social-mobile-dock { + left: 10px; + right: 10px; + bottom: calc(8px + env(safe-area-inset-bottom, 0px)); + padding: 4px 6px; + border-radius: 18px; + z-index: 60; + } + .social-mobile-dock a { + min-height: 50px; + gap: 2px; + font-size: 10px; + border-radius: 14px; + } + .social-mobile-dock a[aria-current="page"] { + background: color-mix(in srgb, var(--sx-mint, #4ecdc4) 14%, transparent); + color: var(--sx-mint, #0f766e); + } + + /* —— Profile / forms —— */ + .social-profile-studio { + display: grid; + gap: 12px; + padding-bottom: 12px; + } + .social-profile-studio .social-form-grid { + grid-template-columns: 1fr; + gap: 12px; + } + .social-profile-studio .social-btn.primary { + width: 100%; + min-height: 48px; + justify-content: center; + } + .social-publish-toggle { + display: flex; + align-items: flex-start; + gap: 10px; + padding: 12px; + border-radius: 14px; + background: color-mix(in srgb, var(--bg-card, #fff) 80%, transparent); + border: 1px solid color-mix(in srgb, var(--text-primary, #111) 8%, transparent); + font-size: 13px; + line-height: 1.45; + } + .social-publish-toggle input { + width: 20px; + height: 20px; + margin-top: 2px; + flex-shrink: 0; + } + .social-profile-preview { + order: -1; /* preview first on phone so users see result while editing */ + } + .social-member-grid { + grid-template-columns: 1fr; + gap: 10px; + } + .social-member-card { + padding: 12px; + border-radius: 16px; + } + .social-member-card .social-btn { + min-height: 40px; + } + .social-workspace { + padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); + } + .social-page-intro { + padding: 12px 14px 8px; + } + .social-page-intro h1 { + font-size: clamp(22px, 6vw, 28px); + } + .social-home .social-fx-control, + .social-workspace .social-fx-control { + bottom: calc(78px + env(safe-area-inset-bottom, 0px)); + right: 12px; + width: 44px; + height: 44px; + } + .social-home .navbar, + .social-workspace .navbar { + padding-top: env(safe-area-inset-top, 0px); + } + .social-home .nav-container, + .social-workspace .nav-container { + min-height: 52px; + } + .nav-group-btn { + min-height: 48px; + } + .nav-group-panel a { + min-height: 44px; + display: flex; + align-items: center; + } + .social-nav-join { + min-height: 48px; + width: 100%; + justify-content: center; + } + + /* —— Quick rail —— */ + .social-quick-rail-track { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + scrollbar-width: none; + gap: 6px; + padding: 6px; + } + .social-quick-rail-track::-webkit-scrollbar { + display: none; + } + .social-quick-chip { + flex: 0 0 auto; + min-height: 40px; + } +} + +@media (max-width: 420px) { + .social-city-grid, + .social-city-dir.is-compact .social-city-grid { + grid-template-columns: 1fr; + } + .social-home .social-date-hero-card { + width: min(210px, 78%); + } + .social-people-bar .btn { + width: 100%; + margin-left: 0; + } + /* Phone: drop heavy orbit so Ways enters first viewport */ + .social-home .connection-universe { + max-height: none; + overflow: visible; + margin-top: 2px; + } + .social-home .connection-orbit-scene, + .social-home .connection-universe-label, + .social-home .connection-universe-footer, + .social-home .connection-hero-bottom .connection-scroll-hint { + display: none !important; + } + .social-home .connection-proof { + margin-top: 8px; + margin-bottom: 4px; + } +} diff --git a/src/modules/social/app/home.css b/src/modules/social/app/home.css index dd02d49..4789cc0 100644 --- a/src/modules/social/app/home.css +++ b/src/modules/social/app/home.css @@ -594,7 +594,7 @@ position: relative; z-index: 1; display: grid; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 40px; } @@ -1022,11 +1022,40 @@ display: flex; align-items: center; justify-content: space-between; + gap: 10px; min-height: 88px; padding-bottom: 18px; margin-bottom: 10px; color: var(--connection-mint); } +.connection-meetup-art.is-live { + flex-wrap: wrap; + min-height: 108px; +} +.connection-meetup-art.is-live .social-video-grid { + margin-left: auto; +} +.social-meetup-faces { + display: flex; + align-items: center; + gap: 0; + margin: 2px 0 8px; +} +.social-meetup-faces > * { + margin-left: -6px; + border: 2px solid color-mix(in srgb, var(--connection-surface, #12141a) 90%, #000); + border-radius: 999px; +} +.social-meetup-faces > *:first-child { + margin-left: 0; +} +.social-meetup-faces > em { + margin-left: 8px; + font-style: normal; + font-size: 11px; + font-weight: 600; + color: var(--panel-accent, var(--connection-mint)); +} .connection-meetup-number { font-family: var(--font-display); font-size: 62px; @@ -1048,11 +1077,11 @@ border-radius: 2px; background: linear-gradient(to top, #4ecdc41f, #4ecdc4a3); transform-origin: center; - animation: connection-audio 2s ease-in-out infinite; - animation-play-state: paused; + animation: connection-audio 1.55s ease-in-out infinite; + animation-play-state: running; } .social-panel:hover .connection-audio-bars i { - animation-play-state: running; + animation-duration: 1.05s; } .social-home #meetup .social-panel:nth-child(2) { --panel-accent: var(--connection-coral); @@ -1633,13 +1662,11 @@ display: none; } .connection-ways { - grid-template-columns: repeat(2, 1fr); - gap: 8px; - margin-bottom: 30px; + margin-bottom: 24px; } .connection-way { - min-height: 72px; - padding: 14px 14px; + min-height: 64px; + padding: 14px; gap: 12px; } .connection-way-icon { diff --git a/src/modules/social/app/interaction.css b/src/modules/social/app/interaction.css index 1e319fb..f70d099 100644 --- a/src/modules/social/app/interaction.css +++ b/src/modules/social/app/interaction.css @@ -1363,6 +1363,45 @@ background: rgba(255, 107, 107, 0.12); transform: rotate(12deg); } +.social-date-photo-dots { + position: absolute; + top: 10px; + left: 50%; + z-index: 4; + display: flex; + gap: 5px; + transform: translateX(-50%); + pointer-events: none; +} +.social-date-photo-dots i { + width: 28px; + height: 3px; + border-radius: 999px; + background: #ffffff44; +} +.social-date-photo-dots i.is-on { + background: #fff; +} +.social-date-photo-hit { + position: absolute; + top: 0; + z-index: 5; + width: 28%; + height: 42%; + border: 0; + padding: 0; + background: transparent; + cursor: pointer; +} +.social-date-photo-hit.is-prev { + left: 0; +} +.social-date-photo-hit.is-next { + right: 0; +} +.social-date-photo-hit:disabled { + cursor: default; +} .social-date-online-pill { position: absolute; top: 18px; diff --git a/src/modules/social/app/vivid.css b/src/modules/social/app/vivid.css index 52f9446..15ca56d 100644 --- a/src/modules/social/app/vivid.css +++ b/src/modules/social/app/vivid.css @@ -71,6 +71,20 @@ margin-top: 8px; margin-bottom: 36px; } +.social-home .connection-ways.is-alive .connection-way { + animation: social-way-in 0.55s ease both; + animation-delay: var(--stagger, 0ms); +} +@keyframes social-way-in { + from { + opacity: 0; + transform: translateY(12px); + } + to { + opacity: 1; + transform: none; + } +} .social-home .connection-way { position: relative; min-height: 128px; @@ -530,6 +544,132 @@ html[data-theme="light"] .social-workspace .nav-group-panel { transform: translate(-50%, calc(-50% - 8px)) rotate(-2deg) scale(1.03); box-shadow: 0 28px 60px #ff6b6b33; } +.social-home .social-date-hero.is-alive .social-date-hero-card-0 { + animation: social-date-hero-float 4.2s ease-in-out infinite; +} +.social-home .social-date-hero.is-alive .social-date-hero-card-1 { + animation: social-date-hero-sway-l 5s ease-in-out infinite; +} +.social-home .social-date-hero.is-alive .social-date-hero-card-2 { + animation: social-date-hero-sway-r 5.4s ease-in-out infinite; +} +.social-home .social-date-hero.is-alive .social-date-hero-cta { + animation: social-date-hero-cta-pulse 2.2s ease-in-out infinite; +} +.social-home .social-date-hero.is-alive .social-date-hero-steps li { + animation: social-date-hero-chip 3.6s ease-in-out infinite; +} +.social-home .social-date-hero.is-alive .social-date-hero-steps li:nth-child(2) { + animation-delay: 0.35s; +} +.social-home .social-date-hero.is-alive .social-date-hero-steps li:nth-child(3) { + animation-delay: 0.7s; +} +.social-home .social-date-hero-deck::before, +.social-home .social-date-hero-deck::after { + content: "←"; + position: absolute; + top: 46%; + z-index: 4; + width: 36px; + height: 36px; + display: grid; + place-items: center; + border-radius: 999px; + border: 1px solid #ff7a7244; + background: #ff7a7222; + color: #ffb4b0; + font-size: 14px; + font-weight: 700; + pointer-events: none; + opacity: 0.55; + animation: social-date-hero-hint 2.8s ease-in-out infinite; +} +.social-home .social-date-hero-deck::before { + left: 4%; + content: "←"; +} +.social-home .social-date-hero-deck::after { + right: 4%; + content: "→"; + animation-delay: 0.4s; + border-color: #4ecdc444; + background: #4ecdc422; + color: #7aefe4; +} +@keyframes social-date-hero-float { + 0%, + 100% { + transform: translate(-50%, -50%) translateX(calc((0 - 1) * 34px)) + rotate(-6deg) translateY(0); + } + 50% { + transform: translate(-50%, -50%) translateX(calc((0 - 1) * 34px)) + rotate(-3deg) translateY(-10px); + } +} +@keyframes social-date-hero-sway-l { + 0%, + 100% { + transform: translate(-50%, -50%) translateX(0) rotate(0deg); + } + 50% { + transform: translate(-50%, -50%) translateX(-6px) rotate(-2deg); + } +} +@keyframes social-date-hero-sway-r { + 0%, + 100% { + transform: translate(-50%, -50%) translateX(34px) rotate(6deg); + } + 50% { + transform: translate(-50%, -50%) translateX(40px) rotate(8deg); + } +} +@keyframes social-date-hero-cta-pulse { + 0%, + 100% { + transform: scale(1); + box-shadow: 0 10px 24px #ff6b6b44; + } + 50% { + transform: scale(1.06); + box-shadow: 0 14px 32px #ff6b6b66; + } +} +@keyframes social-date-hero-chip { + 0%, + 100% { + transform: translateY(0); + border-color: #ff7a7233; + } + 50% { + transform: translateY(-2px); + border-color: #ff7a7266; + } +} +@keyframes social-date-hero-hint { + 0%, + 100% { + opacity: 0.35; + transform: translateY(-50%) scale(0.95); + } + 50% { + opacity: 0.85; + transform: translateY(-50%) scale(1.05); + } +} +@media (prefers-reduced-motion: reduce) { + .social-home .social-date-hero.is-alive .social-date-hero-card-0, + .social-home .social-date-hero.is-alive .social-date-hero-card-1, + .social-home .social-date-hero.is-alive .social-date-hero-card-2, + .social-home .social-date-hero.is-alive .social-date-hero-cta, + .social-home .social-date-hero.is-alive .social-date-hero-steps li, + .social-home .social-date-hero-deck::before, + .social-home .social-date-hero-deck::after { + animation: none !important; + } +} .social-home .social-date-hero-online { position: absolute; top: 14px; @@ -781,7 +921,7 @@ html[data-theme="light"] .social-workspace .nav-group-panel { border: 1px solid var(--sx-fog, #ffffff18); background: #ffffff08; } -.social-together-tabs span { +.social-together-tabs :is(span, a) { min-height: 32px; padding: 0 12px; display: inline-grid; @@ -789,8 +929,9 @@ html[data-theme="light"] .social-workspace .nav-group-panel { border-radius: 999px; font-size: 12px; color: var(--text-muted, #9aa3af); + text-decoration: none; } -.social-together-tabs span.is-on { +.social-together-tabs :is(span, a).is-on { background: linear-gradient(120deg, #4ecdc4, #7aefe4); color: #062525; font-weight: 600; diff --git a/src/modules/social/components/AttractiveRoster.tsx b/src/modules/social/components/AttractiveRoster.tsx index 8f3deaa..0cc661d 100644 --- a/src/modules/social/components/AttractiveRoster.tsx +++ b/src/modules/social/components/AttractiveRoster.tsx @@ -274,6 +274,9 @@ export default function AttractiveRoster({ onJoin }: { onJoin: () => void }) { 去左右滑认识 + + 进群组聊天 + diff --git a/src/modules/social/components/CafeDirectory.tsx b/src/modules/social/components/CafeDirectory.tsx index f98634d..916ecd5 100644 --- a/src/modules/social/components/CafeDirectory.tsx +++ b/src/modules/social/components/CafeDirectory.tsx @@ -362,12 +362,21 @@ export default function CafeDirectory() { return ( - - {catalog.source === "remote" ? "最新地点" : "先看看这些地方"} - +
+ + {catalog.source === "remote" ? "最新地点" : "先看看这些地方"} + + + 找同城的人 + + + + 群组约见面 + +
-

- 先选城市,找到同城的人,再挑一家咖啡馆出来坐坐。 +

+ 先选城市 → 找到同城的人 → 再挑一家咖啡馆出来坐坐。

diff --git a/src/modules/social/components/ChannelDirectory.tsx b/src/modules/social/components/ChannelDirectory.tsx index 22842a8..47b84ec 100644 --- a/src/modules/social/components/ChannelDirectory.tsx +++ b/src/modules/social/components/ChannelDirectory.tsx @@ -1,7 +1,7 @@ "use client"; import Link from "next/link"; -import { ArrowUpRight, Hash, MessageCircle } from "lucide-react"; +import { ArrowUpRight, Hash, MessageCircle, Radio, Users } from "lucide-react"; import SiteShell from "./SiteShell"; import { DemoBadge, PageIntro } from "./SocialUI"; import { socialPath } from "@social/lib/socialPath"; @@ -15,10 +15,13 @@ export default function ChannelDirectory() { SEED_CHANNELS[0]; return ( - + 一个聊天室,简单好找 -
+

+ 先在群里打个招呼;想开麦或开视频,再去「随时,聊得来」。 +

+
@@ -33,7 +36,15 @@ export default function ChannelDirectory() {
- 进入聊天室 + 进入群聊 + + + + 语音 / 视频场 + + + + 找搭子
diff --git a/src/modules/social/components/ChatWorkspace.tsx b/src/modules/social/components/ChatWorkspace.tsx index d03fda6..5972547 100644 --- a/src/modules/social/components/ChatWorkspace.tsx +++ b/src/modules/social/components/ChatWorkspace.tsx @@ -7,8 +7,11 @@ import { CheckCheck, CornerUpLeft, Hash, + Heart, + Radio, Send, Smile, + Users, Wifi, WifiOff, X, @@ -20,15 +23,19 @@ import { socialPath } from "@social/lib/socialPath"; import { useSocialChat } from "@social/lib/useSocialChat"; import { useLocalState } from "@social/lib/useLocalState"; import { loadJson } from "@social/lib/storage"; +import { MOCK_ROSTER } from "@social/lib/rosterMock"; +import SocialAvatar from "./SocialAvatar"; /** 全站唯一聊天室频道(分类页暂时隐藏) */ export const SOCIAL_CHAT_ID = "general"; -const EMOJIS = ["👋", "☕", "🌍", "✨", "🙌", "❤️", "💻", "🌴"]; +const EMOJIS = ["👋", "☕", "🌍", "✨", "🙌", "❤️", "💻", "🌴", "🚀", "🌙"]; const STARTERS = [ "大家好,第一次来,我在…", "有人一起找 cowork 吗?", "下一站想去哪座城?", + "刚左右滑认识了几位,来打个招呼~", + "有人晚上开麦闲聊吗?", ]; const STATUS = { connecting: "正在连上…", @@ -69,6 +76,25 @@ export function Conversation({ setDraft(intro.slice(0, 2000)); }, [channelId, setDraft]); + useEffect(() => { + const vv = window.visualViewport; + if (!vv) return; + const sync = () => { + document.documentElement.style.setProperty( + "--vv-offset", + `${Math.max(0, window.innerHeight - vv.height - vv.offsetTop)}px`, + ); + }; + sync(); + vv.addEventListener("resize", sync); + vv.addEventListener("scroll", sync); + return () => { + vv.removeEventListener("resize", sync); + vv.removeEventListener("scroll", sync); + document.documentElement.style.removeProperty("--vv-offset"); + }; + }, []); + useEffect(() => { const thread = threadRef.current; if (!thread) return; @@ -101,6 +127,19 @@ export function Conversation({ setReply(null); } atBottom.current = true; + try { + navigator.vibrate?.(10); + } catch { + /* ignore */ + } + requestAnimationFrame(() => { + const thread = threadRef.current; + if (thread) + thread.scrollTo({ + top: thread.scrollHeight, + behavior: "smooth", + }); + }); composerRef.current?.focus(); }; @@ -154,8 +193,8 @@ export function Conversation({ {!chat.messages.length && (
{STARTERS.map((starter) => ( @@ -172,6 +211,16 @@ export function Conversation({ ))}
+
+ + + 先去认识一下 + + + + 看看语音视频场 + +
)} {chat.messages.map((message) => ( @@ -360,6 +409,7 @@ export default function ChatWorkspace() { SEED_CHANNELS.find((item) => item.id === SOCIAL_CHAT_ID) || SEED_CHANNELS[0]; const id = channel?.id || SOCIAL_CHAT_ID; + const online = MOCK_ROSTER.filter((m) => m.online).slice(0, 6); return (
@@ -369,15 +419,39 @@ export default function ChatWorkspace() { 首页
- 大家聊天 + 群组聊天

- {channel?.topic || "游民闲聊"} · 打个招呼就好 + {channel?.topic || "游民闲聊"} · 大家一起聊,不是私信

能连上就实时聊 · 不行就先留在你这边
- +
+ + + 认识一下 + + + + 语音视频 + + +
+
+
+ {online.map((m) => ( + + ))} +
+

+ + {online.length}+ 位在线气味 · 进群打个招呼就好 +

+ + 看看是谁 + +
diff --git a/src/modules/social/components/CommunityWelcome.tsx b/src/modules/social/components/CommunityWelcome.tsx index 5fe32d6..6dd6bc6 100644 --- a/src/modules/social/components/CommunityWelcome.tsx +++ b/src/modules/social/components/CommunityWelcome.tsx @@ -219,10 +219,10 @@ export function CommunityJoin() { {[ { icon: MessageCircle, - title: "大家聊天", - desc: "跟大家打个招呼", + title: "群组聊天", + desc: "先进群打个招呼,混个脸熟", href: socialPath("/chat"), - cta: "去聊聊", + cta: "进群聊", }, { icon: Heart, @@ -241,9 +241,9 @@ export function CommunityJoin() { { icon: Radio, title: "开视频聊聊", - desc: "开摄像头,面对面认识", + desc: "群组热身后,开麦或开视频", href: socialPath("/meetup"), - cta: "去开视频", + cta: "去聊聊", }, ].map((item) => (
diff --git a/src/modules/social/components/ConnectionHero.tsx b/src/modules/social/components/ConnectionHero.tsx index 84b6f77..6d6fcbd 100644 --- a/src/modules/social/components/ConnectionHero.tsx +++ b/src/modules/social/components/ConnectionHero.tsx @@ -8,6 +8,7 @@ import { Coffee, Globe2, Heart, + MessageCircle, MoveUpRight, Play, Radio, @@ -92,15 +93,21 @@ export default function ConnectionHero({ > {copy.socialJoinCta} + + + + + 群组聊天 + - 先去认识一下 + 认识一下 + + + 先去群组聊聊 + {liked.length > 0 && (
@@ -321,7 +361,7 @@ export default function HomeClient() { 看看全部 - 去文字聊天 + 文字群聊
-
- 找搭子 - 共创 +
+ + 找搭子 + + + 共创 +
diff --git a/src/modules/social/components/MeetupLiveClient.tsx b/src/modules/social/components/MeetupLiveClient.tsx index 423e8ec..134d7b8 100644 --- a/src/modules/social/components/MeetupLiveClient.tsx +++ b/src/modules/social/components/MeetupLiveClient.tsx @@ -9,6 +9,8 @@ import { resolveSocialCatalog } from "@social/lib/resolveCatalog"; import { useSocialChat } from "@social/lib/useSocialChat"; import { useSocialConfig } from "./SocialExperience"; import { SocialMobileDock } from "./SocialNavigation"; +import SocialAvatar from "./SocialAvatar"; +import { MOCK_ROSTER } from "@social/lib/rosterMock"; type Layout = "split" | "video" | "chat"; @@ -231,18 +233,26 @@ export default function MeetupLiveClient({ meetupId }: { meetupId: string }) { LIVE
-

准备开视频见面

+

群组 · 语音视频

{preferEmbed - ? "麦克风和摄像头先关着,进去后再打开就好。" - : "这里暂时不能直接嵌视频,点下面会跳转到视频页面。"} + ? "先听群里聊几句也行;麦克风和摄像头先关着,进去后再打开。" + : "这里暂时不能直接嵌视频,点下面会跳转到语音视频页。"}

+
+ {MOCK_ROSTER.filter((m) => m.online) + .slice(0, 5) + .map((m) => ( + + ))} + 有人想参加 · 随时可进 +

「想参加」还不等于已经约好 · 随时可以离开回去看别的场 diff --git a/src/modules/social/components/PeopleClient.tsx b/src/modules/social/components/PeopleClient.tsx index 8b7e681..a8c3811 100644 --- a/src/modules/social/components/PeopleClient.tsx +++ b/src/modules/social/components/PeopleClient.tsx @@ -116,17 +116,17 @@ export default function PeopleClient() { )}

+ + 进群组聊天 + 去左右滑认识 - + 写写我的介绍 - - 去大家聊天 - - 去开视频 + 语音视频场
diff --git a/src/modules/social/components/PeopleProfileClient.tsx b/src/modules/social/components/PeopleProfileClient.tsx index 9034deb..5801ed2 100644 --- a/src/modules/social/components/PeopleProfileClient.tsx +++ b/src/modules/social/components/PeopleProfileClient.tsx @@ -158,11 +158,14 @@ export default function PeopleProfileClient({ id }: { id: string }) { href={socialPath(`/chat?intro=${intro}`)} > - 去打招呼 + 进群组打招呼