mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-10 23:47:12 +02:00
57 lines
942 B
TypeScript
57 lines
942 B
TypeScript
import { MosaicNode } from "react-mosaic-component";
|
|
|
|
export type AppId =
|
|
| "nip"
|
|
| "kind"
|
|
| "man"
|
|
| "feed"
|
|
| "win"
|
|
| "req"
|
|
| "open"
|
|
| "profile"
|
|
| "encode"
|
|
| "decode";
|
|
|
|
export interface WindowInstance {
|
|
id: string;
|
|
appId: AppId;
|
|
title: string;
|
|
props: any;
|
|
}
|
|
|
|
export interface Workspace {
|
|
id: string;
|
|
label: string;
|
|
layout: MosaicNode<string> | null;
|
|
windowIds: string[];
|
|
}
|
|
|
|
export interface RelayInfo {
|
|
url: string;
|
|
read: boolean;
|
|
write: boolean;
|
|
}
|
|
|
|
export interface UserRelays {
|
|
inbox: RelayInfo[];
|
|
outbox: RelayInfo[];
|
|
all: RelayInfo[];
|
|
}
|
|
|
|
export interface GrimoireState {
|
|
windows: Record<string, WindowInstance>;
|
|
workspaces: Record<string, Workspace>;
|
|
activeWorkspaceId: string;
|
|
activeAccount?: {
|
|
pubkey: string;
|
|
relays?: UserRelays;
|
|
};
|
|
locale?: {
|
|
locale: string;
|
|
language: string;
|
|
region?: string;
|
|
timezone: string;
|
|
timeFormat: "12h" | "24h";
|
|
};
|
|
}
|