Fun picker improvements
This commit is contained in:
parent
427f91f903
commit
b0653d06fe
142 changed files with 3581 additions and 1280 deletions
62
ts/components/fun/constants.tsx
Normal file
62
ts/components/fun/constants.tsx
Normal file
|
@ -0,0 +1,62 @@
|
|||
// Copyright 2025 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { EmojiPickerCategory } from './data/emojis';
|
||||
import type { StickerPackType } from '../../state/ducks/stickers';
|
||||
|
||||
export enum FunPickerTabKey {
|
||||
Emoji = 'Emoji',
|
||||
Stickers = 'Stickers',
|
||||
Gifs = 'Gifs',
|
||||
}
|
||||
|
||||
export enum FunGifsCategory {
|
||||
Trending = 'Trending',
|
||||
Celebrate = 'Celebrate',
|
||||
Love = 'Love',
|
||||
ThumbsUp = 'ThumbsUp',
|
||||
Surprised = 'Surprised',
|
||||
Excited = 'Excited',
|
||||
Sad = 'Sad',
|
||||
Angry = 'Angry',
|
||||
}
|
||||
|
||||
export enum FunSectionCommon {
|
||||
SearchResults = 'SearchResults',
|
||||
Recents = 'Recents',
|
||||
}
|
||||
|
||||
export enum FunStickersSectionBase {
|
||||
StickersSetup = 'StickersSetup',
|
||||
}
|
||||
|
||||
export type FunStickersPackSection = `StickerPack:${string}` & {
|
||||
FunStickersPackSection: never;
|
||||
};
|
||||
|
||||
export function toFunStickersPackSection(
|
||||
pack: StickerPackType
|
||||
): FunStickersPackSection {
|
||||
return `StickerPack:${pack.id}` as FunStickersPackSection;
|
||||
}
|
||||
|
||||
export type FunEmojisSection = FunSectionCommon | EmojiPickerCategory;
|
||||
export type FunStickersSection =
|
||||
| FunSectionCommon
|
||||
| FunStickersSectionBase
|
||||
| FunStickersPackSection;
|
||||
export type FunGifsSection = FunSectionCommon | FunGifsCategory;
|
||||
|
||||
export const FunEmojisSectionOrder: ReadonlyArray<
|
||||
FunSectionCommon.Recents | EmojiPickerCategory
|
||||
> = [
|
||||
FunSectionCommon.Recents,
|
||||
EmojiPickerCategory.SmileysAndPeople,
|
||||
EmojiPickerCategory.AnimalsAndNature,
|
||||
EmojiPickerCategory.FoodAndDrink,
|
||||
EmojiPickerCategory.Activities,
|
||||
EmojiPickerCategory.TravelAndPlaces,
|
||||
EmojiPickerCategory.Objects,
|
||||
EmojiPickerCategory.Symbols,
|
||||
EmojiPickerCategory.Flags,
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue