Skip to content

Remove refinery-config #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
"postcss": "^8.4.28",
"tailwindcss": "^3.1.8"
}
}
}
201 changes: 0 additions & 201 deletions src/components/config/Config.tsx

This file was deleted.

7 changes: 2 additions & 5 deletions src/components/models-download/ModelsDownload.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { selectModelsDownloaded, setModelsDownloaded } from "@/src/reduxStore/states/pages/models-downloaded";
import { ModelsDownloaded, ModelsDownloadedStatus } from "@/src/types/components/models-downloaded/models-downloaded";
import { Tooltip } from "@nextui-org/react";
import { IconAlertTriangleFilled, IconArrowLeft, IconBan, IconCheckbox, IconCircleCheckFilled, IconExternalLink, IconLoader, IconPlus, IconTrash } from "@tabler/icons-react";
import { IconAlertTriangleFilled, IconArrowLeft, IconCircleCheckFilled, IconExternalLink, IconLoader, IconPlus, IconTrash } from "@tabler/icons-react";
import { useRouter } from "next/router";
import { useCallback, useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import LoadingIcon from "../shared/loading/LoadingIcon";
import { openModal, setModalStates } from "@/src/reduxStore/states/modal";
import { ModalEnum } from "@/src/types/shared/modal";
import { selectIsAdmin, selectIsManaged, selectOrganizationId } from "@/src/reduxStore/states/general";
import { selectIsAdmin, selectOrganizationId } from "@/src/reduxStore/states/general";
import { timer } from "rxjs";
import { TOOLTIPS_DICT } from "@/src/util/tooltip-constants";
import AddModelDownloadModal from "./AddModelDownloadModal";
Expand All @@ -20,8 +20,6 @@ import { Application, CurrentPage } from "@/submodules/react-components/hooks/we
export default function ModelsDownload() {
const router = useRouter();
const dispatch = useDispatch();

const isManaged = useSelector(selectIsManaged);
const isAdmin = useSelector(selectIsAdmin);
const modelsDownloaded = useSelector(selectModelsDownloaded);

Expand Down Expand Up @@ -139,7 +137,6 @@ export default function ModelsDownload() {
<div className="grid grid-cols-1 lg:grid-cols-2 gap-2 mt-1 align-top">
<div>
<button onClick={() => dispatch(openModal(ModalEnum.ADD_MODEL_DOWNLOAD))}
disabled={!isManaged}
className={`mr-1 inline-flex items-center px-2.5 py-2 border border-gray-300 shadow-sm text-xs font-semibold rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50`}>
<IconPlus className="h-4 w-4 mr-1" />
Add new model
Expand Down
5 changes: 2 additions & 3 deletions src/components/projects/ProjectCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { selectIsAdmin, selectIsDemo, selectUser } from "@/src/reduxStore/states/general";
import { selectIsAdmin, selectUser } from "@/src/reduxStore/states/general";
import { closeModal, setModalStates } from "@/src/reduxStore/states/modal";
import { removeFromAllProjectsById } from "@/src/reduxStore/states/project";
import { Project, ProjectCardProps, ProjectStatus } from "@/src/types/components/projects/projects-list";
Expand All @@ -16,7 +16,6 @@ export default function ProjectCard(props: ProjectCardProps) {
const router = useRouter();
const dispatch = useDispatch();

const isDemo = useSelector(selectIsDemo);
const isAdmin = useSelector(selectIsAdmin);
const user = useSelector(selectUser);

Expand Down Expand Up @@ -56,7 +55,7 @@ export default function ProjectCard(props: ProjectCardProps) {
<Tooltip content={props.project.user.firstName && props.project.user.lastName ? props.project.user.mail : ''} placement="bottom" color="invert" className="cursor-auto">
<span className="text-sm text-gray-900">{props.project.user.firstName && props.project.user.lastName ? props.project.user.firstName + ' ' + props.project.user.lastName : UNKNOWN_USER}</span>
</Tooltip>
{!isDemo && isAdmin && <>
{isAdmin && <>
<span className="text-sm text-gray-500">on</span>
<span className="text-sm text-gray-900 ">{props.project.date}</span>
<span className="text-sm text-gray-500">at</span>
Expand Down
Loading