Skip to content

Commit

Permalink
darkmode: style : svg login, login, anon,dataset,datasets, dashboard …
Browse files Browse the repository at this point in the history
…and selecinput
  • Loading branch information
SophieLab committed Nov 26, 2024
1 parent 6684253 commit 2a53999
Show file tree
Hide file tree
Showing 30 changed files with 943 additions and 310 deletions.
2 changes: 1 addition & 1 deletion src/admin/general/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const General = () => {

return (
<div
className="mx-4 mt-4 mb-4 shadow-md bg-almond dark:bg-gray-500 rounded-xl"
className="mx-4 mt-4 mb-4 shadow-md bg-almond 292929 rounded-xl"
data-gaelo-flow="general-root"
>
<Tabs className="bg-primary rounded-t-xl">
Expand Down
6 changes: 3 additions & 3 deletions src/admin/jobs/JobTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ const JobTable = ({ data = [], onJobAction }: JobTableProps) => {
<Popover
popover={infoDetails(info.row.original)}
placement="left"
className="w-auto"
className="w-auto "
withOnClick={true}
backgroundColor="bg-white"
backgroundColor="bg-white "
>
<Info size="1.5em" color="gray" className="hover:scale-110" />
<Info size="1.5em" className="hover:scale-110 " />
</Popover>
);
},
Expand Down
2 changes: 1 addition & 1 deletion src/admin/labels/LabelInputForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const LabelInputForm = function ({ onCreateLabel }: LabelInputFormProps) {
return (
<div className="relative flex items-center">
<Input
svgLeft={<Label className="text-2xl text-gray-400" />}
svgLeft={<Label className="text-2xl text-gray-400 dark:text-white" />}
type="text"
value={label ?? ""}
onChange={handleInputChange}
Expand Down
2 changes: 1 addition & 1 deletion src/admin/modalities/ModalitiesRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ModalitiesRoot: React.FC = () => {
color={Colors.primary}
title={"Manage Modalities"}
/>
<CardBody color={Colors.almond} className="space-x-2 dark:bg-gray-500">
<CardBody color={Colors.almond} className="space-x-2 dark:bg-neutral-500">
<div className="w-full mt-2 mb-2">
<ModalitiesTable
aetData={aets}
Expand Down
2 changes: 1 addition & 1 deletion src/admin/modalities/NewModalityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const NewModalityCard: React.FC<NewModalityCardProps> = ({

return (
<FormCard
className="w-full bg-light-gray dark:bg-gray-500"
className="w-full bg-light-gray dark:bg-neutral-500"
title="Create New Modality"
onClose={onClose}
onSubmit={handleSubmit}
Expand Down
2 changes: 1 addition & 1 deletion src/admin/peers/NewPeerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const NewPeerCard: React.FC<NewPeerCardProps> = ({ onClose, onCreatePeer }) => {

return (
<FormCard
className="w-full bg-light-gray dark:bg-gray-500"
className="w-full bg-light-gray dark:bg-neutral-500"
title="Create New Peer"
onClose={onClose}
onSubmit={handleSubmit}
Expand Down
2 changes: 1 addition & 1 deletion src/admin/peers/PeersRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const PeersRoot: React.FC = () => {
color={Colors.primary}
title={"Manage Peers"}
/>
<CardBody className="space-x-4 bg-almond dark:bg-gray-500">
<CardBody className="space-x-4 bg-almond dark:bg-neutral-500">
<div className="flex flex-col items-center">
<div className="w-full mt-2 mb-2">
<PeersTable
Expand Down
2 changes: 1 addition & 1 deletion src/admin/queues/QueuesRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const QueuesRoot = () => {
roundedTopRight={false}
roundedBottomLeft
roundedBottomRight
className="dark:bg-gray-500"
className="dark:bg-neutral-500"
>
<Routes>
<Route
Expand Down
2 changes: 1 addition & 1 deletion src/anonymize/AnonymizeRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const AnonymizeRoot = () => {
</CardHeader>
<CardBody
color={Colors.almond}
className="dark:bg-gray-500">
className="dark:bg-neutral-500">
<div className="flex flex-col w-full gap-4">
<div className="flex-1 overflow-auto break-words">
<PatientTable
Expand Down
4 changes: 4 additions & 0 deletions src/assets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import Settings from "./settings.svg?react";
import Shutdown from "./shutdown.svg?react";
import SignIn from "./sign-in.svg?react";
import SignUp from "./sign-up.svg?react";
import SignInUpDark from "./sign-up-dark.svg?react";
import signIndark from "./sign-in-dark.svg?react";
import Sun from "./sun.svg?react";
import UserBanner from "./user-banner.svg?react";
import User from "./user.svg?react";
Expand Down Expand Up @@ -71,6 +73,8 @@ export {
Shutdown,
SignIn,
SignUp,
SignInUpDark,
signIndark,
Sun,
UserBanner,
User,
Expand Down
603 changes: 603 additions & 0 deletions src/assets/sign-in-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 71 additions & 68 deletions src/assets/sign-up-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
332 changes: 156 additions & 176 deletions src/assets/sign-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/content/ContentRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const ContentRoot: React.FC = () => {
onClose={closeEditModal}
show={!!editingPatient}
/>
<FormCard className="bg-white dark:bg-gray-500" title="Search" collapsible>
<FormCard className="bg-white dark:bg-neutral-500" title="Search" collapsible>
<SearchForm onSubmit={handleSubmit} existingLabels={labelsData} withAets={false} />
</FormCard>

Expand Down
2 changes: 1 addition & 1 deletion src/datasets/DatasetRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const DatasetRoot = () => {
color={Colors.primary}
title="Dataset"
/>
<CardBody className="bg-almond dark:bg-gray-500">
<CardBody className="bg-almond dark:bg-neutral-500">
<div className="space-y-2">
<span className="text-base font-semibold text-gray-700 dark:text-white">Labels</span>
<SelectRoleLabels values={selectedLabels} onChange={(labels) => setSelectedLabels(labels)} />
Expand Down
2 changes: 1 addition & 1 deletion src/delete/DeleteRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const DeleteRoot = () => {
</CardHeader>
<CardBody
color={Colors.almond}
className="dark:bg-gray-500">
className="dark:bg-neutral-500">
<DeleteStudyTable
studies={Object.values(deleteList)} />
</CardBody>
Expand Down
2 changes: 1 addition & 1 deletion src/export/ExportRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const ExportRoot = () => {
</CardHeader>
<CardBody
color={Colors.almond}
className="overflow-x-auto dark:bg-gray-500">
className="overflow-x-auto dark:bg-neutral-500">
<div className="flex flex-col md:flex-row md:space-x-4">
<div className="flex-1 min-w-0">
<ExportStudyTable
Expand Down
9 changes: 6 additions & 3 deletions src/icons/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { BsInfoCircle } from "react-icons/bs";

const Info = (props) => {
return (
<BsInfoCircle {...props} />
)
<BsInfoCircle
{...props}
className="text-white dark:text-white"
/>
);
}

export default Info
export default Info;
2 changes: 1 addition & 1 deletion src/import/ImportCreateRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ImportCreateRoot = () => {
};

return (
<div className="shadow-md bg-almond dark:bg-gray-500 rounded-xl" data-gaelo-flow="import-create-root">
<div className="shadow-md bg-almond dark:bg-neutral-500 rounded-xl" data-gaelo-flow="import-create-root">
<Tabs className="bg-primary rounded-t-xl">
<Tab
title="Import Dicom"
Expand Down
2 changes: 1 addition & 1 deletion src/import/create/CreateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const CreateForm = ({ title, className, onAddTag }: TagFormProps) => {

return (
<FormCard
className={`${className} w-full bg-light-gray dark:bg-gray-500`}
className={`${className} w-full bg-light-gray dark:bg-neutral-500`}
title={title}
onSubmit={handleSubmit}
>
Expand Down
4 changes: 2 additions & 2 deletions src/query/QueryRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const QueryRoot = ({ className }: QueryFormProps) => {
return (
<div className={`${className} space-y-6`}>
<FormCard
className="flex flex-col justify-center bg-white dark:bg-gray-500 gap-y-7"
className="flex flex-col justify-center bg-white dark:bg-neutral-500 gap-y-7"
title={"Search"}
collapsible={true}
>
Expand All @@ -99,7 +99,7 @@ const QueryRoot = ({ className }: QueryFormProps) => {
</FormCard>

{/* Section for results and series tables */}
<div className="flex flex-col w-full p-4 bg-white shadow-md dark:bg-gray-500 rounded-3xl">
<div className="flex flex-col w-full p-4 bg-white shadow-md dark:bg-neutral-500 rounded-3xl">
<div className="flex items-center justify-between mb-4">
<div className="text-2xl font-bold text-primary dark:text-white">Results</div>
<div className="text-lg text-neutral-600">
Expand Down
5 changes: 2 additions & 3 deletions src/root/Dashboard/CardAnon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const CardAnon = () => {
<Anon className="mr-3 text-xl text-white" />
<span className="text-lg font-bold text-white">Anonymisation</span>
</CardHeader>
<CardBody className="flex items-center justify-center p-4" color={Colors.white}>
<CardBody className="flex items-center justify-center p-4 dark:bg-neutral-500" color={Colors.white}>
{
firstQueue ?
(<ProgressQueueCircle
Expand All @@ -63,8 +63,7 @@ const CardAnon = () => {
"None"
}
</CardBody>
<CardFooter className="flex justify-center" color={Colors.white}>
{/* You can add footer content here if needed */}
<CardFooter className="flex justify-center dark:bg-neutral-500" color={Colors.white}>
</CardFooter>
</Card>
);
Expand Down
11 changes: 5 additions & 6 deletions src/root/Dashboard/CardExport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ const CardExport = () => {
return (
<Card className="flex-1 overflow-hidden rounded-lg shadow-lg md:max-w-md">
<CardHeader centerTitle color={Colors.secondary} className="flex items-center">
<Export className="mr-3 text-xl text-white" /> {/* Add margin to the right of the icon */}
<span className="text-lg font-bold text-white">{/* Title inside span to ensure proper styling */}Anonymisation</span>
<Export className="mr-3 text-xl text-white " />
<span className="text-lg font-bold text-white">Anonymisation</span>
</CardHeader>

<CardBody
className="flex flex-col items-center justify-center p-6 bg-gray-50"
color={Colors.light}

className="flex flex-col items-center justify-center p-6 dark:bg-neutral-500 bg-gray-50"
color={Colors.light} children={""}
>

</CardBody>
<CardFooter className="flex justify-center" color={Colors.white}>
<CardFooter className="flex justify-center dark:bg-neutral-500" color={Colors.white}>
</CardFooter>
</Card>
);
Expand Down
10 changes: 8 additions & 2 deletions src/root/Dashboard/CardRetrieve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ import { Colors } from "../../utils/enums";
const CardRetrieve = () => {
return (
<Card className="flex-1">
<CardHeader centerTitle color={Colors.primary} className="flex items-center">
<CardHeader centerTitle color={Colors.primary} className="flex items-center ">
<AutoRetrieve className="mr-3 text-xl text-white" />
<span className="text-lg font-bold text-white">Retrieve</span>
</CardHeader>
<CardBody color={Colors.light} children={""}>
<CardBody
className="dark:bg-neutral-500"
color={Colors.light}
children={""}>
</CardBody>
<CardFooter className="flex justify-center dark:bg-neutral-500" color={Colors.white}>

</CardFooter>
</Card>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/root/ToolItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type ToolItemProps = {

const ToolItem = ({ children, count, onClick }: ToolItemProps) => {
return (
<div className="flex items-center justify-around w-full transition-colors bg-white rounded-md shadow-md dark:bg-neutral-700 h-9 hover:bg-orange-500 group dark:hover:bg-gray-500" onClick={onClick}>
<div className="flex items-center justify-around w-full transition-colors bg-white rounded-md shadow-md dark:bg-neutral-700 h-9 hover:bg-orange-500 group dark:hover:bg-neutral-500" onClick={onClick}>
<span className="text-xl">{children}</span>
<span className="rounded-full border border-gray-300 text-black bg-white shadow-[0_4px_6px rgba(255,165,0,0.5)] min-w-5 text-center">
{count}
Expand Down
6 changes: 3 additions & 3 deletions src/ui/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const Input = ({
mr-3
block
dark:bg-stone-800
dark:border-gray-500
dark:border-white
dark:placeholder-gray-200
dark:text-white
dark:text-gray-200
dark:focus:ring-indogp-300
dark:focus:border-blue-500
hover:disabled:cursor-not-allowed
Expand All @@ -74,7 +74,7 @@ const Input = ({

<div
className={
`flex items-center peer ${borderClasses} text-gray-600 w-full ${roundedRightClass} text-sm ${InputClassName} ${className}`
`flex items-center peer ${borderClasses} text-gray-600 dark:text-white w-full ${roundedRightClass} text-sm ${InputClassName} ${className}`
}>
{svgLeft && (
<div className="p-3 pointer-events-none peer-disabled:pointer-events-none peer-disabled:opacity-50">
Expand Down
2 changes: 1 addition & 1 deletion src/ui/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Modal = ({ show, size = "lg", children, ...props }: ModalProps) => {
<div
data-gaelo-flow='modal'
className={
"fixed left-0 top-0 z-[1400] w-full h-full overflow-y-auto overflow-x-hidden bg-gray-600 bg-opacity-50 dark:text-white " +
"fixed left-0 top-0 z-[1400] w-full h-full overflow-y-auto overflow-x-hidden bg-neutral-500 bg-opacity-50 dark:text-white " +
(show ? "open" : "hidden")
}
{...props}
Expand Down
21 changes: 19 additions & 2 deletions src/ui/SelectInput.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Select, { ActionMeta, ClassNamesConfig } from 'react-select';
import Select, { ActionMeta, StylesConfig } from 'react-select';

interface OptionType {
value: string;
Expand All @@ -19,6 +19,22 @@ interface SelectInputProps {
formatGroupLabel?: (group: { label: string; options: OptionType[] }) => JSX.Element;
}

// Styles personnalisés pour React-Select
const customStyles: StylesConfig<OptionType, boolean> = {
placeholder: (base) => ({
...base,
color: 'white', // Placeholder en blanc
}),
input: (base) => ({
...base,
color: 'white', // Texte saisi en blanc
}),
singleValue: (base) => ({
...base,
color: 'white', // Valeur sélectionnée en blanc
}),
};

const customClass: ClassNamesConfig<OptionType, boolean> = {
control: (state) => {
const borderRadius = state.selectProps.rounded ? 'rounded-3xl' : 'rounded-xl';
Expand All @@ -29,7 +45,7 @@ const customClass: ClassNamesConfig<OptionType, boolean> = {
return `rounded-xl p-2 ${state.isSelected ? 'bg-primary-active text-white' : 'bg-white dark:bg-neutral-800 text-gray-800 dark:text-white'} hover:bg-primary hover:text-white px-2`;
},
multiValue: () => 'bg-gray-200 dark:bg-neutral-800 rounded-3xl px-2 py-0.5',
multiValueLabel: () => 'text-gray-800 ',
multiValueLabel: () => 'text-gray-800',
multiValueRemove: () => 'text-red-500 hover:bg-red-200 rounded-full p-0.5',
};

Expand All @@ -55,6 +71,7 @@ const SelectInput = ({
options={options}
onChange={onChange}
placeholder={placeholder}
styles={customStyles}
classNames={customClass}
isClearable={isClearable}
menuPosition={menuPosition}
Expand Down
4 changes: 2 additions & 2 deletions src/welcome/SignUpForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const SignUpForm = () => {

return (
<div className="relative flex items-center justify-center">
<div className="absolute h-full w-full bg-gradient-to-r from-indigo-500 to-[#926874] dark:from-blue-950 dark:to-orange-800 shadow-2xl transform rounded-3xl rotate-6 z-0"></div>
<div className="relative px-10 bg-white shadow-lg py-14 rounded-3xl dark:bg-neutral-700">
<div className="absolute h-full w-full bg-gradient-to-r from-indigo-500 to-[#926874] dark:from-blue-950 dark:to-rose-950 shadow-2xl transform rounded-3xl rotate-6 z-0"></div>
<div className="relative px-10 bg-white shadow-lg dark:text-white dark:opacity-70 dark:bg-neutral-700 py-14 rounded-3xl">
<form onSubmit={handleSubmit} className="relative z-10 flex flex-col items-center w-full">
<h1 className="mb-4 text-2xl font-semibold text-center md:text-3xl lg:text-4xl text-dark dark:text-white">
Welcome to <span className="text-primary dark:text-white">GaelO Flow</span>
Expand Down
Loading

0 comments on commit 2a53999

Please sign in to comment.