Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tavern/internal/www/build/asset-manifest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tavern/internal/www/build/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tavern/internal/www/build/static/css/main.a06cb477.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tavern/internal/www/build/static/css/main.a06cb477.css.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions tavern/internal/www/build/static/css/main.b922d6e6.css

This file was deleted.

1 change: 0 additions & 1 deletion tavern/internal/www/build/static/css/main.b922d6e6.css.map

This file was deleted.

3 changes: 0 additions & 3 deletions tavern/internal/www/build/static/js/main.109f5df5.js

This file was deleted.

3 changes: 3 additions & 0 deletions tavern/internal/www/build/static/js/main.32313539.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import { useState } from "react";
import Button from "../../../components/tavern-base-ui/button/Button";
import { EyeSlashIcon, EyeIcon } from "@heroicons/react/24/solid";
import { EyeSlashIcon, EyeIcon, ClipboardDocumentIcon } from "@heroicons/react/24/solid";

const Credential = ({ secret }: any) => {
const [hidden, setHidden] = useState(true);
return (
<>
{hidden ? '*'.repeat(secret.length) : secret}
<Button buttonStyle={{color: "gray", size: "xs"}} onClick={() => setHidden(!hidden)} className="float-right">
{hidden ? <EyeIcon className="text-purple-900 w-4 h-4"/> : <EyeSlashIcon className="text-purple-900 w-4 h-4"/>}
</Button>
</>
<div className="flex flex-row items-center gap-2">
<p className="flex-1" style={{ whiteSpace: 'pre-line' }}>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Swap to tailwind version of this rather than mixing styles

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{hidden ? secret.replace(/[^\n]/g, '*') : secret}
</p>
<div className="flex flex-row gap-1">
<Button buttonStyle={{color: "gray", size: "sm"}} onClick={async () => await navigator.clipboard?.writeText?.(secret)}>
<ClipboardDocumentIcon className="text-purple-900 w-4 h-4"/>
</Button>
<Button buttonStyle={{color: "gray", size: "sm"}} onClick={() => setHidden(!hidden)}>
{hidden ? <EyeIcon className="text-purple-900 w-4 h-4"/> : <EyeSlashIcon className="text-purple-900 w-4 h-4"/>}
</Button>
</div>
</div>
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const CredentialTable = ({ data }: any) => {
header: 'Created',
accessorFn: row => formatDistance(new Date(row.createdAt), currentDate),
footer: props => props.column.id,
maxSize: 10,
sortingFn: (
rowA,
rowB,
Expand All @@ -27,14 +28,15 @@ const CredentialTable = ({ data }: any) => {
header: "principal",
accessorFn: row => row.principal,
footer: props => props.column.id,
maxSize: 100,
maxSize: 10,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah is this working as you intend, this seems very small for a maxSize.

},
{
id: "kind",
header: "Credential Kind",
accessorFn: row => row.kind,
footer: props => props.column.id,
enableSorting: true,
maxSize: 10,
cell: (cellData: any) => {
const kind = cellData.getValue();
return (
Expand All @@ -49,7 +51,7 @@ const CredentialTable = ({ data }: any) => {
header: 'Secret',
accessorFn: row => row.secret,
footer: props => props.column.id,
maxSize: 250,
// maxSize: 350,
enableSorting: false,
cell: (cellData: any) => {
const secret = cellData.getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const CredentialTableGrouped = ({ data }: any) => {
header: 'Created',
accessorFn: row => formatDistance(new Date(row.createdAt), currentDate),
footer: props => props.column.id,
maxSize: 10,
sortingFn: (
rowA,
rowB,
Expand All @@ -27,6 +28,7 @@ const CredentialTableGrouped = ({ data }: any) => {
header: 'Last Modified',
accessorFn: row => formatDistance(new Date(row.lastModifiedAt), currentDate),
footer: props => props.column.id,
maxSize: 10,
sortingFn: (
rowA,
rowB,
Expand All @@ -42,14 +44,15 @@ const CredentialTableGrouped = ({ data }: any) => {
header: "principal",
accessorFn: row => row.principal,
footer: props => props.column.id,
maxSize: 100,
maxSize: 10,
},
{
id: "kind",
header: "Credential Kind",
accessorFn: row => row.kind,
footer: props => props.column.id,
enableSorting: false,
maxSize: 10,
cell: (cellData: any) => {
const kind = cellData.getValue();
return (
Expand All @@ -64,7 +67,7 @@ const CredentialTableGrouped = ({ data }: any) => {
header: 'Secret',
accessorFn: row => row.secret,
footer: props => props.column.id,
maxSize: 250,
// maxSize: 250,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unwanted comment?

enableSorting: false,
cell: (cellData: any) => {
const secret = cellData.getValue();
Expand Down
Loading