feat: 合并星图和聊天页面为 MainPage,响应式 GridRow 布局

- 新建 MainPage.ets,用 GridRow 响应式布局组合星图+聊天
- Index.ets 改为 2 Tab(TrulyMEM + 设置)
- GraphPage/ChatPage 接收 @Prop db 从父组件传入
- 恢复 README.md / README_EN.md 的特别鸣谢部分
This commit is contained in:
root
2026-04-28 13:53:06 +08:00
parent 7c2441682c
commit 2a42183aaa
119 changed files with 6459 additions and 1102 deletions

View File

@ -1,6 +1,5 @@
import GraphPage from './GraphPage';
import ChatPage from './ChatPage';
import SettingsPage from './SettingsPage';
import { MainPage } from './MainPage';
import { SettingsPage } from './SettingsPage';
import { GraphDatabase } from '../model/GraphDatabase';
@Entry
@ -17,14 +16,9 @@ struct Index {
Column() {
Tabs({ index: this.currentIndex, barPosition: BarPosition.End }) {
TabContent() {
GraphPage({ db: this.db })
MainPage({ db: this.db })
}
.tabBar('🌌 星图')
TabContent() {
ChatPage({ db: this.db })
}
.tabBar('💬 聊天')
.tabBar('🌌 TrulyMEM')
TabContent() {
SettingsPage()
@ -33,9 +27,7 @@ struct Index {
}
.width('100%')
.height('100%')
.onChange((index: number) => {
this.currentIndex = index;
})
.onChange((index: number) => { this.currentIndex = index; })
}
.width('100%')
.height('100%')