66 <button :class =" { active: activeTab === 'appearance' }" @click =" switchTab('appearance')" >外观</button >
77 <button :class =" { active: activeTab === 'api' }" @click =" switchTab('api')" >模型服务</button >
88 <button :class =" { active: activeTab === 'media' }" @click =" switchTab('media')" >音视频</button >
9- <!-- ✅ MODIFICATION START: Added Network tab and adjusted handler -->
109 <button :class =" { active: activeTab === 'network' }" @click =" switchTab('network')" >网络诊断</button >
10+ <!-- ✅ MODIFICATION START: Added About tab -->
11+ <button :class =" { active: activeTab === 'about' }" @click =" switchTab('about')" >关于</button >
1112 <!-- ✅ MODIFICATION END -->
12- <!-- -- - [移除] -- - -->
13- <!-- "Advanced" tab has been removed -->
1413 </nav >
1514
16- <!-- -- - [动画] START: 优化选项卡切换动画以消除闪烁 -- - -->
1715 <div class =" tab-content-container" ref =" tabContainerRef" >
1816 <Transition
1917 name =" tab-content-slide"
179177 <p class =" setting-description" >开启后可显著消除键盘、环境等噪音(实验性功能,可能会增加CPU消耗)。</p >
180178 </div >
181179
182- <!-- ✅ MODIFICATION START: New Network Diagnostics Tab -->
180+ <!-- Network Diagnostics Tab -->
183181 <div v-if =" activeTab === 'network'" class =" tab-content" >
184182 <h3 >网络诊断</h3 >
185183 <p >测试与 STUN/TURN 服务器的连通性,这对于建立稳定的通话至关重要。</p >
193191 {{ isTestingNetwork ? '测试中...' : '开始网络测试' }}
194192 </button >
195193 </div >
196- <!-- ✅ MODIFICATION END -->
197194
198- <!-- -- - [移除] -- - -->
199- <!-- Advanced tab content has been removed -->
195+ <!-- ✅ MODIFICATION START: New "About" Tab Content -->
196+ <div v-if =" activeTab === 'about'" class =" tab-content about-tab-content" >
197+ <h3 >关于 WebChat</h3 >
198+ <div class =" about-item" >
199+ <label >项目地址</label >
200+ <a href =" https://github.com/git-hub-cc/WebChat" target =" _blank" rel =" noopener noreferrer" >
201+ https://github.com/git-hub-cc/WebChat
202+ </a >
203+ </div >
204+ <hr >
205+ <div class =" disclaimer-section" >
206+ <h4 >免责声明</h4 >
207+ <p >本站资源来自网络,仅限本人学习参考,严禁下载、传播或商用,如侵权请与我联系删除。继续使用将视为同意本声明。</p >
208+ </div >
209+ </div >
210+ <!-- ✅ MODIFICATION END -->
200211 </div >
201212 </Transition >
202213 </div >
203- <!-- -- - [动画] END -- - -->
204214 </div >
205215 </ModalWrapper >
206216</template >
@@ -245,9 +255,7 @@ let analyserNode = null;
245255let micSourceNode = null ;
246256let animationFrameId = null ;
247257
248- // --- [动画] START: Ref for the transition container ---
249258const tabContainerRef = ref (null );
250- // --- [动画] END ---
251259
252260const showVideoPreview = computed (() => !! videoPreviewStream .value );
253261
@@ -307,8 +315,6 @@ function stopVuMeter() {
307315 animationFrameId = null ;
308316}
309317
310-
311- // ✅ MODIFICATION START: Ensure the loading animation runs for a minimum duration.
312318async function startDeviceCheck () {
313319 isCheckingDevices .value = true ;
314320 deviceCheckResult .value = null ;
@@ -357,7 +363,6 @@ async function startNetworkTest() {
357363 isTestingNetwork .value = false ;
358364 }
359365}
360- // ✅ MODIFICATION END
361366
362367function cleanupPreviewStream () {
363368 if (videoPreviewStream .value ) {
@@ -460,7 +465,6 @@ const onAiNoiseSuppressionChange = (event) => {
460465 settingsStore .setAiNoiseSuppression (event .target .checked );
461466};
462467
463- // --- [动画] START: JS Hooks for smooth height transition ---
464468const onBeforeLeave = (el ) => {
465469 if (tabContainerRef .value ) {
466470 tabContainerRef .value .style .height = ` ${ el .offsetHeight } px` ;
@@ -478,15 +482,20 @@ const onAfterEnter = () => {
478482 tabContainerRef .value .style .height = ' auto' ;
479483 }
480484};
481- // --- [动画] END ---
482485< / script>
483486
484487< style scoped>
485488.settings - content { display: flex; flex- direction: column; }
486489.modal - tabs { display: flex; border- bottom: 1px solid var (-- color- border); margin- bottom: var (-- spacing- 4 ); flex- shrink: 0 ; }
487- /* ✅ MODIFICATION START: Adjusted padding for more tabs */
488- .modal - tabs button { padding: var (-- spacing- 2 ) var (-- spacing- 3 ); border- bottom: 2px solid transparent; font- weight: var (-- font- weight- medium); color: var (-- color- text- secondary); }
489- /* ✅ MODIFICATION END */
490+ .modal - tabs button {
491+ flex- grow: 1 ; /* ✅ Make buttons flexible */
492+ padding: var (-- spacing- 2 ) var (-- spacing- 1 ); /* ✅ Adjust padding */
493+ border- bottom: 2px solid transparent;
494+ font- weight: var (-- font- weight- medium);
495+ color: var (-- color- text- secondary);
496+ font- size: var (-- font- size- sm); /* ✅ Smaller font for more tabs */
497+ white- space: nowrap; /* Prevent wrapping */
498+ }
490499.modal - tabs button .active { color: var (-- color- brand- primary); border- bottom- color: var (-- color- brand- primary); }
491500.tab - content { display: flex; flex- direction: column; gap: var (-- spacing- 4 ); }
492501.setting - item { display: flex; align- items: center; justify- content: space- between; gap: var (-- spacing- 4 ); }
@@ -571,8 +580,6 @@ p { font-size: var(--font-size-sm); color: var(--color-text-secondary); margin-b
571580 display: none;
572581}
573582
574-
575- /* --- [动画] START: 选项卡内容切换动画 --- */
576583.tab - content- container {
577584 position: relative;
578585 overflow: hidden;
@@ -599,5 +606,38 @@ p { font-size: var(--font-size-sm); color: var(--color-text-secondary); margin-b
599606 opacity: 0 ;
600607 transform: translateX (- 20px );
601608}
602- /* --- [动画] END --- */
609+
610+ /* ✅ MODIFICATION START: Styles for the new "About" tab */
611+ .about - tab- content {
612+ text- align: left;
613+ }
614+ .about - tab- content h3, .about - tab- content h4 {
615+ margin- bottom: var (-- spacing- 3 );
616+ }
617+ .about - item {
618+ display: flex;
619+ flex- direction: column;
620+ gap: var (-- spacing- 2 );
621+ margin- bottom: var (-- spacing- 4 );
622+ }
623+ .about - item label {
624+ font- weight: var (-- font- weight- medium);
625+ color: var (-- color- text- secondary);
626+ width: auto; /* Override default label width */
627+ text- align: left;
628+ }
629+ .about - item a {
630+ color: var (-- color- text- link);
631+ word- break: break - all;
632+ }
633+ .disclaimer - section p {
634+ line- height: 1.6 ;
635+ font- size: var (-- font- size- sm);
636+ color: var (-- color- text- secondary);
637+ background- color: var (-- color- background- elevated);
638+ padding: var (-- spacing- 3 );
639+ border- radius: var (-- border- radius- md);
640+ border- left: 4px solid var (-- color- status- warning);
641+ }
642+ /* ✅ MODIFICATION END */
603643< / style>
0 commit comments