diff --git a/src/apps/console/page-components/app-states.tsx b/src/apps/console/page-components/app-states.tsx index 525729791..221c2ec92 100644 --- a/src/apps/console/page-components/app-states.tsx +++ b/src/apps/console/page-components/app-states.tsx @@ -202,8 +202,12 @@ export const useAppState = () => { const getRepoName = (imageUrl: string) => { const parts: string[] = imageUrl.split(':'); const repoParts: string[] = parts[0].split('/'); - console.log("repo name", repoParts[repoParts.length - 1]) - return repoParts[repoParts.length - 1]; + if (repoParts.length == 1) { + return repoParts[repoParts.length - 1]; + } else { + const repoSlicePart: string[] = repoParts.slice(2) + return repoSlicePart.join("/") + } } const getImageTag = (imageUrl: string) => { diff --git a/src/apps/console/routes/_main+/$account+/packages+/repos/repo-resources.tsx b/src/apps/console/routes/_main+/$account+/packages+/repos/repo-resources.tsx index a28c07b1d..9f6dd1c9c 100644 --- a/src/apps/console/routes/_main+/$account+/packages+/repos/repo-resources.tsx +++ b/src/apps/console/routes/_main+/$account+/packages+/repos/repo-resources.tsx @@ -141,7 +141,7 @@ const ListView = ({ items, onDelete }: IResource) => { return ( { const { repo, account } = useParams(); + const repoName = atob(repo ? repo : "") return (
{ } /> {repo}} + content={{repoName}} />
); diff --git a/src/apps/console/routes/_main+/$account+/repo+/$repo+/images/route.tsx b/src/apps/console/routes/_main+/$account+/repo+/$repo+/images/route.tsx index 00aa8897d..485930746 100644 --- a/src/apps/console/routes/_main+/$account+/repo+/$repo+/images/route.tsx +++ b/src/apps/console/routes/_main+/$account+/repo+/$repo+/images/route.tsx @@ -17,7 +17,7 @@ export const loader = async (ctx: IRemixCtx) => { const promise = pWrapper(async () => { ensureAccountSet(ctx); const { data, errors } = await GQLServerHandler(ctx.request).listDigest({ - repoName: repo, + repoName: atob(repo), pagination: getPagination(ctx), search: getSearch(ctx), });