Initial frontend for gRPC UI

This commit is contained in:
Gregory Schier
2024-01-30 16:43:54 -08:00
parent c51d5c5377
commit c64f1108f0
16 changed files with 650 additions and 132 deletions

View File

@@ -11,20 +11,6 @@ import { setAppearanceOnDocument } from './lib/theme/window';
import { appWindow } from '@tauri-apps/api/window';
import { type } from '@tauri-apps/api/os';
try {
const services: any = await invoke('grpc_reflect', { endpoint: 'http://localhost:50051' });
console.log('SERVICES', services);
const response = await invoke('grpc_call_unary', {
endpoint: 'http://localhost:50051',
service: services[0].name,
method: services[0].methods[0].name,
message: '{"name": "Greg"}',
});
console.log('RESPONSE', response);
} catch (err) {
console.log('ERROR', err);
}
// Hide decorations here because it doesn't work in Rust for some reason (bug?)
const osType = await type();
if (osType !== 'Darwin') {