Proto files off model

This commit is contained in:
Gregory Schier
2024-02-24 14:16:58 -08:00
parent 046a569ebe
commit 5bd2d0959a
16 changed files with 67 additions and 77 deletions

View File

@@ -21,6 +21,7 @@ type Props = Pick<EditorProps, 'heightMode' | 'onChange' | 'className'> & {
reflectionError?: string;
reflectionLoading?: boolean;
request: GrpcRequest;
protoFiles: string[];
};
export function GrpcEditor({
@@ -28,6 +29,7 @@ export function GrpcEditor({
reflectionError,
reflectionLoading,
request,
protoFiles,
...extraEditorProps
}: Props) {
const editorViewRef = useRef<EditorView>(null);
@@ -149,9 +151,9 @@ export function GrpcEditor({
? 'Select Proto Files'
: reflectionError
? 'Server Error'
: request.protoFiles.length > 0
? count('File', request.protoFiles.length)
: services != null && request.protoFiles.length === 0
: protoFiles.length > 0
? count('File', protoFiles.length)
: services != null && protoFiles.length === 0
? 'Schema Detected'
: 'Select Schema'}
</Button>