Introduce the new Settings tab
Co-authored-by: Jamie Kyle <jamie@signal.org> Co-authored-by: Fedor Indutny <indutny@signal.org> Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
0d906e88ff
commit
fe9d042e40
55 changed files with 1468 additions and 2092 deletions
|
@ -26,9 +26,7 @@ type CustomColorDataType = {
|
|||
export type PropsDataType = {
|
||||
conversationId?: string;
|
||||
customColors?: Record<string, CustomColorType>;
|
||||
getConversationsWithCustomColor: (
|
||||
colorId: string
|
||||
) => Promise<Array<ConversationType>>;
|
||||
getConversationsWithCustomColor: (colorId: string) => Array<ConversationType>;
|
||||
i18n: LocalizerType;
|
||||
isGlobal?: boolean;
|
||||
selectedColor?: ConversationColorType;
|
||||
|
@ -270,9 +268,7 @@ export function ChatColorPicker({
|
|||
type CustomColorBubblePropsType = {
|
||||
color: CustomColorType;
|
||||
colorId: string;
|
||||
getConversationsWithCustomColor: (
|
||||
colorId: string
|
||||
) => Promise<Array<ConversationType>>;
|
||||
getConversationsWithCustomColor: (colorId: string) => Array<ConversationType>;
|
||||
i18n: LocalizerType;
|
||||
isSelected: boolean;
|
||||
onDelete: () => unknown;
|
||||
|
@ -393,12 +389,11 @@ function CustomColorBubble({
|
|||
attributes={{
|
||||
className: 'ChatColorPicker__context--delete',
|
||||
}}
|
||||
onClick={async (event: MouseEvent) => {
|
||||
onClick={(event: MouseEvent) => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
const conversations =
|
||||
await getConversationsWithCustomColor(colorId);
|
||||
const conversations = getConversationsWithCustomColor(colorId);
|
||||
if (!conversations.length) {
|
||||
onDelete();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue