mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Correcting some bugs and working on responsive.
This commit is contained in:
@@ -16,13 +16,17 @@ import {generateEdgeKey} from "@/utils/edge_key";
|
||||
import {Copy} from "lucide-react";
|
||||
import {useState} from "react";
|
||||
import {CopyButton} from "@/components/wrappers/copy-button";
|
||||
import {Agent} from "@prisma/client";
|
||||
import {getServerUrl} from "@/utils/get-server-url";
|
||||
|
||||
export type agentRegistrationDialogProps = PropsWithChildren<{}>
|
||||
export type agentRegistrationDialogProps = PropsWithChildren<{
|
||||
agent: Agent
|
||||
}>
|
||||
|
||||
|
||||
export function AgentModalKey(props: agentRegistrationDialogProps) {
|
||||
|
||||
const edge_key = generateEdgeKey('https://ok.com', '1234567');
|
||||
const edge_key = generateEdgeKey(getServerUrl(), props.agent.id);
|
||||
const code = `EDGE_KEY = ${edge_key}`;
|
||||
|
||||
return (
|
||||
|
||||
@@ -4,6 +4,7 @@ export function generateEdgeKey(serverUrl: string, agentId: string): string {
|
||||
serverUrl,
|
||||
agentId,
|
||||
};
|
||||
console.log(edgeKeyData);
|
||||
const edgeKeyJson = JSON.stringify(edgeKeyData);
|
||||
const edgeKeyBuffer = Buffer.from(edgeKeyJson, 'utf-8');
|
||||
const edgeKeyBase64 = edgeKeyBuffer.toString('base64').replace(/=+$/, '').replace(/\+/g, '-').replace(/\//g, '_');
|
||||
|
||||
Reference in New Issue
Block a user