Skip to content

Commit

Permalink
Feature/add theme (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcblundell authored Aug 30, 2024
2 parents d788651 + 565c33c commit 8f6d5e2
Show file tree
Hide file tree
Showing 31 changed files with 782 additions and 358 deletions.
Binary file modified favicon.ico
Binary file not shown.
Binary file modified public/favicon/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 7 additions & 14 deletions public/favicon/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/OperationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useOperationsList } from '../hooks/useAPI';
import ROUTES from '../definitions/routes';
import { expandedOperationsAtom } from '../store/app';
import MicroOperations from './MicroOperations';
import { OperationDescription } from "../model/APIData";
import { OperationDescription } from '../model/APIData';

const PLACEHOLDER_ARRAY_SIZE = 10;
const OPERATION_EL_HEIGHT = 39; // Height in px of each list item
Expand Down Expand Up @@ -296,7 +296,7 @@ const OperationList = () => {
>
<div className='arguments-wrapper'>
<p className='monospace'>
Python execution time: {operation.duration} s
Python execution time: {operation.duration}s
</p>

{operation.arguments && (
Expand Down
11 changes: 4 additions & 7 deletions src/components/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import { ProgressBar as BlueprintProgressBar, Intent } from '@blueprintjs/core';
import { ProgressBar as BlueprintProgressBar } from '@blueprintjs/core';
import 'styles/components/ProgressBar.scss';
import { UploadProgress } from '../hooks/useLocal';

function ProgressBar({ progress, estimated }: UploadProgress) {
return (
<div className='progress-bar'>
{progress && estimated && (
{progress && estimated ? (
<span className='status'>
{progress > 0 ? `${Math.round(progress * 100)}%` : `100%`}
{` - `}
{estimated > 0 ? `${Math.round(estimated)}s left` : '0s left'}
</span>
)}
) : null}

<BlueprintProgressBar
value={progress}
intent={Intent.SUCCESS}
/>
<BlueprintProgressBar value={progress} />
</div>
);
}
Expand Down
36 changes: 24 additions & 12 deletions src/components/operation-details/OperationDetailsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,18 @@ const OperationDetailsComponent: React.FC<OperationDetailsProps> = ({ operationI
key={op.id}
className='operation-link'
>
<Link
to={`${ROUTES.OPERATIONS}/${op.id}`}
className={classNames('', { current: operationId === op.id })}
>
{op.id} {op.name}
</Link>
{operationId === op.id ? (
<span className='selected-tensor'>
{op.id} {op.name}
</span>
) : (
<Link
to={`${ROUTES.OPERATIONS}/${op.id}`}
className={classNames('', { current: operationId === op.id })}
>
{op.id} {op.name}
</Link>
)}
</div>
))}

Expand All @@ -388,12 +394,18 @@ const OperationDetailsComponent: React.FC<OperationDetailsProps> = ({ operationI
key={op.id}
className='operation-link'
>
<Link
to={`${ROUTES.OPERATIONS}/${op.id}`}
className={classNames('', { current: operationId === op.id })}
>
{op.id} {op.name}
</Link>
{operationId === op.id ? (
<span className='selected-tensor'>
{op.id} {op.name}
</span>
) : (
<Link
to={`${ROUTES.OPERATIONS}/${op.id}`}
className={classNames('', { current: operationId === op.id })}
>
{op.id} {op.name}
</Link>
)}
</div>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/report-selection/ConnectionTestMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const INTENT_MAP: Record<ConnectionTestStates, Intent> = {

function ConnectionTestMessage({ status, message }: ConnectionTestMessageProps) {
return (
<div className={`verify-connection-item status-${ConnectionTestStates[status]}`}>
<div className={`verify-connection-item status-${ConnectionTestStates[status].toLowerCase()}`}>
<Icon
className='connection-status-icon'
icon={ICON_MAP[status]}
Expand Down
1 change: 1 addition & 0 deletions src/components/report-selection/RemoteConnectionDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ const RemoteConnectionDialog: FC<RemoteConnectionDialogProps> = ({
/>
</fieldset>
</DialogBody>

<DialogFooter
minimal
actions={
Expand Down
1 change: 1 addition & 0 deletions src/definitions/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
const ROUTES = Object.freeze({
HOME: '/',
OPERATIONS: '/operations',
STYLEGUIDE: '/styleguide',
});

export default ROUTES;
5 changes: 5 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Layout from './components/Layout';
import Home from './routes/Home';
import Operations from './routes/Operations';
import OperationDetails from './routes/OperationDetails';
import Styleguide from './routes/Styleguide';
import ROUTES from './definitions/routes';

const router = createBrowserRouter([
Expand All @@ -34,6 +35,10 @@ const router = createBrowserRouter([
path: 'operations/:operationId',
element: <OperationDetails />,
},
{
path: 'styleguide',
element: <Styleguide />,
},
],
},
]);
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Icon } from '@blueprintjs/core';
import { IconNames } from '@blueprintjs/icons';
import LocalFolderSelector from '../components/report-selection/LocalFolderSelector';
import RemoteSyncConfigurator from '../components/report-selection/RemoteSyncConfigurator';
import 'styles/components/Home.scss';
import 'styles/routes/Home.scss';

function Home() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Operations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Operations() {
return (
<>
<Helmet title='Operations' />
<OperationList />;
<OperationList />
</>
);
}
Loading

0 comments on commit 8f6d5e2

Please sign in to comment.