mirror of
https://github.com/usememos/memos.git
synced 2024-09-11 03:55:30 +03:00
chore: add more reactions
This commit is contained in:
parent
334e489867
commit
4081a6f5ad
@ -416,12 +416,17 @@ paths:
|
||||
type: string
|
||||
enum:
|
||||
- TYPE_UNSPECIFIED
|
||||
- EYES
|
||||
- HEART
|
||||
- LAUGH
|
||||
- ROCKET
|
||||
- THUMBS_DOWN
|
||||
- THUMBS_UP
|
||||
- THUMBS_DOWN
|
||||
- HEART
|
||||
- FIRE
|
||||
- CLAPPING_HANDS
|
||||
- LAUGH
|
||||
- OK_HAND
|
||||
- ROCKET
|
||||
- EYES
|
||||
- THINKING_FACE
|
||||
- CLOWN_FACE
|
||||
default: TYPE_UNSPECIFIED
|
||||
tags:
|
||||
- MemoService
|
||||
@ -1541,12 +1546,17 @@ definitions:
|
||||
type: string
|
||||
enum:
|
||||
- TYPE_UNSPECIFIED
|
||||
- EYES
|
||||
- HEART
|
||||
- LAUGH
|
||||
- ROCKET
|
||||
- THUMBS_DOWN
|
||||
- THUMBS_UP
|
||||
- THUMBS_DOWN
|
||||
- HEART
|
||||
- FIRE
|
||||
- CLAPPING_HANDS
|
||||
- LAUGH
|
||||
- OK_HAND
|
||||
- ROCKET
|
||||
- EYES
|
||||
- THINKING_FACE
|
||||
- CLOWN_FACE
|
||||
default: TYPE_UNSPECIFIED
|
||||
apiv2RowStatus:
|
||||
type: string
|
||||
|
@ -13,12 +13,17 @@ message Reaction {
|
||||
|
||||
enum Type {
|
||||
TYPE_UNSPECIFIED = 0;
|
||||
EYES = 1;
|
||||
HEART = 2;
|
||||
LAUGH = 3;
|
||||
ROCKET = 4;
|
||||
THUMBS_DOWN = 5;
|
||||
THUMBS_UP = 6;
|
||||
THUMBS_UP = 1;
|
||||
THUMBS_DOWN = 2;
|
||||
HEART = 3;
|
||||
FIRE = 4;
|
||||
CLAPPING_HANDS = 5;
|
||||
LAUGH = 6;
|
||||
OK_HAND = 7;
|
||||
ROCKET = 8;
|
||||
EYES = 9;
|
||||
THINKING_FACE = 10;
|
||||
CLOWN_FACE = 11;
|
||||
}
|
||||
Type reaction_type = 4;
|
||||
}
|
||||
|
@ -1171,12 +1171,17 @@ Used internally for obfuscating the page token.
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| TYPE_UNSPECIFIED | 0 | |
|
||||
| EYES | 1 | |
|
||||
| HEART | 2 | |
|
||||
| LAUGH | 3 | |
|
||||
| ROCKET | 4 | |
|
||||
| THUMBS_DOWN | 5 | |
|
||||
| THUMBS_UP | 6 | |
|
||||
| THUMBS_UP | 1 | |
|
||||
| THUMBS_DOWN | 2 | |
|
||||
| HEART | 3 | |
|
||||
| FIRE | 4 | |
|
||||
| CLAPPING_HANDS | 5 | |
|
||||
| LAUGH | 6 | |
|
||||
| OK_HAND | 7 | |
|
||||
| ROCKET | 8 | |
|
||||
| EYES | 9 | |
|
||||
| THINKING_FACE | 10 | |
|
||||
| CLOWN_FACE | 11 | |
|
||||
|
||||
|
||||
|
||||
|
@ -24,33 +24,48 @@ type Reaction_Type int32
|
||||
|
||||
const (
|
||||
Reaction_TYPE_UNSPECIFIED Reaction_Type = 0
|
||||
Reaction_EYES Reaction_Type = 1
|
||||
Reaction_HEART Reaction_Type = 2
|
||||
Reaction_LAUGH Reaction_Type = 3
|
||||
Reaction_ROCKET Reaction_Type = 4
|
||||
Reaction_THUMBS_DOWN Reaction_Type = 5
|
||||
Reaction_THUMBS_UP Reaction_Type = 6
|
||||
Reaction_THUMBS_UP Reaction_Type = 1
|
||||
Reaction_THUMBS_DOWN Reaction_Type = 2
|
||||
Reaction_HEART Reaction_Type = 3
|
||||
Reaction_FIRE Reaction_Type = 4
|
||||
Reaction_CLAPPING_HANDS Reaction_Type = 5
|
||||
Reaction_LAUGH Reaction_Type = 6
|
||||
Reaction_OK_HAND Reaction_Type = 7
|
||||
Reaction_ROCKET Reaction_Type = 8
|
||||
Reaction_EYES Reaction_Type = 9
|
||||
Reaction_THINKING_FACE Reaction_Type = 10
|
||||
Reaction_CLOWN_FACE Reaction_Type = 11
|
||||
)
|
||||
|
||||
// Enum value maps for Reaction_Type.
|
||||
var (
|
||||
Reaction_Type_name = map[int32]string{
|
||||
0: "TYPE_UNSPECIFIED",
|
||||
1: "EYES",
|
||||
2: "HEART",
|
||||
3: "LAUGH",
|
||||
4: "ROCKET",
|
||||
5: "THUMBS_DOWN",
|
||||
6: "THUMBS_UP",
|
||||
0: "TYPE_UNSPECIFIED",
|
||||
1: "THUMBS_UP",
|
||||
2: "THUMBS_DOWN",
|
||||
3: "HEART",
|
||||
4: "FIRE",
|
||||
5: "CLAPPING_HANDS",
|
||||
6: "LAUGH",
|
||||
7: "OK_HAND",
|
||||
8: "ROCKET",
|
||||
9: "EYES",
|
||||
10: "THINKING_FACE",
|
||||
11: "CLOWN_FACE",
|
||||
}
|
||||
Reaction_Type_value = map[string]int32{
|
||||
"TYPE_UNSPECIFIED": 0,
|
||||
"EYES": 1,
|
||||
"HEART": 2,
|
||||
"LAUGH": 3,
|
||||
"ROCKET": 4,
|
||||
"THUMBS_DOWN": 5,
|
||||
"THUMBS_UP": 6,
|
||||
"THUMBS_UP": 1,
|
||||
"THUMBS_DOWN": 2,
|
||||
"HEART": 3,
|
||||
"FIRE": 4,
|
||||
"CLAPPING_HANDS": 5,
|
||||
"LAUGH": 6,
|
||||
"OK_HAND": 7,
|
||||
"ROCKET": 8,
|
||||
"EYES": 9,
|
||||
"THINKING_FACE": 10,
|
||||
"CLOWN_FACE": 11,
|
||||
}
|
||||
)
|
||||
|
||||
@ -157,7 +172,7 @@ var File_api_v2_reaction_service_proto protoreflect.FileDescriptor
|
||||
var file_api_v2_reaction_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x22, 0xff, 0x01,
|
||||
0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x22, 0xce, 0x02,
|
||||
0x0a, 0x08, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65,
|
||||
@ -167,25 +182,30 @@ var file_api_v2_reaction_service_proto_rawDesc = []byte{
|
||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
|
||||
0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
|
||||
0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a,
|
||||
0x05, 0x48, 0x45, 0x41, 0x52, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x41, 0x55, 0x47,
|
||||
0x48, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x04, 0x12,
|
||||
0x0f, 0x0a, 0x0b, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x53, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x05,
|
||||
0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x53, 0x5f, 0x55, 0x50, 0x10, 0x06, 0x42,
|
||||
0xac, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x42, 0x14, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65,
|
||||
0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02,
|
||||
0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69,
|
||||
0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c,
|
||||
0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56,
|
||||
0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e,
|
||||
0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14,
|
||||
0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x53, 0x5f, 0x55,
|
||||
0x50, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x53, 0x5f, 0x44, 0x4f,
|
||||
0x57, 0x4e, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x45, 0x41, 0x52, 0x54, 0x10, 0x03, 0x12,
|
||||
0x08, 0x0a, 0x04, 0x46, 0x49, 0x52, 0x45, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x41,
|
||||
0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x53, 0x10, 0x05, 0x12, 0x09, 0x0a,
|
||||
0x05, 0x4c, 0x41, 0x55, 0x47, 0x48, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x4b, 0x5f, 0x48,
|
||||
0x41, 0x4e, 0x44, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x10,
|
||||
0x08, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x59, 0x45, 0x53, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x54,
|
||||
0x48, 0x49, 0x4e, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, 0x43, 0x45, 0x10, 0x0a, 0x12, 0x0e,
|
||||
0x0a, 0x0a, 0x43, 0x4c, 0x4f, 0x57, 0x4e, 0x5f, 0x46, 0x41, 0x43, 0x45, 0x10, 0x0b, 0x42, 0xac,
|
||||
0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x42, 0x14, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03,
|
||||
0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e,
|
||||
0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56,
|
||||
0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32,
|
||||
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -213,12 +213,17 @@
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| TYPE_UNSPECIFIED | 0 | |
|
||||
| EYES | 1 | |
|
||||
| HEART | 2 | |
|
||||
| LAUGH | 3 | |
|
||||
| ROCKET | 4 | |
|
||||
| THUMBS_DOWN | 5 | |
|
||||
| THUMBS_UP | 6 | |
|
||||
| THUMBS_UP | 1 | |
|
||||
| THUMBS_DOWN | 2 | |
|
||||
| HEART | 3 | |
|
||||
| FIRE | 4 | |
|
||||
| CLAPPING_HANDS | 5 | |
|
||||
| LAUGH | 6 | |
|
||||
| OK_HAND | 7 | |
|
||||
| ROCKET | 8 | |
|
||||
| EYES | 9 | |
|
||||
| THINKING_FACE | 10 | |
|
||||
| CLOWN_FACE | 11 | |
|
||||
|
||||
|
||||
|
||||
|
@ -24,33 +24,48 @@ type Reaction_Type int32
|
||||
|
||||
const (
|
||||
Reaction_TYPE_UNSPECIFIED Reaction_Type = 0
|
||||
Reaction_EYES Reaction_Type = 1
|
||||
Reaction_HEART Reaction_Type = 2
|
||||
Reaction_LAUGH Reaction_Type = 3
|
||||
Reaction_ROCKET Reaction_Type = 4
|
||||
Reaction_THUMBS_DOWN Reaction_Type = 5
|
||||
Reaction_THUMBS_UP Reaction_Type = 6
|
||||
Reaction_THUMBS_UP Reaction_Type = 1
|
||||
Reaction_THUMBS_DOWN Reaction_Type = 2
|
||||
Reaction_HEART Reaction_Type = 3
|
||||
Reaction_FIRE Reaction_Type = 4
|
||||
Reaction_CLAPPING_HANDS Reaction_Type = 5
|
||||
Reaction_LAUGH Reaction_Type = 6
|
||||
Reaction_OK_HAND Reaction_Type = 7
|
||||
Reaction_ROCKET Reaction_Type = 8
|
||||
Reaction_EYES Reaction_Type = 9
|
||||
Reaction_THINKING_FACE Reaction_Type = 10
|
||||
Reaction_CLOWN_FACE Reaction_Type = 11
|
||||
)
|
||||
|
||||
// Enum value maps for Reaction_Type.
|
||||
var (
|
||||
Reaction_Type_name = map[int32]string{
|
||||
0: "TYPE_UNSPECIFIED",
|
||||
1: "EYES",
|
||||
2: "HEART",
|
||||
3: "LAUGH",
|
||||
4: "ROCKET",
|
||||
5: "THUMBS_DOWN",
|
||||
6: "THUMBS_UP",
|
||||
0: "TYPE_UNSPECIFIED",
|
||||
1: "THUMBS_UP",
|
||||
2: "THUMBS_DOWN",
|
||||
3: "HEART",
|
||||
4: "FIRE",
|
||||
5: "CLAPPING_HANDS",
|
||||
6: "LAUGH",
|
||||
7: "OK_HAND",
|
||||
8: "ROCKET",
|
||||
9: "EYES",
|
||||
10: "THINKING_FACE",
|
||||
11: "CLOWN_FACE",
|
||||
}
|
||||
Reaction_Type_value = map[string]int32{
|
||||
"TYPE_UNSPECIFIED": 0,
|
||||
"EYES": 1,
|
||||
"HEART": 2,
|
||||
"LAUGH": 3,
|
||||
"ROCKET": 4,
|
||||
"THUMBS_DOWN": 5,
|
||||
"THUMBS_UP": 6,
|
||||
"THUMBS_UP": 1,
|
||||
"THUMBS_DOWN": 2,
|
||||
"HEART": 3,
|
||||
"FIRE": 4,
|
||||
"CLAPPING_HANDS": 5,
|
||||
"LAUGH": 6,
|
||||
"OK_HAND": 7,
|
||||
"ROCKET": 8,
|
||||
"EYES": 9,
|
||||
"THINKING_FACE": 10,
|
||||
"CLOWN_FACE": 11,
|
||||
}
|
||||
)
|
||||
|
||||
@ -167,7 +182,7 @@ var File_store_reaction_proto protoreflect.FileDescriptor
|
||||
var file_store_reaction_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x6f, 0x72, 0x65, 0x22, 0xf1, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x73, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x73, 0x12,
|
||||
@ -178,24 +193,29 @@ var file_store_reaction_proto_rawDesc = []byte{
|
||||
0x0d, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65,
|
||||
0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x68,
|
||||
0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
|
||||
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04,
|
||||
0x45, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x45, 0x41, 0x52, 0x54, 0x10,
|
||||
0x02, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x41, 0x55, 0x47, 0x48, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x52, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x48, 0x55, 0x4d,
|
||||
0x42, 0x53, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x55,
|
||||
0x4d, 0x42, 0x53, 0x5f, 0x55, 0x50, 0x10, 0x06, 0x42, 0x98, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x0d, 0x52, 0x65,
|
||||
0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
|
||||
0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02,
|
||||
0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb6,
|
||||
0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f,
|
||||
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a,
|
||||
0x09, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x53, 0x5f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b,
|
||||
0x54, 0x48, 0x55, 0x4d, 0x42, 0x53, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x09, 0x0a,
|
||||
0x05, 0x48, 0x45, 0x41, 0x52, 0x54, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x49, 0x52, 0x45,
|
||||
0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x48,
|
||||
0x41, 0x4e, 0x44, 0x53, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x41, 0x55, 0x47, 0x48, 0x10,
|
||||
0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x4b, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x10, 0x07, 0x12, 0x0a,
|
||||
0x0a, 0x06, 0x52, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x59,
|
||||
0x45, 0x53, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x48, 0x49, 0x4e, 0x4b, 0x49, 0x4e, 0x47,
|
||||
0x5f, 0x46, 0x41, 0x43, 0x45, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4c, 0x4f, 0x57, 0x4e,
|
||||
0x5f, 0x46, 0x41, 0x43, 0x45, 0x10, 0x0b, 0x42, 0x98, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x0d, 0x52, 0x65, 0x61,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65,
|
||||
0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b,
|
||||
0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -17,12 +17,17 @@ message Reaction {
|
||||
|
||||
enum Type {
|
||||
TYPE_UNSPECIFIED = 0;
|
||||
EYES = 1;
|
||||
HEART = 2;
|
||||
LAUGH = 3;
|
||||
ROCKET = 4;
|
||||
THUMBS_DOWN = 5;
|
||||
THUMBS_UP = 6;
|
||||
THUMBS_UP = 1;
|
||||
THUMBS_DOWN = 2;
|
||||
HEART = 3;
|
||||
FIRE = 4;
|
||||
CLAPPING_HANDS = 5;
|
||||
LAUGH = 6;
|
||||
OK_HAND = 7;
|
||||
ROCKET = 8;
|
||||
EYES = 9;
|
||||
THINKING_FACE = 10;
|
||||
CLOWN_FACE = 11;
|
||||
}
|
||||
Type reaction_type = 5;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ func (d *DB) ListReactions(ctx context.Context, find *store.FindReaction) ([]*st
|
||||
reaction_type
|
||||
FROM reaction
|
||||
WHERE `+strings.Join(where, " AND ")+`
|
||||
ORDER BY id DESC`,
|
||||
ORDER BY id ASC`,
|
||||
args...,
|
||||
)
|
||||
if err != nil {
|
||||
|
@ -44,7 +44,7 @@ func (d *DB) ListReactions(ctx context.Context, find *store.FindReaction) ([]*st
|
||||
reaction_type
|
||||
FROM reaction
|
||||
WHERE `+strings.Join(where, " AND ")+`
|
||||
ORDER BY id DESC`,
|
||||
ORDER BY id ASC`,
|
||||
args...,
|
||||
)
|
||||
if err != nil {
|
||||
|
@ -45,7 +45,7 @@ func (d *DB) ListReactions(ctx context.Context, find *store.FindReaction) ([]*st
|
||||
reaction_type
|
||||
FROM reaction
|
||||
WHERE `+strings.Join(where, " AND ")+`
|
||||
ORDER BY id DESC`,
|
||||
ORDER BY id ASC`,
|
||||
args...,
|
||||
)
|
||||
if err != nil {
|
||||
|
@ -33,12 +33,14 @@ const MemoReactionListView = (props: Props) => {
|
||||
}, [reactions]);
|
||||
|
||||
return (
|
||||
<div className="w-full mt-2 flex flex-row justify-start items-start flex-wrap gap-1 select-none">
|
||||
{currentUser && <ReactionSelector memo={memo} />}
|
||||
{Array.from(reactionGroup).map(([reactionType, users]) => {
|
||||
return <ReactionView key={`${reactionType.toString()} ${users.length}`} memo={memo} reactionType={reactionType} users={users} />;
|
||||
})}
|
||||
</div>
|
||||
(currentUser || reactionGroup.size > 0) && (
|
||||
<div className="w-full mt-2 flex flex-row justify-start items-start flex-wrap gap-1 select-none">
|
||||
{currentUser && <ReactionSelector memo={memo} />}
|
||||
{Array.from(reactionGroup).map(([reactionType, users]) => {
|
||||
return <ReactionView key={`${reactionType.toString()} ${users.length}`} memo={memo} reactionType={reactionType} users={users} />;
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -15,10 +15,15 @@ interface Props {
|
||||
const REACTION_TYPES = [
|
||||
Reaction_Type.THUMBS_UP,
|
||||
Reaction_Type.THUMBS_DOWN,
|
||||
Reaction_Type.LAUGH,
|
||||
Reaction_Type.HEART,
|
||||
Reaction_Type.FIRE,
|
||||
Reaction_Type.CLAPPING_HANDS,
|
||||
Reaction_Type.LAUGH,
|
||||
Reaction_Type.OK_HAND,
|
||||
Reaction_Type.ROCKET,
|
||||
Reaction_Type.EYES,
|
||||
Reaction_Type.THINKING_FACE,
|
||||
Reaction_Type.CLOWN_FACE,
|
||||
];
|
||||
|
||||
const ReactionSelector = (props: Props) => {
|
||||
@ -46,6 +51,7 @@ const ReactionSelector = (props: Props) => {
|
||||
} catch (error) {
|
||||
// skip error.
|
||||
}
|
||||
setOpen(false);
|
||||
};
|
||||
|
||||
return (
|
||||
@ -57,16 +63,16 @@ const ReactionSelector = (props: Props) => {
|
||||
</MenuButton>
|
||||
<Menu className="relative text-sm" component="div" size="sm" placement="bottom-start">
|
||||
<div ref={containerRef}>
|
||||
<div className="flex-row justify-start items-start py-0.5 px-2 h-auto font-mono space-x-1">
|
||||
<div className="grid grid-cols-6 py-0.5 px-2 h-auto font-mono gap-1">
|
||||
{REACTION_TYPES.map((reactionType) => {
|
||||
return (
|
||||
<div
|
||||
<span
|
||||
key={reactionType}
|
||||
className="inline-flex w-auto cursor-pointer rounded text-lg px-1 text-gray-500 dark:text-gray-400 hover:bg-zinc-100 dark:hover:bg-zinc-800"
|
||||
onClick={() => handleReactionClick(reactionType)}
|
||||
>
|
||||
{stringifyReactionType(reactionType)}
|
||||
</div>
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
@ -15,18 +15,28 @@ interface Props {
|
||||
|
||||
export const stringifyReactionType = (reactionType: Reaction_Type): string => {
|
||||
switch (reactionType) {
|
||||
case Reaction_Type.EYES:
|
||||
return "👀";
|
||||
case Reaction_Type.HEART:
|
||||
return "💗";
|
||||
case Reaction_Type.LAUGH:
|
||||
return "😂";
|
||||
case Reaction_Type.ROCKET:
|
||||
return "🚀";
|
||||
case Reaction_Type.THUMBS_DOWN:
|
||||
return "👎";
|
||||
case Reaction_Type.THUMBS_UP:
|
||||
return "👍";
|
||||
case Reaction_Type.THUMBS_DOWN:
|
||||
return "👎";
|
||||
case Reaction_Type.HEART:
|
||||
return "💛";
|
||||
case Reaction_Type.FIRE:
|
||||
return "🔥";
|
||||
case Reaction_Type.CLAPPING_HANDS:
|
||||
return "👏";
|
||||
case Reaction_Type.LAUGH:
|
||||
return "😂";
|
||||
case Reaction_Type.OK_HAND:
|
||||
return "👌";
|
||||
case Reaction_Type.ROCKET:
|
||||
return "🚀";
|
||||
case Reaction_Type.EYES:
|
||||
return "👀";
|
||||
case Reaction_Type.THINKING_FACE:
|
||||
return "🤔";
|
||||
case Reaction_Type.CLOWN_FACE:
|
||||
return "🤡";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user