Skip to content

Commit

Permalink
finish
Browse files Browse the repository at this point in the history
  • Loading branch information
bchu1 committed Sep 19, 2024
1 parent ca7f3f9 commit 8fb858c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 14 deletions.
17 changes: 6 additions & 11 deletions frontend/packages/data-portal/app/components/NoTotalResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,23 @@ export function NoTotalResults({
buttons,
}: NoTotalResultsProps) {
return (
<div className="flex justify-center items-center">
<div className="flex justify-center items-center border-t border-sds-color-primitive-gray-300">
<div className="flex flex-col justify-center items-baseline h-[425px] gap-[20px]">
<h1 className="text-sds-header-xl font-semibold">{title}</h1>
{description}
<h1 className="text-sds-header-l font-semibold">{title}</h1>
<div className="text-sds-body-s">{description}</div>
{buttons.map((button) => (
<Button
sdsType="primary"
sdsStyle="minimal"
isAllCaps={false}
className="!normal-case !text-sds-body-s"
onClick={button.onClick}
>
{button.text}
<SmallChevronRightIcon />
<SmallChevronRightIcon className="w-[12px] h-[12px] fill-[#0b68f8] ml-sds-xxs" />
</Button>
))}
</div>
<svg
xmlns="http://www.w3.org/2000/svg"
width="240"
height="240"
fill="none"
>
<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240">
<path
id="Combined-Shape"
fill-rule="evenodd"
Expand Down
23 changes: 21 additions & 2 deletions frontend/packages/data-portal/app/routes/runs.$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { ShouldRevalidateFunctionArgs } from '@remix-run/react'
import { json, LoaderFunctionArgs } from '@remix-run/server-runtime'
import { toNumber } from 'lodash-es'
import { startCase, toNumber } from 'lodash-es'
import { useMemo } from 'react'
import { match } from 'ts-pattern'

Expand Down Expand Up @@ -187,7 +187,7 @@ export default function RunByIdPage() {
noTotalResults: (
<NoTotalResults
title={t('noAnnotationsAvailable')}
description={t('youCanStillDownloadTheRun')}
description={t('downloadTheRunDataToCreateYourOwnAnnotations')}
buttons={[
{
text: t('downloadRunData'),
Expand Down Expand Up @@ -221,6 +221,25 @@ export default function RunByIdPage() {
filteredCount: tomogramsCount,
totalCount: tomogramsCount,
countLabel: t('tomograms'),
noTotalResults: (
<NoTotalResults
title={startCase(t('noTomogramsAvailable'))}
description={t(
'downloadAllRunDataViaApiToCreateYourOwnReconstructions',
)}
buttons={[
{
text: t('downloadThisRun'),
onClick: () => {
openRunDownloadModal({
runId: run.id,
datasetId: run.dataset.id,
})
},
},
]}
/>
),
},
]
: []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,14 @@
"download": "Download",
"downloadAllAnnotations": "Download All Annotations",
"downloadAllRunData": "<semibold>Download all run data via our API.</semibold> <url to='$t(apiDocLink)'>Visit API documentation.</url>",
"downloadAllRunDataViaApiToCreateYourOwnReconstructions": "Download all Run data via API to create your own reconstructions.",
"downloadAvailableAnnotationsInSupported": "Download available annotations in supported file formats.",
"downloadDataset": "Download Dataset...",
"downloadNow": "Download Now",
"downloadOptions": "Download Options",
"downloadRunData": "Download Run Data",
"downloadTheRunDataToCreateYourOwnAnnotations": "Download the Run data to create your own annotations.",
"downloadThisRun": "Download This Run",
"downloadTomogram": "Download Tomogram",
"downloadWillSaveToCurrentDirectory": "Download will save to your current directory. To change save destination, change the current directory in your terminal before continuing.",
"downloadWithAdditionalOptions": "Download...",
Expand Down Expand Up @@ -414,7 +417,6 @@
"website": "Website",
"withDepositionData": "With deposition data",
"yes": "Yes",
"youCanStillDownloadTheRun": "You can still download the Run data to create your own annotations.",
"youMustHaveCliInstalled": "You must have AWS CLI installed. <url to='$t(awsCliLink)'>How to Install AWS CLI.</url>",
"youMustHaveCurlInstalled": "You must have cURL installed. <url to='$t(curlSetupLink)'>How to Install cURL</url>",
"zarrLink": "https://zarr.readthedocs.io/en/stable/"
Expand Down

0 comments on commit 8fb858c

Please sign in to comment.