Highly ambitious ATProtocol AppView service and sdks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

update lexicon badges to include procedure, query, and defs

+22 -7
+22 -7
frontend/src/features/slices/lexicon/templates/fragments/LexiconListItem.tsx
··· 26 26 }) { 27 27 const rkey = getRkeyFromUri(uri); 28 28 29 - // Check if this is a record type lexicon 30 - let isRecordType = false; 29 + // Check the lexicon type 30 + let lexiconType: string | null = null; 31 31 try { 32 32 const parsedDefinitions = JSON.parse(definitions); 33 - isRecordType = parsedDefinitions?.main?.type === "record"; 33 + lexiconType = parsedDefinitions?.main?.type || null; 34 34 } catch { 35 - // If parsing fails, default to false 36 - isRecordType = false; 35 + // If parsing fails, default to null 36 + lexiconType = null; 37 37 } 38 38 39 39 return ( ··· 67 67 {isPrimary ? "Primary" : "External"} 68 68 </Badge> 69 69 )} 70 - {isRecordType && ( 70 + {lexiconType === "record" && ( 71 71 <Badge variant="secondary"> 72 72 Record 73 73 </Badge> 74 74 )} 75 + {lexiconType === "procedure" && ( 76 + <Badge variant="secondary"> 77 + Procedure 78 + </Badge> 79 + )} 80 + {lexiconType === "query" && ( 81 + <Badge variant="secondary"> 82 + Query 83 + </Badge> 84 + )} 85 + {(lexiconType === null || lexiconType === "object") && ( 86 + <Badge variant="secondary"> 87 + Defs 88 + </Badge> 89 + )} 75 90 {excludedFromSync && ( 76 91 <Badge variant="warning"> 77 - Sync excluded 92 + Sync disabled 78 93 </Badge> 79 94 )} 80 95 </div>