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:
21
harmonyos/trulymem-core/src/main/ets/GraphDatabase.ets
Normal file
21
harmonyos/trulymem-core/src/main/ets/GraphDatabase.ets
Normal file
@ -0,0 +1,21 @@
|
||||
import relationalStore from '@ohos.data.relationalStore';
|
||||
import { Context } from '@ohos.abilityAccessCtrl';
|
||||
|
||||
const STORE_CONFIG: relationalStore.StoreConfig = {
|
||||
name: 'trulymem.db',
|
||||
securityLevel: relationalStore.SecurityLevel.S1
|
||||
};
|
||||
|
||||
export class GraphDatabase {
|
||||
private store?: relationalStore.RdbStore;
|
||||
private context?: Context;
|
||||
|
||||
async init(context: Context) {
|
||||
this.context = context;
|
||||
this.store = await relationalStore.getRdbStore(context, STORE_CONFIG);
|
||||
}
|
||||
|
||||
getStore(): relationalStore.RdbStore | undefined {
|
||||
return this.store;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user