diff --git a/app/src/app/(dashboard)/@dialog/(.)encode/[id]/page.tsx b/app/src/app/(dashboard)/@dialog/(.)encode/[id]/page.tsx index cce9daeb..509a3ce0 100644 --- a/app/src/app/(dashboard)/@dialog/(.)encode/[id]/page.tsx +++ b/app/src/app/(dashboard)/@dialog/(.)encode/[id]/page.tsx @@ -5,7 +5,7 @@ import type { page_EncodedDialog_Query } from '@/__generated__/page_EncodedDialo import { notFound, useRouter } from 'next/navigation' import { graphql, useLazyLoadQuery } from 'react-relay' -import { EncodeDialog } from '@/components/interfaces/dashboard' +import { EncodeDialog } from '@/components/interfaces/encode' const QUERY = graphql` query page_EncodedDialog_Query($where: EncodeFilterInput) { diff --git a/app/src/app/(dashboard)/encode/[id]/page.tsx b/app/src/app/(dashboard)/encode/[id]/page.tsx index 8e785933..f1e712db 100644 --- a/app/src/app/(dashboard)/encode/[id]/page.tsx +++ b/app/src/app/(dashboard)/encode/[id]/page.tsx @@ -2,15 +2,22 @@ import type { page_EncodedPage_Query } from '@/__generated__/page_EncodedPage_Query.graphql' -import { notFound, useRouter } from 'next/navigation' +import { Card, Typography } from '@giantnodes/react' +import { notFound } from 'next/navigation' import { graphql, useLazyLoadQuery } from 'react-relay' -import { EncodeDialog } from '@/components/interfaces/dashboard' +import { EncodeCommandWidget, EncodeOutputWidget, EncodeSizeWidget } from '@/components/interfaces/encode' +import { FileSystemBreadcrumb } from '@/components/interfaces/file-system' const QUERY = graphql` query page_EncodedPage_Query($where: EncodeFilterInput) { encode(where: $where) { - ...EncodeDialogFragment + file { + ...FileSystemBreadcrumbFragment + } + ...EncodeCommandWidgetFragment + ...EncodeOutputWidgetFragment + ...EncodeSizeWidgetFragment } } ` @@ -21,9 +28,7 @@ type EncodePageProps = React.PropsWithChildren & { } } -const EncodePage: React.FC = ({ children, params }) => { - const router = useRouter() - +const EncodePage: React.FC = ({ params }) => { const query = useLazyLoadQuery(QUERY, { where: { id: { @@ -37,9 +42,55 @@ const EncodePage: React.FC = ({ children, params }) => { } return ( - - {children} - +
+
+
+ + + + + + + + + Size + + + + + + + + + + Command + + + + + + + + + + Output + + + + + + +
+ +
+ + + Tbd + + +
+
+
) } diff --git a/app/src/app/(dashboard)/recipes/page.tsx b/app/src/app/(dashboard)/recipes/page.tsx index 05753694..83b98c16 100644 --- a/app/src/app/(dashboard)/recipes/page.tsx +++ b/app/src/app/(dashboard)/recipes/page.tsx @@ -23,7 +23,7 @@ const RecipeListPage: React.FC = () => { return (
-
+
Recipes diff --git a/app/src/app/(libraries)/library/[slug]/explore/[[...path]]/page.tsx b/app/src/app/(libraries)/library/[slug]/explore/[[...path]]/page.tsx index b6340485..865314cf 100644 --- a/app/src/app/(libraries)/library/[slug]/explore/[[...path]]/page.tsx +++ b/app/src/app/(libraries)/library/[slug]/explore/[[...path]]/page.tsx @@ -8,20 +8,15 @@ import React, { Suspense } from 'react' import { graphql, useLazyLoadQuery } from 'react-relay' import { useLibraryContext } from '@/app/(libraries)/library/[slug]/use-library.hook' -import { - ExploreBreadcrumbs, - ExploreContext, - ExploreControls, - ExploreTable, - useExplore, -} from '@/components/interfaces/explore' +import { ExploreContext, ExploreControls, ExploreTable, useExplore } from '@/components/interfaces/explore' +import { FileSystemBreadcrumb } from '@/components/interfaces/file-system' import { ResolutionWidget } from '@/components/widgets' const QUERY = graphql` query page_LibrarySlugExploreQuery($where: FileSystemDirectoryFilterInput, $order: [FileSystemEntrySortInput!]) { file_system_directory(where: $where) { id - ...ExploreBreadcrumbsFragment + ...FileSystemBreadcrumbFragment ...ExploreControlsFragment ...ExploreTableFragment @arguments(order: $order) } @@ -88,7 +83,7 @@ const LibraryExplorePage: React.FC = ({ params }) => { - + @@ -109,7 +104,7 @@ const LibraryExplorePage: React.FC = ({ params }) => {
-
+
Resolution diff --git a/app/src/components/interfaces/dashboard/index.ts b/app/src/components/interfaces/dashboard/index.ts deleted file mode 100644 index 86dccc03..00000000 --- a/app/src/components/interfaces/dashboard/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as EncodeDialog } from '@/components/interfaces/dashboard/encode-dialog/EncodeDialog' diff --git a/app/src/components/interfaces/dashboard/encode-dialog/EncodeDialog.tsx b/app/src/components/interfaces/encode/dialog/EncodeDialog.tsx similarity index 89% rename from app/src/components/interfaces/dashboard/encode-dialog/EncodeDialog.tsx rename to app/src/components/interfaces/encode/dialog/EncodeDialog.tsx index 113a59ea..fdcdbbc4 100644 --- a/app/src/components/interfaces/dashboard/encode-dialog/EncodeDialog.tsx +++ b/app/src/components/interfaces/encode/dialog/EncodeDialog.tsx @@ -6,14 +6,14 @@ import { IconX } from '@tabler/icons-react' import React from 'react' import { graphql, useFragment, useSubscription } from 'react-relay' -import EncodeDialogSidebar from '@/components/interfaces/dashboard/encode-dialog/EncodeDialogSidebar' -import EncodeAnalyticsPanel from '@/components/interfaces/dashboard/encode-dialog/panels/EncodeAnalyticsPanel' -import EncodeDialogScript from '@/components/interfaces/dashboard/encode-dialog/panels/EncodeScriptPanel' +import EncodeDialogSidebar from '@/components/interfaces/encode/dialog/EncodeDialogSidebar' +import EncodeAnalyticsPanel from '@/components/interfaces/encode/dialog/panels/EncodeAnalyticsPanel' +import EncodeDialogScript from '@/components/interfaces/encode/dialog/panels/EncodeScriptPanel' import { EncodeDialogContext, EncodeDialogPanel, useEncodeDialog, -} from '@/components/interfaces/dashboard/encode-dialog/use-encode-dialog.hook' +} from '@/components/interfaces/encode/dialog/use-encode-dialog.hook' import EncodeStatusBadge from '@/components/ui/encode-badges/EncodeStatusBadge' const FRAGMENT = graphql` diff --git a/app/src/components/interfaces/dashboard/encode-dialog/EncodeDialogSidebar.tsx b/app/src/components/interfaces/encode/dialog/EncodeDialogSidebar.tsx similarity index 87% rename from app/src/components/interfaces/dashboard/encode-dialog/EncodeDialogSidebar.tsx rename to app/src/components/interfaces/encode/dialog/EncodeDialogSidebar.tsx index 73a63381..5847f142 100644 --- a/app/src/components/interfaces/dashboard/encode-dialog/EncodeDialogSidebar.tsx +++ b/app/src/components/interfaces/encode/dialog/EncodeDialogSidebar.tsx @@ -1,10 +1,7 @@ import { Navigation } from '@giantnodes/react' import { IconReportAnalytics, IconScript } from '@tabler/icons-react' -import { - EncodeDialogPanel, - useEncodeDialogContext, -} from '@/components/interfaces/dashboard/encode-dialog/use-encode-dialog.hook' +import { EncodeDialogPanel, useEncodeDialogContext } from '@/components/interfaces/encode/dialog/use-encode-dialog.hook' const EncodeDialogSidebar = () => { const { panel, setPanel } = useEncodeDialogContext() diff --git a/app/src/components/interfaces/dashboard/encode-dialog/panels/EncodeAnalyticsPanel.tsx b/app/src/components/interfaces/encode/dialog/panels/EncodeAnalyticsPanel.tsx similarity index 71% rename from app/src/components/interfaces/dashboard/encode-dialog/panels/EncodeAnalyticsPanel.tsx rename to app/src/components/interfaces/encode/dialog/panels/EncodeAnalyticsPanel.tsx index 7365d0fb..2f9372fc 100644 --- a/app/src/components/interfaces/dashboard/encode-dialog/panels/EncodeAnalyticsPanel.tsx +++ b/app/src/components/interfaces/encode/dialog/panels/EncodeAnalyticsPanel.tsx @@ -1,9 +1,9 @@ import type { EncodeAnalyticsPanelFragment$key } from '@/__generated__/EncodeAnalyticsPanelFragment.graphql' -import { Card } from '@giantnodes/react' +import { Card, Typography } from '@giantnodes/react' import { graphql, useFragment } from 'react-relay' -import EncodeSizeWidget from '@/components/interfaces/dashboard/encode-dialog/widgets/EncodeSizeWidget' +import { EncodeSizeWidget } from '@/components/interfaces/encode' const FRAGMENT = graphql` fragment EncodeAnalyticsPanelFragment on Encode { @@ -20,9 +20,11 @@ const EncodeAnalyticsPanel: React.FC = ({ $key }) => return ( - Size + + Size + - + diff --git a/app/src/components/interfaces/dashboard/encode-dialog/panels/EncodeScriptPanel.tsx b/app/src/components/interfaces/encode/dialog/panels/EncodeScriptPanel.tsx similarity index 64% rename from app/src/components/interfaces/dashboard/encode-dialog/panels/EncodeScriptPanel.tsx rename to app/src/components/interfaces/encode/dialog/panels/EncodeScriptPanel.tsx index 46d0f55c..e2185db4 100644 --- a/app/src/components/interfaces/dashboard/encode-dialog/panels/EncodeScriptPanel.tsx +++ b/app/src/components/interfaces/encode/dialog/panels/EncodeScriptPanel.tsx @@ -1,10 +1,9 @@ import type { EncodeScriptPanelFragment$key } from '@/__generated__/EncodeScriptPanelFragment.graphql' -import { Card } from '@giantnodes/react' +import { Card, Typography } from '@giantnodes/react' import { graphql, useFragment } from 'react-relay' -import EncodeDialogCommand from '@/components/interfaces/dashboard/encode-dialog/widgets/EncodeCommandWidget' -import EncodeDialogLog from '@/components/interfaces/dashboard/encode-dialog/widgets/EncodeOutputWidget' +import { EncodeCommandWidget, EncodeOutputWidget } from '@/components/interfaces/encode' const FRAGMENT = graphql` fragment EncodeScriptPanelFragment on Encode { @@ -23,18 +22,22 @@ const EncodeScriptPanel: React.FC = ({ $key }) => { return ( <> - Command + + Command + - + - Output + + Output + - + diff --git a/app/src/components/interfaces/dashboard/encode-dialog/use-encode-dialog.hook.ts b/app/src/components/interfaces/encode/dialog/use-encode-dialog.hook.ts similarity index 100% rename from app/src/components/interfaces/dashboard/encode-dialog/use-encode-dialog.hook.ts rename to app/src/components/interfaces/encode/dialog/use-encode-dialog.hook.ts diff --git a/app/src/components/interfaces/encode/index.ts b/app/src/components/interfaces/encode/index.ts new file mode 100644 index 00000000..115e7f0e --- /dev/null +++ b/app/src/components/interfaces/encode/index.ts @@ -0,0 +1,5 @@ +export { default as EncodeDialog } from '@/components/interfaces/encode/dialog/EncodeDialog' + +export { default as EncodeCommandWidget } from '@/components/interfaces/encode/widgets/EncodeCommandWidget' +export { default as EncodeOutputWidget } from '@/components/interfaces/encode/widgets/EncodeOutputWidget' +export { default as EncodeSizeWidget } from '@/components/interfaces/encode/widgets/EncodeSizeWidget' diff --git a/app/src/components/interfaces/dashboard/encode-dialog/widgets/EncodeCommandWidget.tsx b/app/src/components/interfaces/encode/widgets/EncodeCommandWidget.tsx similarity index 100% rename from app/src/components/interfaces/dashboard/encode-dialog/widgets/EncodeCommandWidget.tsx rename to app/src/components/interfaces/encode/widgets/EncodeCommandWidget.tsx diff --git a/app/src/components/interfaces/dashboard/encode-dialog/widgets/EncodeOutputWidget.tsx b/app/src/components/interfaces/encode/widgets/EncodeOutputWidget.tsx similarity index 100% rename from app/src/components/interfaces/dashboard/encode-dialog/widgets/EncodeOutputWidget.tsx rename to app/src/components/interfaces/encode/widgets/EncodeOutputWidget.tsx diff --git a/app/src/components/interfaces/dashboard/encode-dialog/widgets/EncodeSizeWidget.tsx b/app/src/components/interfaces/encode/widgets/EncodeSizeWidget.tsx similarity index 100% rename from app/src/components/interfaces/dashboard/encode-dialog/widgets/EncodeSizeWidget.tsx rename to app/src/components/interfaces/encode/widgets/EncodeSizeWidget.tsx diff --git a/app/src/components/interfaces/explore/index.ts b/app/src/components/interfaces/explore/index.ts index b305721c..f2cbeb64 100644 --- a/app/src/components/interfaces/explore/index.ts +++ b/app/src/components/interfaces/explore/index.ts @@ -1,4 +1,3 @@ -export { default as ExploreBreadcrumbs } from '@/components/interfaces/explore/breadcrumbs/ExploreBreadcrumbs' export { default as ExploreControls } from '@/components/interfaces/explore/controls/ExploreControls' export { default as ExploreTable } from '@/components/interfaces/explore/table/ExploreTable' diff --git a/app/src/components/interfaces/explore/breadcrumbs/ExploreBreadcrumbs.tsx b/app/src/components/interfaces/file-system/FileSystemBreadcrumb.tsx similarity index 84% rename from app/src/components/interfaces/explore/breadcrumbs/ExploreBreadcrumbs.tsx rename to app/src/components/interfaces/file-system/FileSystemBreadcrumb.tsx index b217baf8..23997f26 100644 --- a/app/src/components/interfaces/explore/breadcrumbs/ExploreBreadcrumbs.tsx +++ b/app/src/components/interfaces/file-system/FileSystemBreadcrumb.tsx @@ -1,11 +1,11 @@ -import type { ExploreBreadcrumbsFragment$key } from '@/__generated__/ExploreBreadcrumbsFragment.graphql' +import type { FileSystemBreadcrumbFragment$key } from '@/__generated__/FileSystemBreadcrumbFragment.graphql' import { Breadcrumb, Link } from '@giantnodes/react' import React from 'react' import { graphql, useFragment } from 'react-relay' const FRAGMENT = graphql` - fragment ExploreBreadcrumbsFragment on FileSystemDirectory { + fragment FileSystemBreadcrumbFragment on FileSystemEntry { library { slug path_info { @@ -20,11 +20,11 @@ const FRAGMENT = graphql` } ` -type ExploreBreadcrumbsProps = { - $key: ExploreBreadcrumbsFragment$key +type FileSystemBreadcrumbProps = { + $key: FileSystemBreadcrumbFragment$key } -const ExploreBreadcrumbs: React.FC = ({ $key }) => { +const FileSystemBreadcrumb: React.FC = ({ $key }) => { const data = useFragment(FRAGMENT, $key) const directories = React.useMemo>(() => { @@ -73,4 +73,4 @@ const ExploreBreadcrumbs: React.FC = ({ $key }) => { ) } -export default ExploreBreadcrumbs +export default FileSystemBreadcrumb diff --git a/app/src/components/interfaces/file-system/index.ts b/app/src/components/interfaces/file-system/index.ts new file mode 100644 index 00000000..0ac04af8 --- /dev/null +++ b/app/src/components/interfaces/file-system/index.ts @@ -0,0 +1 @@ +export { default as FileSystemBreadcrumb } from '@/components/interfaces/file-system/FileSystemBreadcrumb' diff --git a/app/src/components/interfaces/index.ts b/app/src/components/interfaces/index.ts deleted file mode 100644 index 93b310ed..00000000 --- a/app/src/components/interfaces/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@/components/interfaces/explore' diff --git a/app/src/components/tables/encoding/EncodingTable.tsx b/app/src/components/tables/encoding/EncodingTable.tsx index 68cc8fc2..3b7d6fef 100644 --- a/app/src/components/tables/encoding/EncodingTable.tsx +++ b/app/src/components/tables/encoding/EncodingTable.tsx @@ -10,7 +10,6 @@ import { IconProgressX } from '@tabler/icons-react' import React from 'react' import { graphql, useMutation, usePaginationFragment, useSubscription } from 'react-relay' -import { EncodeDialog } from '@/components/interfaces/dashboard' import { EncodeBadges } from '@/components/ui' const FRAGMENT = graphql` @@ -33,7 +32,6 @@ const FRAGMENT = graphql` } } ...EncodeBadgesFragment - ...EncodeDialogFragment } } pageInfo { @@ -132,11 +130,7 @@ const EncodingTable: React.FC = ({ $key }) => { {(item) => ( - - - + {item.node.file.path_info.name}