-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add address view to app explorer (#2627)
- Loading branch information
Showing
87 changed files
with
2,268 additions
and
27,171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,3 +71,6 @@ data/ | |
.cursorignore | ||
.netlify | ||
.stackbit | ||
fbef3d1a-8b84-4eb5-937c-06f78b1a1347 | ||
db.sqlite | ||
db.sqlite3* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
NODE_ENV="development" | ||
PORT=5433 | ||
NODE_ENV="development" | ||
|
||
HASURA_ADMIN_SECRET="" | ||
DEBUG_TABLE=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../explorer/(components)/cell-assets.svelte → ...components/table-cells/cell-assets.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
76 changes: 76 additions & 0 deletions
76
app/src/lib/components/table-cells/cell-icon-tooltip.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<script lang="ts"> | ||
import { cn } from "$lib/utilities/shadcn.ts" | ||
import EyeIcon from "virtual:icons/lucide/eye" | ||
import CopyIcon from "virtual:icons/lucide/copy" | ||
import CheckIcon from "virtual:icons/lucide/check" | ||
import { copyTextAction } from "$lib/actions/copy" | ||
import { truncate } from "$lib/utilities/format.ts" | ||
import { Button } from "$lib/components/ui/button/index.ts" | ||
import * as Tooltip from "$lib/components/ui/tooltip/index.ts" | ||
export let records: Array<{ | ||
index: number | ||
hash: string | ||
label: string | ||
truncateSize: number | ||
}> | ||
let copyClicked = false | ||
const toggleCopy = () => (copyClicked = !copyClicked) | ||
const onCopyClick = () => [toggleCopy(), setTimeout(() => toggleCopy(), 3_000)] | ||
</script> | ||
|
||
<div class="w-full flex items-center group cursor-default mx-3.5"> | ||
<Tooltip.Root let:ids> | ||
<Tooltip.Trigger asChild let:builder class="size-full"> | ||
<Button | ||
size="default" | ||
variant="outline" | ||
class="size-9 p-1" | ||
builders={[builder]} | ||
> | ||
<EyeIcon class="size-7" /> | ||
</Button> | ||
</Tooltip.Trigger> | ||
<Tooltip.Content | ||
side="right" | ||
align="start" | ||
sideOffset={7} | ||
alignOffset={0} | ||
class={cn( | ||
"w-[425px]", | ||
"px-1 bg-card shadow-lg", | ||
`h-[${records.length * 11}px]` | ||
)} | ||
> | ||
{#each records as record, index} | ||
<Button | ||
size="default" | ||
variant="secondary" | ||
on:click={onCopyClick} | ||
builders={[ | ||
{ action: (node) => copyTextAction(node, { text: record.hash }) } | ||
]} | ||
class={cn( | ||
"flex-1 justify-end w-full px-2", | ||
"bg-transparent hover:bg-transparent group-hover:opacity-100 transition h-7" | ||
)} | ||
> | ||
<span class="font-medium text-zinc-400 mr-auto">{record.label}</span> | ||
<span class="font-mono tabular-nums text-white ml-auto mr-3"> | ||
{#if record.truncateSize} | ||
{truncate(record.hash, record.truncateSize)} | ||
{:else} | ||
{record.hash} | ||
{/if} | ||
</span> | ||
{#if copyClicked} | ||
<CheckIcon class="size-5 text-green-500" /> | ||
{:else} | ||
<CopyIcon class="size-5 text-primary" /> | ||
{/if} | ||
</Button> | ||
{/each} | ||
</Tooltip.Content> | ||
</Tooltip.Root> | ||
</div> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.