Files
CT/src/utility.tsx
T

44 lines
864 B
TypeScript
Raw Normal View History

2024-07-12 02:24:48 +02:00
import * as React from "bloatless-react";
2024-07-09 05:26:54 +02:00
export const storageKeys = {
2024-07-10 15:40:25 +02:00
hasUnread(id: string): string {
return id + "has-unread-messages";
},
2024-07-12 02:24:48 +02:00
2024-07-09 05:26:54 +02:00
primaryChannel(id: string): string {
return id + "primary-channel";
},
secondaryChannels(id: string): string {
return id + "secondary-channels";
},
encyptionKey(id: string): string {
return id + "encryption-key";
},
messages(id: string): string {
return id + "messages";
},
objects(id: string): string {
2024-07-11 00:47:58 +02:00
return id + "items";
},
2024-07-10 16:37:42 +02:00
outbox(id: string): string {
return id + "outbox";
},
2024-07-11 01:18:34 +02:00
itemOutbox(id: string): string {
return id + "item-outbox";
},
2024-07-09 05:26:54 +02:00
composingMessage(id: string): string {
return id + "composing-message";
},
};
2024-07-12 02:24:48 +02:00
export const stringToOptionTag: React.StateItemConverter<string> = (value) => {
return <option>{value}</option>;
};