fix lint and reformat
This commit is contained in:
parent
69b8b188e5
commit
5697677a90
|
@ -2,7 +2,7 @@ name: CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
branches: ['main']
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
// eslint-disable-next-line eslint-comments/disable-enable-pair
|
||||
/* eslint-disable import/namespace */
|
||||
|
||||
import { useRef } from 'react'
|
||||
|
||||
import { Composer, Messages } from '@status-im/components'
|
||||
|
@ -25,7 +22,8 @@ export const ChannelScreen = ({ route }: ChannelScreenProps) => {
|
|||
const theme = useTheme()
|
||||
|
||||
// We need to get the channel name from the route params
|
||||
const channelName = route.params.channelId
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const _channelName = route.params.channelId
|
||||
const scrollRef = useRef(null)
|
||||
|
||||
return (
|
||||
|
@ -47,9 +45,7 @@ export const ChannelScreen = ({ route }: ChannelScreenProps) => {
|
|||
|
||||
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
|
||||
<Stack>
|
||||
<Composer
|
||||
pb={insets.bottom + Platform.select({ android: 12, ios: 0 })}
|
||||
/>
|
||||
<Composer />
|
||||
</Stack>
|
||||
</TouchableWithoutFeedback>
|
||||
</KeyboardAvoidingView>
|
||||
|
|
|
@ -4,7 +4,7 @@ import '@tamagui/core/reset.css'
|
|||
import '@tamagui/font-inter/css/400.css'
|
||||
import '@tamagui/font-inter/css/700.css'
|
||||
|
||||
import React from 'react'
|
||||
import { StrictMode } from 'react'
|
||||
|
||||
import { Provider } from '@status-im/components'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
|
@ -14,9 +14,9 @@ import App from './app'
|
|||
const root = document.getElementById('root') as HTMLElement
|
||||
|
||||
createRoot(root).render(
|
||||
<React.StrictMode>
|
||||
<StrictMode>
|
||||
<Provider>
|
||||
<App />
|
||||
</Provider>
|
||||
</React.StrictMode>
|
||||
</StrictMode>
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { Provider } from '../src'
|
||||
import { Parameters, Decorator } from '@storybook/react'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState } from 'react'
|
||||
import { Fragment, useState } from 'react'
|
||||
|
||||
import { ChevronRightIcon } from '@status-im/icons/20'
|
||||
import { Stack } from '@tamagui/core'
|
||||
|
@ -104,9 +104,7 @@ const Accordion = ({
|
|||
</AnimatePresence>
|
||||
</Stack>
|
||||
<AnimatePresence>
|
||||
{isExpanded && (
|
||||
<React.Fragment key={title}>{children}</React.Fragment>
|
||||
)}
|
||||
{isExpanded && <Fragment key={title}>{children}</Fragment>}
|
||||
</AnimatePresence>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
|
|
@ -17,7 +17,7 @@ interface Props {
|
|||
}
|
||||
|
||||
const Author = (props: Props) => {
|
||||
const { name, status, nickname, address, time } = props
|
||||
const { name, status, address, time } = props
|
||||
|
||||
return (
|
||||
<XStack space={8} alignItems="center">
|
||||
|
|
|
@ -163,7 +163,7 @@ const Avatar = (props: Props) => {
|
|||
|
||||
useEffect(() => {
|
||||
setStatus('idle')
|
||||
}, [JSON.stringify(src)])
|
||||
}, [src])
|
||||
|
||||
return (
|
||||
<Base size={size} shape={shape} withOutline={withOutline}>
|
||||
|
|
|
@ -8,6 +8,7 @@ import type { GetProps } from '@tamagui/core'
|
|||
import type { Ref } from 'react'
|
||||
|
||||
const Base = styled(Stack, {
|
||||
tag: 'button',
|
||||
name: 'Button',
|
||||
accessibilityRole: 'button',
|
||||
|
||||
|
|
|
@ -20,9 +20,10 @@ import { useChatDispatch, useChatState } from '../provider'
|
|||
import { Reply } from '../reply'
|
||||
|
||||
interface Props {
|
||||
blur: boolean
|
||||
blur?: boolean
|
||||
}
|
||||
|
||||
// pb={insets.bottom + Platform.select({ android: 12, ios: 0 })}
|
||||
const Composer = (props: Props) => {
|
||||
const { blur } = props
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Stack } from '@tamagui/core'
|
||||
|
||||
import { Image } from './image'
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import React from 'react'
|
||||
|
||||
import { PinIcon } from '@status-im/icons/16'
|
||||
import { Stack, Unspaced, XStack, YStack } from 'tamagui'
|
||||
import { View } from 'react-native'
|
||||
import { Stack, styled, Unspaced, XStack, YStack } from 'tamagui'
|
||||
|
||||
import { Author } from '../author/author'
|
||||
import { Avatar } from '../avatar'
|
||||
|
@ -22,6 +21,27 @@ interface Props {
|
|||
pinned?: boolean
|
||||
}
|
||||
|
||||
const Wrapper = styled(View, {
|
||||
position: 'relative',
|
||||
paddingHorizontal: 8,
|
||||
paddingVertical: 8,
|
||||
borderRadius: 16,
|
||||
alignItems: 'flex-start',
|
||||
|
||||
variants: {
|
||||
active: {
|
||||
true: {
|
||||
backgroundColor: '$neutral-5',
|
||||
},
|
||||
},
|
||||
pinned: {
|
||||
true: {
|
||||
backgroundColor: '$blue-50-opa-5',
|
||||
},
|
||||
},
|
||||
} as const,
|
||||
})
|
||||
|
||||
const Message = (props: Props) => {
|
||||
const { text, images, reactions, reply, pinned } = props
|
||||
|
||||
|
@ -34,17 +54,10 @@ const Message = (props: Props) => {
|
|||
const dispatch = useChatDispatch()
|
||||
|
||||
return (
|
||||
<YStack
|
||||
position="relative"
|
||||
alignItems="flex-start"
|
||||
paddingHorizontal={8}
|
||||
paddingVertical={8}
|
||||
borderRadius={16}
|
||||
backgroundColor={
|
||||
active ? '$neutral-5' : pinned ? '$blue-50-opa-5' : undefined
|
||||
}
|
||||
onMouseEnter={() => setHovered(true)}
|
||||
onMouseLeave={() => setHovered(false)}
|
||||
<Wrapper
|
||||
active={active}
|
||||
onHoverIn={() => setHovered(true)}
|
||||
onHoverOut={() => setHovered(false)}
|
||||
>
|
||||
{active && (
|
||||
<Unspaced>
|
||||
|
@ -122,7 +135,7 @@ const Message = (props: Props) => {
|
|||
)}
|
||||
</YStack>
|
||||
</XStack>
|
||||
</YStack>
|
||||
</Wrapper>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ const interFont = createInterFont({
|
|||
7: 13,
|
||||
8: 15,
|
||||
9: 19,
|
||||
10: 27
|
||||
10: 27,
|
||||
},
|
||||
weight: {
|
||||
6: '400',
|
||||
7: '500',
|
||||
8: '600'
|
||||
8: '600',
|
||||
},
|
||||
letterSpacing: {
|
||||
5: 2,
|
||||
|
@ -36,19 +36,19 @@ const interFont = createInterFont({
|
|||
10: -3,
|
||||
12: -4,
|
||||
14: -5,
|
||||
15: -6
|
||||
15: -6,
|
||||
},
|
||||
face: {
|
||||
400: { normal: 'Inter' },
|
||||
500: { normal: 'Inter' },
|
||||
600: { normal: 'InterBold' }
|
||||
}
|
||||
600: { normal: 'InterBold' },
|
||||
},
|
||||
})
|
||||
|
||||
const monoFont = createFont({
|
||||
family: 'UbuntuMono',
|
||||
weight: {
|
||||
1: '500'
|
||||
1: '500',
|
||||
},
|
||||
letterSpacing: {
|
||||
5: 2,
|
||||
|
@ -59,7 +59,7 @@ const monoFont = createFont({
|
|||
10: -3,
|
||||
12: -4,
|
||||
14: -5,
|
||||
15: -6
|
||||
15: -6,
|
||||
},
|
||||
size: {
|
||||
1: 11,
|
||||
|
@ -77,25 +77,25 @@ const monoFont = createFont({
|
|||
13: 72,
|
||||
14: 92,
|
||||
15: 114,
|
||||
16: 124
|
||||
16: 124,
|
||||
},
|
||||
lineHeight: {
|
||||
1: 14,
|
||||
2: 15
|
||||
}
|
||||
2: 15,
|
||||
},
|
||||
})
|
||||
|
||||
export const config = createTamagui({
|
||||
fonts: {
|
||||
inter: interFont,
|
||||
mono: monoFont
|
||||
mono: monoFont,
|
||||
},
|
||||
themes,
|
||||
tokens: {
|
||||
colors: {
|
||||
...tokens.color
|
||||
...tokens.color,
|
||||
},
|
||||
...tokens
|
||||
...tokens,
|
||||
},
|
||||
shouldAddPrefersColorThemes: true,
|
||||
media: createMedia({
|
||||
|
@ -112,8 +112,8 @@ export const config = createTamagui({
|
|||
short: { maxHeight: 820 },
|
||||
tall: { minHeight: 820 },
|
||||
hoverNone: { hover: 'none' },
|
||||
pointerCoarse: { pointer: 'coarse' }
|
||||
pointerCoarse: { pointer: 'coarse' },
|
||||
}),
|
||||
shorthands,
|
||||
animations
|
||||
animations,
|
||||
})
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { enumeration, encodeMessage, decodeMessage, message, bytes } from 'protons-runtime'
|
||||
import {
|
||||
enumeration,
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
bytes,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface ApplicationMetadataMessage {
|
||||
|
@ -45,7 +51,7 @@ export namespace ApplicationMetadataMessage {
|
|||
TYPE_STATUS_UPDATE = 'TYPE_STATUS_UPDATE',
|
||||
TYPE_DELETE_MESSAGE = 'TYPE_DELETE_MESSAGE',
|
||||
TYPE_SYNC_INSTALLATION_COMMUNITY = 'TYPE_SYNC_INSTALLATION_COMMUNITY',
|
||||
TYPE_ANONYMOUS_METRIC_BATCH = 'TYPE_ANONYMOUS_METRIC_BATCH'
|
||||
TYPE_ANONYMOUS_METRIC_BATCH = 'TYPE_ANONYMOUS_METRIC_BATCH',
|
||||
}
|
||||
|
||||
enum __TypeValues {
|
||||
|
@ -82,7 +88,7 @@ export namespace ApplicationMetadataMessage {
|
|||
TYPE_STATUS_UPDATE = 30,
|
||||
TYPE_DELETE_MESSAGE = 31,
|
||||
TYPE_SYNC_INSTALLATION_COMMUNITY = 32,
|
||||
TYPE_ANONYMOUS_METRIC_BATCH = 33
|
||||
TYPE_ANONYMOUS_METRIC_BATCH = 33,
|
||||
}
|
||||
|
||||
export namespace Type {
|
||||
|
@ -95,7 +101,7 @@ export namespace ApplicationMetadataMessage {
|
|||
return message<ApplicationMetadataMessage>({
|
||||
1: { name: 'signature', codec: bytes },
|
||||
2: { name: 'payload', codec: bytes },
|
||||
3: { name: 'type', codec: ApplicationMetadataMessage.Type.codec() }
|
||||
3: { name: 'type', codec: ApplicationMetadataMessage.Type.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { encodeMessage, decodeMessage, message, uint64, string, enumeration, bytes, bool } from 'protons-runtime'
|
||||
import {
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
uint64,
|
||||
string,
|
||||
enumeration,
|
||||
bytes,
|
||||
bool,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface ChatIdentity {
|
||||
|
@ -23,7 +32,7 @@ export namespace ChatIdentity {
|
|||
4: { name: 'displayName', codec: string },
|
||||
5: { name: 'description', codec: string },
|
||||
6: { name: 'color', codec: string },
|
||||
7: { name: 'emoji', codec: string }
|
||||
7: { name: 'emoji', codec: string },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -48,13 +57,13 @@ export namespace IdentityImage {
|
|||
export enum SourceType {
|
||||
UNKNOWN_SOURCE_TYPE = 'UNKNOWN_SOURCE_TYPE',
|
||||
RAW_PAYLOAD = 'RAW_PAYLOAD',
|
||||
ENS_AVATAR = 'ENS_AVATAR'
|
||||
ENS_AVATAR = 'ENS_AVATAR',
|
||||
}
|
||||
|
||||
enum __SourceTypeValues {
|
||||
UNKNOWN_SOURCE_TYPE = 0,
|
||||
RAW_PAYLOAD = 1,
|
||||
ENS_AVATAR = 2
|
||||
ENS_AVATAR = 2,
|
||||
}
|
||||
|
||||
export namespace SourceType {
|
||||
|
@ -69,7 +78,7 @@ export namespace IdentityImage {
|
|||
2: { name: 'sourceType', codec: IdentityImage.SourceType.codec() },
|
||||
3: { name: 'imageType', codec: ImageType.codec() },
|
||||
4: { name: 'encryptionKeys', codec: bytes, repeats: true },
|
||||
5: { name: 'encrypted', codec: bool }
|
||||
5: { name: 'encrypted', codec: bool },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -89,7 +98,7 @@ export enum MessageType {
|
|||
PRIVATE_GROUP = 'PRIVATE_GROUP',
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 'SYSTEM_MESSAGE_PRIVATE_GROUP',
|
||||
COMMUNITY_CHAT = 'COMMUNITY_CHAT',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __MessageTypeValues {
|
||||
|
@ -99,7 +108,7 @@ enum __MessageTypeValues {
|
|||
PRIVATE_GROUP = 3,
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 4,
|
||||
COMMUNITY_CHAT = 5,
|
||||
SYSTEM_MESSAGE_GAP = 6
|
||||
SYSTEM_MESSAGE_GAP = 6,
|
||||
}
|
||||
|
||||
export namespace MessageType {
|
||||
|
@ -112,7 +121,7 @@ export enum ImageType {
|
|||
PNG = 'PNG',
|
||||
JPEG = 'JPEG',
|
||||
WEBP = 'WEBP',
|
||||
GIF = 'GIF'
|
||||
GIF = 'GIF',
|
||||
}
|
||||
|
||||
enum __ImageTypeValues {
|
||||
|
@ -120,7 +129,7 @@ enum __ImageTypeValues {
|
|||
PNG = 1,
|
||||
JPEG = 2,
|
||||
WEBP = 3,
|
||||
GIF = 4
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export namespace ImageType {
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { encodeMessage, decodeMessage, message, string, int32, bytes, enumeration, uint64 } from 'protons-runtime'
|
||||
import {
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
string,
|
||||
int32,
|
||||
bytes,
|
||||
enumeration,
|
||||
uint64,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface StickerMessage {
|
||||
|
@ -13,7 +22,7 @@ export namespace StickerMessage {
|
|||
export const codec = (): Codec<StickerMessage> => {
|
||||
return message<StickerMessage>({
|
||||
1: { name: 'hash', codec: string },
|
||||
2: { name: 'pack', codec: int32 }
|
||||
2: { name: 'pack', codec: int32 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -35,7 +44,7 @@ export namespace ImageMessage {
|
|||
export const codec = (): Codec<ImageMessage> => {
|
||||
return message<ImageMessage>({
|
||||
1: { name: 'payload', codec: bytes },
|
||||
2: { name: 'type', codec: ImageType.codec() }
|
||||
2: { name: 'type', codec: ImageType.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -58,13 +67,13 @@ export namespace AudioMessage {
|
|||
export enum AudioType {
|
||||
UNKNOWN_AUDIO_TYPE = 'UNKNOWN_AUDIO_TYPE',
|
||||
AAC = 'AAC',
|
||||
AMR = 'AMR'
|
||||
AMR = 'AMR',
|
||||
}
|
||||
|
||||
enum __AudioTypeValues {
|
||||
UNKNOWN_AUDIO_TYPE = 0,
|
||||
AAC = 1,
|
||||
AMR = 2
|
||||
AMR = 2,
|
||||
}
|
||||
|
||||
export namespace AudioType {
|
||||
|
@ -77,7 +86,7 @@ export namespace AudioMessage {
|
|||
return message<AudioMessage>({
|
||||
1: { name: 'payload', codec: bytes },
|
||||
2: { name: 'type', codec: AudioMessage.AudioType.codec() },
|
||||
3: { name: 'durationMs', codec: uint64 }
|
||||
3: { name: 'durationMs', codec: uint64 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -107,7 +116,7 @@ export namespace EditMessage {
|
|||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'messageId', codec: string },
|
||||
5: { name: 'grant', codec: bytes },
|
||||
6: { name: 'messageType', codec: MessageType.codec() }
|
||||
6: { name: 'messageType', codec: MessageType.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -135,7 +144,7 @@ export namespace DeleteMessage {
|
|||
2: { name: 'chatId', codec: string },
|
||||
3: { name: 'messageId', codec: string },
|
||||
4: { name: 'grant', codec: bytes },
|
||||
5: { name: 'messageType', codec: MessageType.codec() }
|
||||
5: { name: 'messageType', codec: MessageType.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -177,7 +186,7 @@ export namespace ChatMessage {
|
|||
IMAGE = 'IMAGE',
|
||||
AUDIO = 'AUDIO',
|
||||
COMMUNITY = 'COMMUNITY',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __ContentTypeValues {
|
||||
|
@ -191,7 +200,7 @@ export namespace ChatMessage {
|
|||
IMAGE = 7,
|
||||
AUDIO = 8,
|
||||
COMMUNITY = 9,
|
||||
SYSTEM_MESSAGE_GAP = 10
|
||||
SYSTEM_MESSAGE_GAP = 10,
|
||||
}
|
||||
|
||||
export namespace ContentType {
|
||||
|
@ -215,7 +224,7 @@ export namespace ChatMessage {
|
|||
11: { name: 'audio', codec: AudioMessage.codec() },
|
||||
12: { name: 'community', codec: bytes },
|
||||
13: { name: 'grant', codec: bytes },
|
||||
14: { name: 'displayName', codec: string }
|
||||
14: { name: 'displayName', codec: string },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -235,7 +244,7 @@ export enum MessageType {
|
|||
PRIVATE_GROUP = 'PRIVATE_GROUP',
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 'SYSTEM_MESSAGE_PRIVATE_GROUP',
|
||||
COMMUNITY_CHAT = 'COMMUNITY_CHAT',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __MessageTypeValues {
|
||||
|
@ -245,7 +254,7 @@ enum __MessageTypeValues {
|
|||
PRIVATE_GROUP = 3,
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 4,
|
||||
COMMUNITY_CHAT = 5,
|
||||
SYSTEM_MESSAGE_GAP = 6
|
||||
SYSTEM_MESSAGE_GAP = 6,
|
||||
}
|
||||
|
||||
export namespace MessageType {
|
||||
|
@ -258,7 +267,7 @@ export enum ImageType {
|
|||
PNG = 'PNG',
|
||||
JPEG = 'JPEG',
|
||||
WEBP = 'WEBP',
|
||||
GIF = 'GIF'
|
||||
GIF = 'GIF',
|
||||
}
|
||||
|
||||
enum __ImageTypeValues {
|
||||
|
@ -266,7 +275,7 @@ enum __ImageTypeValues {
|
|||
PNG = 1,
|
||||
JPEG = 2,
|
||||
WEBP = 3,
|
||||
GIF = 4
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export namespace ImageType {
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { encodeMessage, decodeMessage, message, bytes, string, uint64, enumeration, bool, int32 } from 'protons-runtime'
|
||||
import {
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
bytes,
|
||||
string,
|
||||
uint64,
|
||||
enumeration,
|
||||
bool,
|
||||
int32,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface Grant {
|
||||
|
@ -17,7 +27,7 @@ export namespace Grant {
|
|||
1: { name: 'communityId', codec: bytes },
|
||||
2: { name: 'memberId', codec: bytes },
|
||||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'clock', codec: uint64 }
|
||||
4: { name: 'clock', codec: uint64 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -38,13 +48,13 @@ export namespace CommunityMember {
|
|||
export enum Roles {
|
||||
UNKNOWN_ROLE = 'UNKNOWN_ROLE',
|
||||
ROLE_ALL = 'ROLE_ALL',
|
||||
ROLE_MANAGE_USERS = 'ROLE_MANAGE_USERS'
|
||||
ROLE_MANAGE_USERS = 'ROLE_MANAGE_USERS',
|
||||
}
|
||||
|
||||
enum __RolesValues {
|
||||
UNKNOWN_ROLE = 0,
|
||||
ROLE_ALL = 1,
|
||||
ROLE_MANAGE_USERS = 2
|
||||
ROLE_MANAGE_USERS = 2,
|
||||
}
|
||||
|
||||
export namespace Roles {
|
||||
|
@ -55,7 +65,7 @@ export namespace CommunityMember {
|
|||
|
||||
export const codec = (): Codec<CommunityMember> => {
|
||||
return message<CommunityMember>({
|
||||
1: { name: 'roles', codec: CommunityMember.Roles.codec() }
|
||||
1: { name: 'roles', codec: CommunityMember.Roles.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -79,14 +89,14 @@ export namespace CommunityPermissions {
|
|||
UNKNOWN_ACCESS = 'UNKNOWN_ACCESS',
|
||||
NO_MEMBERSHIP = 'NO_MEMBERSHIP',
|
||||
INVITATION_ONLY = 'INVITATION_ONLY',
|
||||
ON_REQUEST = 'ON_REQUEST'
|
||||
ON_REQUEST = 'ON_REQUEST',
|
||||
}
|
||||
|
||||
enum __AccessValues {
|
||||
UNKNOWN_ACCESS = 0,
|
||||
NO_MEMBERSHIP = 1,
|
||||
INVITATION_ONLY = 2,
|
||||
ON_REQUEST = 3
|
||||
ON_REQUEST = 3,
|
||||
}
|
||||
|
||||
export namespace Access {
|
||||
|
@ -99,7 +109,7 @@ export namespace CommunityPermissions {
|
|||
return message<CommunityPermissions>({
|
||||
1: { name: 'ensOnly', codec: bool },
|
||||
2: { name: 'private', codec: bool },
|
||||
3: { name: 'access', codec: CommunityPermissions.Access.codec() }
|
||||
3: { name: 'access', codec: CommunityPermissions.Access.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -131,7 +141,7 @@ export namespace CommunityDescription {
|
|||
5: { name: 'identity', codec: ChatIdentity.codec() },
|
||||
6: { name: 'chats', codec: CommunityChat.codec() },
|
||||
7: { name: 'banList', codec: string, repeats: true },
|
||||
8: { name: 'categories', codec: CommunityCategory.codec() }
|
||||
8: { name: 'categories', codec: CommunityCategory.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -159,7 +169,7 @@ export namespace CommunityChat {
|
|||
2: { name: 'permissions', codec: CommunityPermissions.codec() },
|
||||
3: { name: 'identity', codec: ChatIdentity.codec() },
|
||||
4: { name: 'categoryId', codec: string },
|
||||
5: { name: 'position', codec: int32 }
|
||||
5: { name: 'position', codec: int32 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -183,7 +193,7 @@ export namespace CommunityCategory {
|
|||
return message<CommunityCategory>({
|
||||
1: { name: 'categoryId', codec: string },
|
||||
2: { name: 'name', codec: string },
|
||||
3: { name: 'position', codec: int32 }
|
||||
3: { name: 'position', codec: int32 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -209,7 +219,7 @@ export namespace CommunityInvitation {
|
|||
1: { name: 'communityDescription', codec: bytes },
|
||||
2: { name: 'grant', codec: bytes },
|
||||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'publicKey', codec: bytes }
|
||||
4: { name: 'publicKey', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -235,7 +245,7 @@ export namespace CommunityRequestToJoin {
|
|||
1: { name: 'clock', codec: uint64 },
|
||||
2: { name: 'ensName', codec: string },
|
||||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'communityId', codec: bytes }
|
||||
4: { name: 'communityId', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -261,7 +271,7 @@ export namespace CommunityRequestToJoinResponse {
|
|||
1: { name: 'clock', codec: uint64 },
|
||||
2: { name: 'community', codec: CommunityDescription.codec() },
|
||||
3: { name: 'accepted', codec: bool },
|
||||
4: { name: 'grant', codec: bytes }
|
||||
4: { name: 'grant', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -293,7 +303,7 @@ export namespace ChatIdentity {
|
|||
4: { name: 'displayName', codec: string },
|
||||
5: { name: 'description', codec: string },
|
||||
6: { name: 'color', codec: string },
|
||||
7: { name: 'emoji', codec: string }
|
||||
7: { name: 'emoji', codec: string },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -318,13 +328,13 @@ export namespace IdentityImage {
|
|||
export enum SourceType {
|
||||
UNKNOWN_SOURCE_TYPE = 'UNKNOWN_SOURCE_TYPE',
|
||||
RAW_PAYLOAD = 'RAW_PAYLOAD',
|
||||
ENS_AVATAR = 'ENS_AVATAR'
|
||||
ENS_AVATAR = 'ENS_AVATAR',
|
||||
}
|
||||
|
||||
enum __SourceTypeValues {
|
||||
UNKNOWN_SOURCE_TYPE = 0,
|
||||
RAW_PAYLOAD = 1,
|
||||
ENS_AVATAR = 2
|
||||
ENS_AVATAR = 2,
|
||||
}
|
||||
|
||||
export namespace SourceType {
|
||||
|
@ -339,7 +349,7 @@ export namespace IdentityImage {
|
|||
2: { name: 'sourceType', codec: IdentityImage.SourceType.codec() },
|
||||
3: { name: 'imageType', codec: ImageType.codec() },
|
||||
4: { name: 'encryptionKeys', codec: bytes, repeats: true },
|
||||
5: { name: 'encrypted', codec: bool }
|
||||
5: { name: 'encrypted', codec: bool },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -359,7 +369,7 @@ export enum MessageType {
|
|||
PRIVATE_GROUP = 'PRIVATE_GROUP',
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 'SYSTEM_MESSAGE_PRIVATE_GROUP',
|
||||
COMMUNITY_CHAT = 'COMMUNITY_CHAT',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __MessageTypeValues {
|
||||
|
@ -369,7 +379,7 @@ enum __MessageTypeValues {
|
|||
PRIVATE_GROUP = 3,
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 4,
|
||||
COMMUNITY_CHAT = 5,
|
||||
SYSTEM_MESSAGE_GAP = 6
|
||||
SYSTEM_MESSAGE_GAP = 6,
|
||||
}
|
||||
|
||||
export namespace MessageType {
|
||||
|
@ -382,7 +392,7 @@ export enum ImageType {
|
|||
PNG = 'PNG',
|
||||
JPEG = 'JPEG',
|
||||
WEBP = 'WEBP',
|
||||
GIF = 'GIF'
|
||||
GIF = 'GIF',
|
||||
}
|
||||
|
||||
enum __ImageTypeValues {
|
||||
|
@ -390,7 +400,7 @@ enum __ImageTypeValues {
|
|||
PNG = 1,
|
||||
JPEG = 2,
|
||||
WEBP = 3,
|
||||
GIF = 4
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export namespace ImageType {
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { encodeMessage, decodeMessage, message, bytes, string, uint64, enumeration, bool, int32, uint32 } from 'protons-runtime'
|
||||
import {
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
bytes,
|
||||
string,
|
||||
uint64,
|
||||
enumeration,
|
||||
bool,
|
||||
int32,
|
||||
uint32,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface Grant {
|
||||
|
@ -17,7 +28,7 @@ export namespace Grant {
|
|||
1: { name: 'communityId', codec: bytes },
|
||||
2: { name: 'memberId', codec: bytes },
|
||||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'clock', codec: uint64 }
|
||||
4: { name: 'clock', codec: uint64 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -38,13 +49,13 @@ export namespace CommunityMember {
|
|||
export enum Roles {
|
||||
UNKNOWN_ROLE = 'UNKNOWN_ROLE',
|
||||
ROLE_ALL = 'ROLE_ALL',
|
||||
ROLE_MANAGE_USERS = 'ROLE_MANAGE_USERS'
|
||||
ROLE_MANAGE_USERS = 'ROLE_MANAGE_USERS',
|
||||
}
|
||||
|
||||
enum __RolesValues {
|
||||
UNKNOWN_ROLE = 0,
|
||||
ROLE_ALL = 1,
|
||||
ROLE_MANAGE_USERS = 2
|
||||
ROLE_MANAGE_USERS = 2,
|
||||
}
|
||||
|
||||
export namespace Roles {
|
||||
|
@ -55,7 +66,7 @@ export namespace CommunityMember {
|
|||
|
||||
export const codec = (): Codec<CommunityMember> => {
|
||||
return message<CommunityMember>({
|
||||
1: { name: 'roles', codec: CommunityMember.Roles.codec(), repeats: true }
|
||||
1: { name: 'roles', codec: CommunityMember.Roles.codec(), repeats: true },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -79,14 +90,14 @@ export namespace CommunityPermissions {
|
|||
UNKNOWN_ACCESS = 'UNKNOWN_ACCESS',
|
||||
NO_MEMBERSHIP = 'NO_MEMBERSHIP',
|
||||
INVITATION_ONLY = 'INVITATION_ONLY',
|
||||
ON_REQUEST = 'ON_REQUEST'
|
||||
ON_REQUEST = 'ON_REQUEST',
|
||||
}
|
||||
|
||||
enum __AccessValues {
|
||||
UNKNOWN_ACCESS = 0,
|
||||
NO_MEMBERSHIP = 1,
|
||||
INVITATION_ONLY = 2,
|
||||
ON_REQUEST = 3
|
||||
ON_REQUEST = 3,
|
||||
}
|
||||
|
||||
export namespace Access {
|
||||
|
@ -99,7 +110,7 @@ export namespace CommunityPermissions {
|
|||
return message<CommunityPermissions>({
|
||||
1: { name: 'ensOnly', codec: bool },
|
||||
2: { name: 'private', codec: bool },
|
||||
3: { name: 'access', codec: CommunityPermissions.Access.codec() }
|
||||
3: { name: 'access', codec: CommunityPermissions.Access.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -135,7 +146,7 @@ export namespace CommunityDescription {
|
|||
7: { name: 'banList', codec: string, repeats: true },
|
||||
8: { name: 'categories', codec: CommunityCategory.codec() },
|
||||
9: { name: 'archiveMagnetlinkClock', codec: uint64 },
|
||||
10: { name: 'adminSettings', codec: CommunityAdminSettings.codec() }
|
||||
10: { name: 'adminSettings', codec: CommunityAdminSettings.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -155,7 +166,7 @@ export interface CommunityAdminSettings {
|
|||
export namespace CommunityAdminSettings {
|
||||
export const codec = (): Codec<CommunityAdminSettings> => {
|
||||
return message<CommunityAdminSettings>({
|
||||
1: { name: 'pinMessageAllMembersEnabled', codec: bool }
|
||||
1: { name: 'pinMessageAllMembersEnabled', codec: bool },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -183,7 +194,7 @@ export namespace CommunityChat {
|
|||
2: { name: 'permissions', codec: CommunityPermissions.codec() },
|
||||
3: { name: 'identity', codec: ChatIdentity.codec() },
|
||||
4: { name: 'categoryId', codec: string },
|
||||
5: { name: 'position', codec: int32 }
|
||||
5: { name: 'position', codec: int32 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -207,7 +218,7 @@ export namespace CommunityCategory {
|
|||
return message<CommunityCategory>({
|
||||
1: { name: 'categoryId', codec: string },
|
||||
2: { name: 'name', codec: string },
|
||||
3: { name: 'position', codec: int32 }
|
||||
3: { name: 'position', codec: int32 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -233,7 +244,7 @@ export namespace CommunityInvitation {
|
|||
1: { name: 'communityDescription', codec: bytes },
|
||||
2: { name: 'grant', codec: bytes },
|
||||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'publicKey', codec: bytes }
|
||||
4: { name: 'publicKey', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -259,7 +270,7 @@ export namespace CommunityRequestToJoin {
|
|||
1: { name: 'clock', codec: uint64 },
|
||||
2: { name: 'ensName', codec: string },
|
||||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'communityId', codec: bytes }
|
||||
4: { name: 'communityId', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -285,7 +296,7 @@ export namespace CommunityRequestToJoinResponse {
|
|||
1: { name: 'clock', codec: uint64 },
|
||||
2: { name: 'community', codec: CommunityDescription.codec() },
|
||||
3: { name: 'accepted', codec: bool },
|
||||
4: { name: 'grant', codec: bytes }
|
||||
4: { name: 'grant', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -307,15 +318,19 @@ export namespace CommunityMessageArchiveMagnetlink {
|
|||
export const codec = (): Codec<CommunityMessageArchiveMagnetlink> => {
|
||||
return message<CommunityMessageArchiveMagnetlink>({
|
||||
1: { name: 'clock', codec: uint64 },
|
||||
2: { name: 'magnetUri', codec: string }
|
||||
2: { name: 'magnetUri', codec: string },
|
||||
})
|
||||
}
|
||||
|
||||
export const encode = (obj: CommunityMessageArchiveMagnetlink): Uint8Array => {
|
||||
export const encode = (
|
||||
obj: CommunityMessageArchiveMagnetlink
|
||||
): Uint8Array => {
|
||||
return encodeMessage(obj, CommunityMessageArchiveMagnetlink.codec())
|
||||
}
|
||||
|
||||
export const decode = (buf: Uint8Array): CommunityMessageArchiveMagnetlink => {
|
||||
export const decode = (
|
||||
buf: Uint8Array
|
||||
): CommunityMessageArchiveMagnetlink => {
|
||||
return decodeMessage(buf, CommunityMessageArchiveMagnetlink.codec())
|
||||
}
|
||||
}
|
||||
|
@ -337,7 +352,7 @@ export namespace WakuMessage {
|
|||
3: { name: 'topic', codec: bytes },
|
||||
4: { name: 'payload', codec: bytes },
|
||||
5: { name: 'padding', codec: bytes },
|
||||
6: { name: 'hash', codec: bytes }
|
||||
6: { name: 'hash', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -363,7 +378,7 @@ export namespace WakuMessageArchiveMetadata {
|
|||
1: { name: 'version', codec: uint32 },
|
||||
2: { name: 'from', codec: uint64 },
|
||||
3: { name: 'to', codec: uint64 },
|
||||
4: { name: 'contentTopic', codec: bytes, repeats: true }
|
||||
4: { name: 'contentTopic', codec: bytes, repeats: true },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -387,7 +402,7 @@ export namespace WakuMessageArchive {
|
|||
return message<WakuMessageArchive>({
|
||||
1: { name: 'version', codec: uint32 },
|
||||
2: { name: 'metadata', codec: WakuMessageArchiveMetadata.codec() },
|
||||
3: { name: 'messages', codec: WakuMessage.codec(), repeats: true }
|
||||
3: { name: 'messages', codec: WakuMessage.codec(), repeats: true },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -415,7 +430,7 @@ export namespace WakuMessageArchiveIndexMetadata {
|
|||
2: { name: 'metadata', codec: WakuMessageArchiveMetadata.codec() },
|
||||
3: { name: 'offset', codec: uint64 },
|
||||
4: { name: 'size', codec: uint64 },
|
||||
5: { name: 'padding', codec: uint64 }
|
||||
5: { name: 'padding', codec: uint64 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -435,7 +450,7 @@ export interface WakuMessageArchiveIndex {
|
|||
export namespace WakuMessageArchiveIndex {
|
||||
export const codec = (): Codec<WakuMessageArchiveIndex> => {
|
||||
return message<WakuMessageArchiveIndex>({
|
||||
1: { name: 'archives', codec: WakuMessageArchiveIndexMetadata.codec() }
|
||||
1: { name: 'archives', codec: WakuMessageArchiveIndexMetadata.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -467,7 +482,7 @@ export namespace ChatIdentity {
|
|||
4: { name: 'displayName', codec: string },
|
||||
5: { name: 'description', codec: string },
|
||||
6: { name: 'color', codec: string },
|
||||
7: { name: 'emoji', codec: string }
|
||||
7: { name: 'emoji', codec: string },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -492,13 +507,13 @@ export namespace IdentityImage {
|
|||
export enum SourceType {
|
||||
UNKNOWN_SOURCE_TYPE = 'UNKNOWN_SOURCE_TYPE',
|
||||
RAW_PAYLOAD = 'RAW_PAYLOAD',
|
||||
ENS_AVATAR = 'ENS_AVATAR'
|
||||
ENS_AVATAR = 'ENS_AVATAR',
|
||||
}
|
||||
|
||||
enum __SourceTypeValues {
|
||||
UNKNOWN_SOURCE_TYPE = 0,
|
||||
RAW_PAYLOAD = 1,
|
||||
ENS_AVATAR = 2
|
||||
ENS_AVATAR = 2,
|
||||
}
|
||||
|
||||
export namespace SourceType {
|
||||
|
@ -513,7 +528,7 @@ export namespace IdentityImage {
|
|||
2: { name: 'sourceType', codec: IdentityImage.SourceType.codec() },
|
||||
3: { name: 'imageType', codec: ImageType.codec() },
|
||||
4: { name: 'encryptionKeys', codec: bytes, repeats: true },
|
||||
5: { name: 'encrypted', codec: bool }
|
||||
5: { name: 'encrypted', codec: bool },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -533,7 +548,7 @@ export enum MessageType {
|
|||
PRIVATE_GROUP = 'PRIVATE_GROUP',
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 'SYSTEM_MESSAGE_PRIVATE_GROUP',
|
||||
COMMUNITY_CHAT = 'COMMUNITY_CHAT',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __MessageTypeValues {
|
||||
|
@ -543,7 +558,7 @@ enum __MessageTypeValues {
|
|||
PRIVATE_GROUP = 3,
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 4,
|
||||
COMMUNITY_CHAT = 5,
|
||||
SYSTEM_MESSAGE_GAP = 6
|
||||
SYSTEM_MESSAGE_GAP = 6,
|
||||
}
|
||||
|
||||
export namespace MessageType {
|
||||
|
@ -556,7 +571,7 @@ export enum ImageType {
|
|||
PNG = 'PNG',
|
||||
JPEG = 'JPEG',
|
||||
WEBP = 'WEBP',
|
||||
GIF = 'GIF'
|
||||
GIF = 'GIF',
|
||||
}
|
||||
|
||||
enum __ImageTypeValues {
|
||||
|
@ -564,7 +579,7 @@ enum __ImageTypeValues {
|
|||
PNG = 1,
|
||||
JPEG = 2,
|
||||
WEBP = 3,
|
||||
GIF = 4
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export namespace ImageType {
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { enumeration, encodeMessage, decodeMessage, message, uint64, string, bool, bytes } from 'protons-runtime'
|
||||
import {
|
||||
enumeration,
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
uint64,
|
||||
string,
|
||||
bool,
|
||||
bytes,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface EmojiReaction {
|
||||
|
@ -22,7 +31,7 @@ export namespace EmojiReaction {
|
|||
THUMBS_DOWN = 'THUMBS_DOWN',
|
||||
LAUGH = 'LAUGH',
|
||||
SAD = 'SAD',
|
||||
ANGRY = 'ANGRY'
|
||||
ANGRY = 'ANGRY',
|
||||
}
|
||||
|
||||
enum __TypeValues {
|
||||
|
@ -32,7 +41,7 @@ export namespace EmojiReaction {
|
|||
THUMBS_DOWN = 3,
|
||||
LAUGH = 4,
|
||||
SAD = 5,
|
||||
ANGRY = 6
|
||||
ANGRY = 6,
|
||||
}
|
||||
|
||||
export namespace Type {
|
||||
|
@ -49,7 +58,7 @@ export namespace EmojiReaction {
|
|||
4: { name: 'messageType', codec: MessageType.codec() },
|
||||
5: { name: 'type', codec: EmojiReaction.Type.codec() },
|
||||
6: { name: 'retracted', codec: bool },
|
||||
7: { name: 'grant', codec: bytes }
|
||||
7: { name: 'grant', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -69,7 +78,7 @@ export enum MessageType {
|
|||
PRIVATE_GROUP = 'PRIVATE_GROUP',
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 'SYSTEM_MESSAGE_PRIVATE_GROUP',
|
||||
COMMUNITY_CHAT = 'COMMUNITY_CHAT',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __MessageTypeValues {
|
||||
|
@ -79,7 +88,7 @@ enum __MessageTypeValues {
|
|||
PRIVATE_GROUP = 3,
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 4,
|
||||
COMMUNITY_CHAT = 5,
|
||||
SYSTEM_MESSAGE_GAP = 6
|
||||
SYSTEM_MESSAGE_GAP = 6,
|
||||
}
|
||||
|
||||
export namespace MessageType {
|
||||
|
@ -92,7 +101,7 @@ export enum ImageType {
|
|||
PNG = 'PNG',
|
||||
JPEG = 'JPEG',
|
||||
WEBP = 'WEBP',
|
||||
GIF = 'GIF'
|
||||
GIF = 'GIF',
|
||||
}
|
||||
|
||||
enum __ImageTypeValues {
|
||||
|
@ -100,7 +109,7 @@ enum __ImageTypeValues {
|
|||
PNG = 1,
|
||||
JPEG = 2,
|
||||
WEBP = 3,
|
||||
GIF = 4
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export namespace ImageType {
|
||||
|
|
|
@ -10,7 +10,7 @@ export enum MessageType {
|
|||
PRIVATE_GROUP = 'PRIVATE_GROUP',
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 'SYSTEM_MESSAGE_PRIVATE_GROUP',
|
||||
COMMUNITY_CHAT = 'COMMUNITY_CHAT',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __MessageTypeValues {
|
||||
|
@ -20,7 +20,7 @@ enum __MessageTypeValues {
|
|||
PRIVATE_GROUP = 3,
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 4,
|
||||
COMMUNITY_CHAT = 5,
|
||||
SYSTEM_MESSAGE_GAP = 6
|
||||
SYSTEM_MESSAGE_GAP = 6,
|
||||
}
|
||||
|
||||
export namespace MessageType {
|
||||
|
@ -33,7 +33,7 @@ export enum ImageType {
|
|||
PNG = 'PNG',
|
||||
JPEG = 'JPEG',
|
||||
WEBP = 'WEBP',
|
||||
GIF = 'GIF'
|
||||
GIF = 'GIF',
|
||||
}
|
||||
|
||||
enum __ImageTypeValues {
|
||||
|
@ -41,7 +41,7 @@ enum __ImageTypeValues {
|
|||
PNG = 1,
|
||||
JPEG = 2,
|
||||
WEBP = 3,
|
||||
GIF = 4
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export namespace ImageType {
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { enumeration, encodeMessage, decodeMessage, message, uint64, string, bytes, int32, bool } from 'protons-runtime'
|
||||
import {
|
||||
enumeration,
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
uint64,
|
||||
string,
|
||||
bytes,
|
||||
int32,
|
||||
bool,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface MembershipUpdateEvent {
|
||||
|
@ -20,7 +30,7 @@ export namespace MembershipUpdateEvent {
|
|||
MEMBER_JOINED = 'MEMBER_JOINED',
|
||||
MEMBER_REMOVED = 'MEMBER_REMOVED',
|
||||
ADMINS_ADDED = 'ADMINS_ADDED',
|
||||
ADMIN_REMOVED = 'ADMIN_REMOVED'
|
||||
ADMIN_REMOVED = 'ADMIN_REMOVED',
|
||||
}
|
||||
|
||||
enum __EventTypeValues {
|
||||
|
@ -31,7 +41,7 @@ export namespace MembershipUpdateEvent {
|
|||
MEMBER_JOINED = 4,
|
||||
MEMBER_REMOVED = 5,
|
||||
ADMINS_ADDED = 6,
|
||||
ADMIN_REMOVED = 7
|
||||
ADMIN_REMOVED = 7,
|
||||
}
|
||||
|
||||
export namespace EventType {
|
||||
|
@ -45,7 +55,7 @@ export namespace MembershipUpdateEvent {
|
|||
1: { name: 'clock', codec: uint64 },
|
||||
2: { name: 'members', codec: string, repeats: true },
|
||||
3: { name: 'name', codec: string },
|
||||
4: { name: 'type', codec: MembershipUpdateEvent.EventType.codec() }
|
||||
4: { name: 'type', codec: MembershipUpdateEvent.EventType.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -71,7 +81,7 @@ export namespace MembershipUpdateMessage {
|
|||
1: { name: 'chatId', codec: string },
|
||||
2: { name: 'events', codec: bytes, repeats: true },
|
||||
3: { name: 'message', codec: ChatMessage.codec() },
|
||||
4: { name: 'emojiReaction', codec: EmojiReaction.codec() }
|
||||
4: { name: 'emojiReaction', codec: EmojiReaction.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -93,7 +103,7 @@ export namespace StickerMessage {
|
|||
export const codec = (): Codec<StickerMessage> => {
|
||||
return message<StickerMessage>({
|
||||
1: { name: 'hash', codec: string },
|
||||
2: { name: 'pack', codec: int32 }
|
||||
2: { name: 'pack', codec: int32 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -115,7 +125,7 @@ export namespace ImageMessage {
|
|||
export const codec = (): Codec<ImageMessage> => {
|
||||
return message<ImageMessage>({
|
||||
1: { name: 'payload', codec: bytes },
|
||||
2: { name: 'type', codec: ImageType.codec() }
|
||||
2: { name: 'type', codec: ImageType.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -138,13 +148,13 @@ export namespace AudioMessage {
|
|||
export enum AudioType {
|
||||
UNKNOWN_AUDIO_TYPE = 'UNKNOWN_AUDIO_TYPE',
|
||||
AAC = 'AAC',
|
||||
AMR = 'AMR'
|
||||
AMR = 'AMR',
|
||||
}
|
||||
|
||||
enum __AudioTypeValues {
|
||||
UNKNOWN_AUDIO_TYPE = 0,
|
||||
AAC = 1,
|
||||
AMR = 2
|
||||
AMR = 2,
|
||||
}
|
||||
|
||||
export namespace AudioType {
|
||||
|
@ -157,7 +167,7 @@ export namespace AudioMessage {
|
|||
return message<AudioMessage>({
|
||||
1: { name: 'payload', codec: bytes },
|
||||
2: { name: 'type', codec: AudioMessage.AudioType.codec() },
|
||||
3: { name: 'durationMs', codec: uint64 }
|
||||
3: { name: 'durationMs', codec: uint64 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -187,7 +197,7 @@ export namespace EditMessage {
|
|||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'messageId', codec: string },
|
||||
5: { name: 'grant', codec: bytes },
|
||||
6: { name: 'messageType', codec: MessageType.codec() }
|
||||
6: { name: 'messageType', codec: MessageType.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -215,7 +225,7 @@ export namespace DeleteMessage {
|
|||
2: { name: 'chatId', codec: string },
|
||||
3: { name: 'messageId', codec: string },
|
||||
4: { name: 'grant', codec: bytes },
|
||||
5: { name: 'messageType', codec: MessageType.codec() }
|
||||
5: { name: 'messageType', codec: MessageType.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -257,7 +267,7 @@ export namespace ChatMessage {
|
|||
IMAGE = 'IMAGE',
|
||||
AUDIO = 'AUDIO',
|
||||
COMMUNITY = 'COMMUNITY',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __ContentTypeValues {
|
||||
|
@ -271,7 +281,7 @@ export namespace ChatMessage {
|
|||
IMAGE = 7,
|
||||
AUDIO = 8,
|
||||
COMMUNITY = 9,
|
||||
SYSTEM_MESSAGE_GAP = 10
|
||||
SYSTEM_MESSAGE_GAP = 10,
|
||||
}
|
||||
|
||||
export namespace ContentType {
|
||||
|
@ -295,7 +305,7 @@ export namespace ChatMessage {
|
|||
11: { name: 'audio', codec: AudioMessage.codec() },
|
||||
12: { name: 'community', codec: bytes },
|
||||
13: { name: 'grant', codec: bytes },
|
||||
14: { name: 'displayName', codec: string }
|
||||
14: { name: 'displayName', codec: string },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -315,7 +325,7 @@ export enum MessageType {
|
|||
PRIVATE_GROUP = 'PRIVATE_GROUP',
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 'SYSTEM_MESSAGE_PRIVATE_GROUP',
|
||||
COMMUNITY_CHAT = 'COMMUNITY_CHAT',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __MessageTypeValues {
|
||||
|
@ -325,7 +335,7 @@ enum __MessageTypeValues {
|
|||
PRIVATE_GROUP = 3,
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 4,
|
||||
COMMUNITY_CHAT = 5,
|
||||
SYSTEM_MESSAGE_GAP = 6
|
||||
SYSTEM_MESSAGE_GAP = 6,
|
||||
}
|
||||
|
||||
export namespace MessageType {
|
||||
|
@ -338,7 +348,7 @@ export enum ImageType {
|
|||
PNG = 'PNG',
|
||||
JPEG = 'JPEG',
|
||||
WEBP = 'WEBP',
|
||||
GIF = 'GIF'
|
||||
GIF = 'GIF',
|
||||
}
|
||||
|
||||
enum __ImageTypeValues {
|
||||
|
@ -346,7 +356,7 @@ enum __ImageTypeValues {
|
|||
PNG = 1,
|
||||
JPEG = 2,
|
||||
WEBP = 3,
|
||||
GIF = 4
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export namespace ImageType {
|
||||
|
@ -372,7 +382,7 @@ export namespace EmojiReaction {
|
|||
THUMBS_DOWN = 'THUMBS_DOWN',
|
||||
LAUGH = 'LAUGH',
|
||||
SAD = 'SAD',
|
||||
ANGRY = 'ANGRY'
|
||||
ANGRY = 'ANGRY',
|
||||
}
|
||||
|
||||
enum __TypeValues {
|
||||
|
@ -382,7 +392,7 @@ export namespace EmojiReaction {
|
|||
THUMBS_DOWN = 3,
|
||||
LAUGH = 4,
|
||||
SAD = 5,
|
||||
ANGRY = 6
|
||||
ANGRY = 6,
|
||||
}
|
||||
|
||||
export namespace Type {
|
||||
|
@ -399,7 +409,7 @@ export namespace EmojiReaction {
|
|||
4: { name: 'messageType', codec: MessageType.codec() },
|
||||
5: { name: 'type', codec: EmojiReaction.Type.codec() },
|
||||
6: { name: 'retracted', codec: bool },
|
||||
7: { name: 'grant', codec: bytes }
|
||||
7: { name: 'grant', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { encodeMessage, decodeMessage, message, uint64, string, bool, enumeration } from 'protons-runtime'
|
||||
import {
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
uint64,
|
||||
string,
|
||||
bool,
|
||||
enumeration,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface PinMessage {
|
||||
|
@ -19,7 +27,7 @@ export namespace PinMessage {
|
|||
2: { name: 'messageId', codec: string },
|
||||
3: { name: 'chatId', codec: string },
|
||||
4: { name: 'pinned', codec: bool },
|
||||
5: { name: 'messageType', codec: MessageType.codec() }
|
||||
5: { name: 'messageType', codec: MessageType.codec() },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -39,7 +47,7 @@ export enum MessageType {
|
|||
PRIVATE_GROUP = 'PRIVATE_GROUP',
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 'SYSTEM_MESSAGE_PRIVATE_GROUP',
|
||||
COMMUNITY_CHAT = 'COMMUNITY_CHAT',
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP'
|
||||
SYSTEM_MESSAGE_GAP = 'SYSTEM_MESSAGE_GAP',
|
||||
}
|
||||
|
||||
enum __MessageTypeValues {
|
||||
|
@ -49,7 +57,7 @@ enum __MessageTypeValues {
|
|||
PRIVATE_GROUP = 3,
|
||||
SYSTEM_MESSAGE_PRIVATE_GROUP = 4,
|
||||
COMMUNITY_CHAT = 5,
|
||||
SYSTEM_MESSAGE_GAP = 6
|
||||
SYSTEM_MESSAGE_GAP = 6,
|
||||
}
|
||||
|
||||
export namespace MessageType {
|
||||
|
@ -62,7 +70,7 @@ export enum ImageType {
|
|||
PNG = 'PNG',
|
||||
JPEG = 'JPEG',
|
||||
WEBP = 'WEBP',
|
||||
GIF = 'GIF'
|
||||
GIF = 'GIF',
|
||||
}
|
||||
|
||||
enum __ImageTypeValues {
|
||||
|
@ -70,7 +78,7 @@ enum __ImageTypeValues {
|
|||
PNG = 1,
|
||||
JPEG = 2,
|
||||
WEBP = 3,
|
||||
GIF = 4
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export namespace ImageType {
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { encodeMessage, decodeMessage, message, bytes, uint32, int64, string } from 'protons-runtime'
|
||||
import {
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
bytes,
|
||||
uint32,
|
||||
int64,
|
||||
string,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface SignedPreKey {
|
||||
|
@ -15,7 +23,7 @@ export namespace SignedPreKey {
|
|||
return message<SignedPreKey>({
|
||||
1: { name: 'signedPreKey', codec: bytes },
|
||||
2: { name: 'version', codec: uint32 },
|
||||
3: { name: 'protocolVersion', codec: uint32 }
|
||||
3: { name: 'protocolVersion', codec: uint32 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -41,7 +49,7 @@ export namespace Bundle {
|
|||
1: { name: 'identity', codec: bytes },
|
||||
2: { name: 'signedPreKeys', codec: SignedPreKey.codec() },
|
||||
4: { name: 'signature', codec: bytes },
|
||||
5: { name: 'timestamp', codec: int64 }
|
||||
5: { name: 'timestamp', codec: int64 },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -63,7 +71,7 @@ export namespace BundleContainer {
|
|||
export const codec = (): Codec<BundleContainer> => {
|
||||
return message<BundleContainer>({
|
||||
1: { name: 'bundle', codec: Bundle.codec() },
|
||||
2: { name: 'privateSignedPreKey', codec: bytes }
|
||||
2: { name: 'privateSignedPreKey', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -89,7 +97,7 @@ export namespace DRHeader {
|
|||
1: { name: 'key', codec: bytes },
|
||||
2: { name: 'n', codec: uint32 },
|
||||
3: { name: 'pn', codec: uint32 },
|
||||
4: { name: 'id', codec: bytes }
|
||||
4: { name: 'id', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -109,7 +117,7 @@ export interface DHHeader {
|
|||
export namespace DHHeader {
|
||||
export const codec = (): Codec<DHHeader> => {
|
||||
return message<DHHeader>({
|
||||
1: { name: 'key', codec: bytes }
|
||||
1: { name: 'key', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -131,7 +139,7 @@ export namespace X3DHHeader {
|
|||
export const codec = (): Codec<X3DHHeader> => {
|
||||
return message<X3DHHeader>({
|
||||
1: { name: 'key', codec: bytes },
|
||||
4: { name: 'id', codec: bytes }
|
||||
4: { name: 'id', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -155,7 +163,7 @@ export namespace HRHeader {
|
|||
return message<HRHeader>({
|
||||
1: { name: 'keyId', codec: uint32 },
|
||||
2: { name: 'seqNo', codec: uint32 },
|
||||
3: { name: 'groupId', codec: string }
|
||||
3: { name: 'groupId', codec: string },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -183,7 +191,7 @@ export namespace EncryptedMessageProtocol {
|
|||
2: { name: 'DRHeader', codec: DRHeader.codec() },
|
||||
101: { name: 'DHHeader', codec: DHHeader.codec() },
|
||||
102: { name: 'HRHeader', codec: HRHeader.codec() },
|
||||
3: { name: 'payload', codec: bytes }
|
||||
3: { name: 'payload', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -208,8 +216,11 @@ export namespace ProtocolMessage {
|
|||
return message<ProtocolMessage>({
|
||||
2: { name: 'installationId', codec: string },
|
||||
3: { name: 'bundles', codec: Bundle.codec(), repeats: true },
|
||||
101: { name: 'encryptedMessage', codec: EncryptedMessageProtocol.codec() },
|
||||
102: { name: 'publicMessage', codec: bytes }
|
||||
101: {
|
||||
name: 'encryptedMessage',
|
||||
codec: EncryptedMessageProtocol.codec(),
|
||||
},
|
||||
102: { name: 'publicMessage', codec: bytes },
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
|
||||
import { enumeration, encodeMessage, decodeMessage, message, uint64, string } from 'protons-runtime'
|
||||
import {
|
||||
enumeration,
|
||||
encodeMessage,
|
||||
decodeMessage,
|
||||
message,
|
||||
uint64,
|
||||
string,
|
||||
} from 'protons-runtime'
|
||||
import type { Codec } from 'protons-runtime'
|
||||
|
||||
export interface StatusUpdate {
|
||||
|
@ -16,7 +23,7 @@ export namespace StatusUpdate {
|
|||
AUTOMATIC = 'AUTOMATIC',
|
||||
DO_NOT_DISTURB = 'DO_NOT_DISTURB',
|
||||
ALWAYS_ONLINE = 'ALWAYS_ONLINE',
|
||||
INACTIVE = 'INACTIVE'
|
||||
INACTIVE = 'INACTIVE',
|
||||
}
|
||||
|
||||
enum __StatusTypeValues {
|
||||
|
@ -24,7 +31,7 @@ export namespace StatusUpdate {
|
|||
AUTOMATIC = 1,
|
||||
DO_NOT_DISTURB = 2,
|
||||
ALWAYS_ONLINE = 3,
|
||||
INACTIVE = 4
|
||||
INACTIVE = 4,
|
||||
}
|
||||
|
||||
export namespace StatusType {
|
||||
|
@ -37,7 +44,7 @@ export namespace StatusUpdate {
|
|||
return message<StatusUpdate>({
|
||||
1: { name: 'clock', codec: uint64 },
|
||||
2: { name: 'statusType', codec: StatusUpdate.StatusType.codec() },
|
||||
3: { name: 'customText', codec: string }
|
||||
3: { name: 'customText', codec: string },
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Avatar, Dialog, TextInput } from '../../system'
|
||||
|
||||
export const EditGroupChatDialog = () => {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { BellIcon } from '../../icons/bell-icon'
|
||||
import { ContextMenu, DropdownMenu } from '../../system'
|
||||
// import { useAlertDialog } from '../../system/dialog/alert-dialog'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import {
|
||||
Avatar,
|
||||
Dialog,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Text } from '../../system'
|
||||
|
||||
export const Failed = () => {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import ContentLoader from 'react-content-loader'
|
||||
|
||||
import { styled } from '../../styles/config'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
|
||||
import * as Collapsible from '@radix-ui/react-collapsible'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { forwardRef } from 'react'
|
||||
import { forwardRef } from 'react'
|
||||
|
||||
import { NavLink } from 'react-router-dom'
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useSortedChats } from '../../../../protocol'
|
||||
import { Box } from '../../../../system'
|
||||
import { ChatCategory } from './chat-category'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useProtocol } from '../../../../protocol'
|
||||
import { Button, CopyInput, Dialog, Flex, Grid, Text } from '../../../../system'
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useProtocol } from '../../../../protocol'
|
||||
import { styled } from '../../../../styles/config'
|
||||
import { Avatar, DialogTrigger, Text } from '../../../../system'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
|
||||
import { styled } from '../../../../styles/config'
|
||||
import { Dialog, Grid, Text } from '../../../../system'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useAccount } from '../../../../protocol'
|
||||
import { Button, Flex } from '../../../../system'
|
||||
import { Grid } from '../../../../system/grid'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
|
||||
import { QRCodeSVG } from 'qrcode.react'
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import {
|
||||
Avatar,
|
||||
Dialog,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useAppState } from '../../contexts/app-context'
|
||||
import { useAccount } from '../../protocol'
|
||||
import { styled } from '../../styles/config'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useAccount } from '../../protocol'
|
||||
import {
|
||||
Avatar,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useAccount, useMembers } from '../../protocol'
|
||||
import { styled } from '../../styles/config'
|
||||
import { Grid, Heading } from '../../system'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Text } from '../../system'
|
||||
|
||||
import type React from 'react'
|
||||
|
||||
interface Props {
|
||||
label: string
|
||||
children: React.ReactElement[] | React.ReactElement
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Avatar, EthAddress, Flex, Text } from '../../system'
|
||||
|
||||
import type { Member } from '../../protocol'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { styled } from '../../styles/config'
|
||||
import { Avatar, DialogTrigger, EthAddress, Flex, Text } from '../../system'
|
||||
import { DisconnectDialog } from './disconnect-dialog'
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useAccount } from '../../protocol'
|
||||
import { styled } from '../../styles/config'
|
||||
import { Flex, Image, Popover, PopoverTrigger } from '../../system'
|
||||
|
||||
import type { Reaction, Reactions } from '../../protocol'
|
||||
import type React from 'react'
|
||||
|
||||
interface Props {
|
||||
children: React.ReactElement
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Avatar, Dialog, EmojiHash, Heading, Text } from '../../system'
|
||||
|
||||
import type { Member } from '../../protocol'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
|
||||
import { useProtocol } from '../../protocol'
|
||||
import { Avatar, Checkbox, Dialog, Flex, Text } from '../../system'
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React, { createContext, useContext, useMemo, useReducer } from 'react'
|
||||
import { createContext, useContext, useMemo, useReducer } from 'react'
|
||||
|
||||
import type { Config } from '../types/config'
|
||||
import type React from 'react'
|
||||
import type { Dispatch, Reducer } from 'react'
|
||||
|
||||
type Context = {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React, { createContext, useContext, useMemo, useReducer } from 'react'
|
||||
import { createContext, useContext, useMemo, useReducer } from 'react'
|
||||
|
||||
import type { Member, Message } from '../protocol'
|
||||
import type React from 'react'
|
||||
import type { Dispatch, Reducer } from 'react'
|
||||
|
||||
type Context = {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import React, { cloneElement, createContext, useContext, useState } from 'react'
|
||||
import { cloneElement, createContext, useContext, useState } from 'react'
|
||||
|
||||
import type React from 'react'
|
||||
|
||||
const DialogContext = createContext<
|
||||
((dialog: React.ReactElement) => void) | null
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const BellIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const ChevronDownIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const ChevronRightIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const CrossIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const DotsIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const DoubleTickIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const EditIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const EmojiIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const ExitIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const GifIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const GroupIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const ImageIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const PencilIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const PinIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const ReactionIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const ReplyIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const StickerIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const TinyChevronRightIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// todo: add to /tiny folder
|
||||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const TinyCommunityIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const TinyReplyIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const TrashIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export const UnpinIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { createContext, useEffect, useReducer } from 'react'
|
||||
import { createContext, useEffect, useReducer } from 'react'
|
||||
|
||||
import { createClient } from '@status-im/js'
|
||||
|
||||
|
@ -6,6 +6,7 @@ import { Failed } from '../components/failed'
|
|||
import { Loading } from '../components/loading'
|
||||
|
||||
import type { Account, Client, ClientOptions, Community } from '@status-im/js'
|
||||
import type React from 'react'
|
||||
|
||||
export const Context = createContext<State | undefined>(undefined)
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
// import { PinIcon } from '../../../../icons/pin-icon'
|
||||
import { Avatar, Flex, Text } from '../../../../system'
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Dialog } from '../../../../system'
|
||||
|
||||
export const PinnedMessagesDialog = () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
|
||||
import { useChatContext } from '../../../../contexts/chat-context'
|
||||
import { useAccount } from '../../../../protocol'
|
||||
|
@ -10,6 +10,8 @@ import { styled } from '../../../../styles/config'
|
|||
// import { Box, Flex, IconButton } from '../../../../system'
|
||||
import { InputReply } from './input-reply'
|
||||
|
||||
import type React from 'react'
|
||||
|
||||
interface Props {
|
||||
mode?: 'normal' | 'editing'
|
||||
value?: string
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useChatContext } from '../../../../contexts/chat-context'
|
||||
import { CrossIcon } from '../../../../icons/cross-icon'
|
||||
import { styled } from '../../../../styles/config'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { ReactionPopover } from '../../../../components/reaction-popover'
|
||||
import { PencilIcon } from '../../../../icons/pencil-icon'
|
||||
// import { PinIcon } from '../../../../icons/pin-icon'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
|
||||
import { useMatch } from 'react-router-dom'
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useProtocol } from '../../../../protocol'
|
||||
import { styled } from '../../../../styles/config'
|
||||
import { Avatar, Box, Flex, Image, Text } from '../../../../system'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useMemo, useState } from 'react'
|
||||
import { useMemo, useState } from 'react'
|
||||
|
||||
import {
|
||||
emojis,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import isSameDay from 'date-fns/isSameDay'
|
||||
|
||||
import { Flex, Text } from '../../../../system'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { keyframes } from '../../../../styles/config'
|
||||
import { Box, Text } from '../../../../system'
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import ContentLoader from 'react-content-loader'
|
||||
|
||||
export const MessageLoader = () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Fragment, useState } from 'react'
|
||||
import { Fragment, useState } from 'react'
|
||||
|
||||
import format from 'date-fns/format'
|
||||
import isSameDay from 'date-fns/isSameDay'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useMatch } from 'react-router-dom'
|
||||
|
||||
// import { ChatMenu } from '../../../../components/chat-menu'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Fragment, useEffect, useRef } from 'react'
|
||||
import { Fragment, useEffect, useRef } from 'react'
|
||||
|
||||
import isSameDay from 'date-fns/isSameDay'
|
||||
import { useLocation, useMatch } from 'react-router-dom'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import {
|
||||
BrowserRouter,
|
||||
Navigate,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
import { styled } from '../../styles/config'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useMemo } from 'react'
|
||||
import { useMemo } from 'react'
|
||||
|
||||
import { Image } from '../image'
|
||||
import { Base, Content, Indicator, Initials } from './styles'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Text } from '../text'
|
||||
import { Base } from './styles'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Button, Group } from './styles'
|
||||
|
||||
import type React from 'react'
|
||||
|
||||
interface Props<V> {
|
||||
value: V
|
||||
onChange: (value: V) => void
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import React, { forwardRef } from 'react'
|
||||
import { forwardRef } from 'react'
|
||||
|
||||
import { Base } from './styles'
|
||||
|
||||
import type { Variants } from './styles'
|
||||
import type React from 'react'
|
||||
import type { Ref } from 'react'
|
||||
|
||||
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { forwardRef } from 'react'
|
||||
import { forwardRef } from 'react'
|
||||
|
||||
import { Text } from '../text'
|
||||
import { Indicator, Root, Wrapper } from './styles'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { cloneElement, useState } from 'react'
|
||||
import { cloneElement, useState } from 'react'
|
||||
|
||||
import * as Primitive from '@radix-ui/react-context-menu'
|
||||
|
||||
|
@ -10,6 +10,7 @@ import type {
|
|||
ContextMenuSeparatorProps,
|
||||
ContextMenuTriggerProps,
|
||||
} from '@radix-ui/react-context-menu'
|
||||
import type React from 'react'
|
||||
|
||||
interface TriggerProps extends ContextMenuTriggerProps {
|
||||
children: [React.ReactElement, React.ReactElement]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { forwardRef, useRef } from 'react'
|
||||
import { forwardRef, useRef } from 'react'
|
||||
|
||||
import { composeRefs } from '@radix-ui/react-compose-refs'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { cloneElement, useCallback, useRef } from 'react'
|
||||
import { cloneElement, useCallback, useRef } from 'react'
|
||||
|
||||
import * as Primitive from '@radix-ui/react-alert-dialog'
|
||||
|
||||
|
@ -12,6 +12,7 @@ import { Actions, Body, Content, Header, Overlay } from './styles'
|
|||
|
||||
import type { ButtonProps } from '../button'
|
||||
import type { DialogContentProps } from '@radix-ui/react-dialog'
|
||||
import type React from 'react'
|
||||
|
||||
interface TriggerProps {
|
||||
open?: boolean
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useCallback, useRef, useState } from 'react'
|
||||
import { useCallback, useRef, useState } from 'react'
|
||||
|
||||
import * as Primitive from '@radix-ui/react-dialog'
|
||||
|
||||
|
@ -13,6 +13,7 @@ import { Actions, Body, Content, Header, Overlay } from './styles'
|
|||
import type { ButtonProps } from '../button'
|
||||
import type { Variants } from './styles'
|
||||
import type { DialogContentProps } from '@radix-ui/react-dialog'
|
||||
import type React from 'react'
|
||||
|
||||
interface DialogTriggerProps {
|
||||
children: [React.ReactElement, React.ReactElement]
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import * as Primitive from '@radix-ui/react-dropdown-menu'
|
||||
|
||||
import * as Menu from '../menu'
|
||||
|
@ -10,6 +8,7 @@ import type {
|
|||
DropdownMenuSeparatorProps,
|
||||
DropdownMenuTriggerProps,
|
||||
} from '@radix-ui/react-dropdown-menu'
|
||||
import type React from 'react'
|
||||
|
||||
interface TriggerProps extends DropdownMenuTriggerProps {
|
||||
children: [React.ReactElement, React.ReactElement]
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Base } from './styles'
|
||||
|
||||
interface Props {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
import { Text } from '../text'
|
||||
|
||||
import type { TextProps } from '../text'
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue