| - {t('Name')} - | -- {t('Secret Key')} - | -- |
|---|---|---|
| - {token.name} - | -- {token.token} - | -- - | -
| + {t('Name')} + | ++ {t('Secret Key')} + | ++ |
|---|---|---|
| {token.name} | +{token.token} | ++ + | +
{t('Logging out...')}
} -{t('Logging out...')}
}{code}
-
- {code}
+
+ {t('Created')} 5/20/24
-{t('MEMBERS')}
-Robin Huang
-Yoland Yan
-{t('Created')} 5/20/24
+{t('MEMBERS')}
+Robin Huang
+Yoland Yan
+- {t( - 'You can contact the publisher via GitHub:' - )} -
- -- {t( - 'You can contact the publisher via email:' - )} -
-+ {t('You can contact the publisher via GitHub:')} +
+ ++ {t('You can contact the publisher via email:')} +
+
- {zStatusReason.safeParse(
- nv.status_reason
- ).data?.message ?? nv.status_reason}
- {zStatusReason.safeParse(
- nv.status_reason
- ).data?.batchId && (
-
- [Batch:{' '}
- {
- zStatusReason.safeParse(
- nv.status_reason
- ).data?.batchId
- }
- ]
-
- )}
-
-
- {(e.file_path?.length ?? 0) > 18 + 2
- ? `…${e.file_path?.slice(-18)}`
- : e.file_path}
- L{e.line_number}
-
-
-
- {e.issue_type}
-
- {e.code_snippet || e.message}
-
-
+ {zStatusReason.safeParse(nv.status_reason).data?.message ??
+ nv.status_reason}
+ {zStatusReason.safeParse(nv.status_reason).data
+ ?.batchId && (
+
+ [Batch:{' '}
+ {
+ zStatusReason.safeParse(nv.status_reason).data
+ ?.batchId
+ }
+ ]
+
)}
-
- )}
-
+ {(e.file_path?.length ?? 0) > 18 + 2
+ ? `…${e.file_path?.slice(-18)}`
+ : e.file_path}
+ L{e.line_number}
+
+
+
+ {e.issue_type}
+
+ {e.code_snippet || e.message}
+
+ - {children} -
- ), - }} - > - {( - hit._snippetResult - ?.description as HitAttributeSnippetResult - )?.value.replace(/<\/?mark>/g, '**')} -+ {children} +
+ ), + }} + > + {( + hit._snippetResult?.description as HitAttributeSnippetResult + )?.value.replace(/<\/?mark>/g, '**')} +
+
+
- This is an example of content inside the container - component. -
-+ This is an example of content inside the container component. +
+- This content is wrapped by the Container component, which - provides consistent max-width and padding. -
-+ This content is wrapped by the Container component, which provides + consistent max-width and padding. +
+Some content in the first section
-Some content in the second section
-Some content in the third section
-Some content in the first section
+Some content in the second section
+Some content in the third section
+- {subTitle} -
- - - - > - ) + return ( + <> ++ {subTitle} +
+ + + + > + ) } export default GenericHeader diff --git a/components/common/HOC/authAdmin.tsx b/components/common/HOC/authAdmin.tsx index 47de5b47..202feccc 100644 --- a/components/common/HOC/authAdmin.tsx +++ b/components/common/HOC/authAdmin.tsx @@ -14,48 +14,48 @@ import { useFromUrlParam } from './useFromUrl' * this HOC component should be used in page level, since h-[50vh] in loading spinner settle */ const withAdmin = (WrappedComponent) => { - const HOC = (props: JSX.IntrinsicAttributes) => { - const router = useRouter() - const fromUrlParam = useFromUrlParam() - - // if firebaseUser is signed out, redirect to login page - const [firebaseUser, firebaseUserLoading] = useFirebaseUser() - useEffect(() => { - if (!firebaseUserLoading && !firebaseUser) { - router.push(`/auth/login?${fromUrlParam}`) - } - }, [router, firebaseUser, firebaseUserLoading, fromUrlParam]) - - const { data: user, isLoading } = useGetUser({}) - useEffect(() => { - if (!isLoading && !user) router.push(`/auth/login?${fromUrlParam}`) - }, [router, user, isLoading, fromUrlParam]) - - if (isLoading) - return ( -- {t('Contribute to Localization')} -
-- {t( - 'Help us improve translations and add support for new languages!' - )} -
-- {t( - 'Click the button below to visit our GitHub issue where you can share your feedback and suggestions.' - )} -
-{t('Contribute to Localization')}
++ {t( + 'Help us improve translations and add support for new languages!' + )} +
++ {t( + 'Click the button below to visit our GitHub issue where you can share your feedback and suggestions.' + )} +
+{t('Create Unclaimed Node')}
+{t('Create Unclaimed Node')}
-{t('Add unclaimed node')}
- -{t('Add unclaimed node')}
+ +{t('Delete Node')}
+{t('Delete Node')}
-- {t( - 'Are you sure you want to delete this node? This action cannot be undone.' - )} -
-+ {t( + 'Are you sure you want to delete this node? This action cannot be undone.' + )} +
+- {t('Reason')}:{' '} - {t( - 'An unexpected error occurred. Please try again later.' - )} -
- {process.env.NODE_ENV === 'development' && ( -- {t('Debug info')}: {error.message} -
- )} -+ {t('Reason')}:{' '} + {t('An unexpected error occurred. Please try again later.')} +
+ {process.env.NODE_ENV === 'development' && ( ++ {t('Debug info')}: {error.message} +
+ )} ++ {[ +
- {[ -
)}*/} - {/*{data.rating && ( + {/*{data.rating && (
)} */} - {node.downloads != 0 && ( -
- - - {formatDownloadCount( - node.downloads || 0 - )}{' '} - {t('downloads')} - -
- )} - {node.github_stars != null && - node.github_stars > 0 && ( -- - - {formatDownloadCount( - node.github_stars || 0 - )}{' '} - {t('GitHub stars')} - -
- )} -
- {isUnclaimed
- ? t(
- "This node can only be installed via git, because it's unclaimed by any publisher"
- )
- : !nodeVersions?.length
- ? t(
- 'This node can only be installed via git, because it has no versions published yet'
- )
- : t(
- 'This node can only be installed via git'
- )}
- {node.repository && (
-
- {node.description} -
-
-
+ + + {formatDownloadCount(node.downloads || 0)}{' '} + {t('downloads')} + +
+ )} + {node.github_stars != null && node.github_stars > 0 && ( ++ + + {formatDownloadCount(node.github_stars || 0)}{' '} + {t('GitHub stars')} + +
+ )} +
+ {isUnclaimed
+ ? t(
+ "This node can only be installed via git, because it's unclaimed by any publisher"
+ )
+ : !nodeVersions?.length
+ ? t(
+ 'This node can only be installed via git, because it has no versions published yet'
+ )
+ : t('This node can only be installed via git')}
+ {node.repository && (
+
+ {dt(node.description)} +
+
+
{t('Edit Node')}
-{t('Edit Node')}
+{t('Upload Logo')}
-{t('Upload Logo')}
+{version.changelog}
+- {t('Deprecate version')} -
-- {t( - 'Users will see a warning prompting them to use another version.' - )} -
-{t('Deprecate version')}
++ {t( + 'Users will see a warning prompting them to use another version.' )} +
Delete Version
-- {t( - 'Are you sure you want to delete this version? This action cannot be undone.' - )} -
-Delete Version
++ {t( + 'Are you sure you want to delete this version? This action cannot be undone.' + )} +
+{description}
-- {' '} - {t('More')} -
-{description}
++ {' '} + {t('More')} +
+- {ShortNumber(downloads)} -
-- {ShortNumber(github_stars)} -
-+ {ShortNumber(downloads)} +
++ {ShortNumber(github_stars)} +
+- {rating.toFixed(1)} -
-+ {rating.toFixed(1)} +
- {t( - 'Preempted Comfy Node Names: List of names that should be treated as the same comfy-node. This helps maintain consistent search results across differently named nodes.' - )} -
-- {t( - 'No preempted comfy node names added yet' - )} -
- ) : ( - preemptedComfyNodeNames.map( - (name, index) => ( -+ {t( + 'Preempted Comfy Node Names: List of names that should be treated as the same comfy-node. This helps maintain consistent search results across differently named nodes.' + )} +
++ {t('No preempted comfy node names added yet')} +
+ ) : ( + preemptedComfyNodeNames.map((name, index) => ( +- {t( - 'Search Ranking: integer from 1 to 10. Lower number means higher search ranking, all else equal.' - )} -
-+ {t( + 'Search Ranking: integer from 1 to 10. Lower number means higher search ranking, all else equal.' + )} +
+- {description} -
-- {t('More')} -
-{description}
++ {t('More')} +
- Create your own nodes and share them with the - community. Join the growing ecosystem of developers - creating amazing tools for Comfy. -
-+ Create your own nodes and share them with the community. Join the + growing ecosystem of developers creating amazing tools for Comfy. +
++ {t('Register a publisher to begin distributing custom nodes on Comfy.')} +
- return ( - <> - {showTitle && ( -- {t( - 'Register a publisher to begin distributing custom nodes on Comfy.' +
@{publisher.id}
-- - - {t(`{{count}} nodes`, { count: nodeList?.total })} - -
- {oneMemberOfPublisher && ( -- - {oneMemberOfPublisher} -
- )} -- {t( - 'How to use these API keys to publish my node? check' - )}{' '} - - {t('Publishing Nodes - ComfyUI')} - -
-@{publisher.id}
++ + + {t(`{{count}} nodes`, { count: nodeList?.total })} + +
+ {oneMemberOfPublisher && ( ++ + {oneMemberOfPublisher} +
+ )} ++ {t('How to use these API keys to publish my node? check')}{' '} + + {t('Publishing Nodes - ComfyUI')} + +
- {t( - 'Wanna publish your first node? Check publish tutorial here:' - )}{' '} - - {t('Publishing Nodes - ComfyUI')} - -
-+ {t('Wanna publish your first node? Check publish tutorial here:')}{' '} + + {t('Publishing Nodes - ComfyUI')} + +
+- - {t('v{{version}}', { - version: latest_version.version, - })} - -
- )} -- {publisherName} -
-+ + {t('v{{version}}', { + version: latest_version.version, + })} + +
+ )} ++ {publisherName} +
+
- {rating} -
-{rating}
+- {t( - 'There was an error loading the nodes. Please try again later.' - )} -
-+ {t('There was an error loading the nodes. Please try again later.')} +
+- {t( - 'One-Time Migration: Update all node versions with their latest supported ComfyUI versions, OS, and accelerators' - )} -
-
+ {nv.supported_os?.join('\n') || ''}
+
+
+ {nv.supported_accelerators?.join('\n') || ''}
+
+
+ {t('You are about to {{action}} {{count}} node versions', {
+ action: translatedActionNames[batchAction],
+ count: Object.keys(selectedVersions).filter(
+ (key) => selectedVersions[key]
+ ).length,
+ })}
+
+
- {t(
- 'You are about to {{action}} {{count}} node versions',
- {
- action: translatedActionNames[batchAction],
- count: Object.keys(selectedVersions).filter(
- (key) => selectedVersions[key]
- ).length,
- }
- )}
-
-
- {t( - 'This node is already owned by a publisher and cannot be claimed.' - )} -
-- {node?.repository ? ( - <> - {t( - 'Choose which publisher account you want to use to claim this node. You must be the owner of the GitHub repository at' - )}{' '} - - {node.repository} - - > - ) : ( - t( - 'Choose which publisher account you want to use to claim this node.' - ) - )} -
- - {publishers && publishers.length > 0 ? ( -@{publisher.id}
-- {t( - "You don't have any publishers yet. Create a publisher first to claim nodes." - )} -
{' '} -+ {t( + 'This node is already owned by a publisher and cannot be claimed.' + )} +
++ {node?.repository ? ( + <> + {t( + 'Choose which publisher account you want to use to claim this node. You must be the owner of the GitHub repository at' + )}{' '} + + {node.repository} + + > + ) : ( + t( + 'Choose which publisher account you want to use to claim this node.' + ) + )} +
+ + {publishers && publishers.length > 0 ? ( +@{publisher.id}
++ {t( + "You don't have any publishers yet. Create a publisher first to claim nodes." + )} +
{' '} +{error}
+{error}
-- {t( - 'To claim this node, you must verify that you are an admin of the GitHub repository associated with it. Please confirm the information above is correct before proceeding.' - )} -
-- {t( - 'Redirecting to GitHub for authentication...' - )} -
-- {t( - 'Please wait or follow the GitHub prompts if they appear.' - )} -
-+ {t( + 'To claim this node, you must verify that you are an admin of the GitHub repository associated with it. Please confirm the information above is correct before proceeding.' )} +
+- {t( - 'Verifying your admin access to the repository...' - )} -
-- {t( - 'This should only take a moment.' - )} -
- > - ) : ( - <> -- {t( - 'Processing verification result...' - )} -
- > - )} -+ {t('Redirecting to GitHub for authentication...')} +
++ {t( + 'Please wait or follow the GitHub prompts if they appear.' + )} +
++ {t('Verifying your admin access to the repository...')} +
++ {t('This should only take a moment.')} +
+ > + ) : ( + <> ++ {t('Processing verification result...')} +
+ > )} - - {/* Stage 4: Claim Node */} - {currentStage === 'claim_node' && ( -- {githubUsername - ? t( - 'Your GitHub account ({{username}}) has been verified with admin permissions to the repository. You can now claim node {{nodeName}} as publisher: {{publisherName}}.', - { - username: githubUsername, - nodeName: node?.name, - publisherName: - publisherToClaim?.name, - } - ) - : t( - 'Your GitHub account has been verified with admin permissions to the repository. You can now claim node {{nodeName}} as publisher: {{publisherName}}.', - { - nodeName: node?.name, - publisherName: - publisherToClaim?.name, - } - )} -
-+ {githubUsername + ? t( + 'Your GitHub account ({{username}}) has been verified with admin permissions to the repository. You can now claim node {{nodeName}} as publisher: {{publisherName}}.', + { + username: githubUsername, + nodeName: node?.name, + publisherName: publisherToClaim?.name, + } + ) + : t( + 'Your GitHub account has been verified with admin permissions to the repository. You can now claim node {{nodeName}} as publisher: {{publisherName}}.', + { + nodeName: node?.name, + publisherName: publisherToClaim?.name, + } + )} +
++ {t( + 'Congratulations! You have successfully claimed the node {{nodeName}} for publisher {{publisherName}}.', + { + nodeName: node?.name, + publisherName: publisherToClaim?.name, + } )} +
- {/* Stage 5: Completed */} - {currentStage === 'completed' && ( -- {t( - 'Congratulations! You have successfully claimed the node {{nodeName}} for publisher {{publisherName}}.', - { - nodeName: node?.name, - publisherName: publisherToClaim?.name, - } - )} -
- -- This is a placeholder for search results that would - appear in the actual component. -
-- In the real application, these would be dynamically - loaded from Algolia search. -
- test catch ui change -+ This is a placeholder for search results that would appear in the + actual component. +
++ In the real application, these would be dynamically loaded from + Algolia search. +
+ test catch ui change +