feat(web): add account workspaces and signed content flows
This commit is contained in:
1 parent
7b8d61d1ba
commit
b5cf3d5958
117 files changed
+2789
-1674
No files matched your search
@@ -4,7 +4,7 @@ import type { ChannelInfo, CreateOptions } from '@/core-bridge/types';
|
||||
import type { ParsedChannelLink } from '@/lib/channelLink';
|
||||
|
||||
interface ChannelsState {
|
||||
/** 我的空间(原型:只在内存里,刷新即清空;真实实现存 IndexedDB,architecture §6) */
|
||||
/** 服务端空间列表的界面投影,IndexedDB 提供离线缓存。 */
|
||||
list: ChannelInfo[];
|
||||
hydrated: boolean;
|
||||
/** 从链接进来、还没确认加入的空间;含密钥,只放内存 */
|
||||
@@ -17,7 +17,6 @@ interface ChannelsState {
|
||||
hydrate: () => Promise<void>;
|
||||
refresh: () => Promise<void>;
|
||||
forget: (id: string) => Promise<void>;
|
||||
loadDemo: () => void;
|
||||
setPendingLink: (link: ParsedChannelLink | null) => void;
|
||||
clearJustCreated: () => void;
|
||||
}
|
||||
@@ -50,10 +49,6 @@ export const useChannels = create<ChannelsState>()((set) => ({
|
||||
await api.forget(id);
|
||||
set((s) => ({ list: s.list.filter((c) => c.id !== id) }));
|
||||
},
|
||||
loadDemo: () => {
|
||||
const demo = api.loadDemo?.() ?? [];
|
||||
set((s) => ({ list: demo.reduce(upsert, s.list) }));
|
||||
},
|
||||
setPendingLink: (link) => set({ pendingLink: link }),
|
||||
clearJustCreated: () => set({ justCreatedId: null }),
|
||||
}));
|
||||
Reference in new issue
Block a user