Added API key access to AUTO_LOGIN=True and fixed SecretKeyModal (#1994)
* chore: Add type attribute to button in SecretKeyModal * chore: Refactor Header component to fix autoLogin button visibility * docs(api.mdx): update admonition message to remove reference to LANGFLOW_AUTO_LOGIN environment variable docs(cli.mdx): update CLI command example to use 'run' subcommand instead of no arguments feat(cli.mdx): add 'api-key' command to create API key for default superuser when LANGFLOW_AUTO_LOGIN is True * docs(api.mdx): update admonition message to remove reference to LANGFLOW_AUTO_LOGIN environment variable * chore: Fix typo in get-curl-code.tsx --------- Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
parent
3f5769dd79
commit
8f6b9d6443
5 changed files with 48 additions and 9 deletions
|
|
@ -56,7 +56,7 @@ export default function Header(): JSX.Element {
|
|||
const lastFlowVisitedIndex = routeHistory
|
||||
.reverse()
|
||||
.findIndex(
|
||||
(path) => path.includes("/flow/") && path !== location.pathname,
|
||||
(path) => path.includes("/flow/") && path !== location.pathname
|
||||
);
|
||||
|
||||
const lastFlowVisited = routeHistory[lastFlowVisitedIndex];
|
||||
|
|
@ -181,7 +181,7 @@ export default function Header(): JSX.Element {
|
|||
/>
|
||||
</div>
|
||||
</AlertDropdown>
|
||||
{!autoLogin && (
|
||||
{autoLogin && (
|
||||
<button
|
||||
onClick={() => {
|
||||
navigate("/account/api-keys");
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@ export default function getCurlCode(
|
|||
-d '{"input_value": "message",
|
||||
"output_type": "chat",
|
||||
"input_type": "chat",
|
||||
"tweaks": ${JSON.stringify(tweaksObject, null, 2)}'
|
||||
"tweaks": ${JSON.stringify(tweaksObject, null, 2)}}'
|
||||
`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ export default function SecretKeyModal({
|
|||
{renderKey === false && (
|
||||
<div className="float-right">
|
||||
<Button
|
||||
type="button"
|
||||
className="mr-3"
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue