Skip to content
Open
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
28 changes: 18 additions & 10 deletions client/src/components/Home/PinnedProjects/PinnedProjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ interface PinnedProjectsInterface {}
const PinnedProjects: React.FC<PinnedProjectsInterface> = () => {
const { openModal, closeAllModals } = useModals();
const isTailwindLg = useMediaQuery({ minWidth: 1024 });
const isXL = useMediaQuery({ minWidth: 1280 });
const { data, isLoading } = usePinnedProjects();

const onShowPinnedModal = () => {
Expand All @@ -40,7 +41,7 @@ const PinnedProjects: React.FC<PinnedProjectsInterface> = () => {
const panes = useMemo(() => {
if (!data) return [];

const classList = "xl:!ml-24 2xl:!ml-4 3xl:!ml-0 !max-h-[500px] overflow-y-auto xl:!mr-1"
const classList = "xl:!ml-24 2xl:!ml-4 3xl:!ml-0 !max-h-[500px] xl:!mr-1 !pt-1"
const allItemsLength = data
?.map((i) => i.projects?.length)
.reduce((acc, curr) => acc + (curr || 0), 0);
Expand All @@ -64,7 +65,7 @@ const PinnedProjects: React.FC<PinnedProjectsInterface> = () => {
return <NoPinnedMessage />;
}
return (
<Card.Group itemsPerRow={2} className={classList}>
<Card.Group itemsPerRow={isXL ? 1 : 2} className={classList}>
{i.projects?.map((item) =>
typeof item === "string" ? null : (
<ProjectCard project={item} key={item.projectID} />
Expand All @@ -86,7 +87,7 @@ const PinnedProjects: React.FC<PinnedProjectsInterface> = () => {
return <NoPinnedMessage />;
}
return (
<Card.Group itemsPerRow={2} className={classList}>
<Card.Group itemsPerRow={isXL ? 1 : 2} className={classList}>
{data?.map((i) => {
if (typeof i.projects === "string") return null;
return i.projects?.map((item) =>
Expand All @@ -99,12 +100,11 @@ const PinnedProjects: React.FC<PinnedProjectsInterface> = () => {
);
},
});

return items;
}, [data]);
}, [data, isXL]);

return (
<Segment padded={Object.entries(data || {}).length > 0} loading={isLoading} className="!pb-10">
<Segment padded={Object.entries(data || {}).length > 0} loading={isLoading} className="!pb-10 mt-4 flex-1 flex flex-col min-h-0">
<div className="header-custom mb-5">
<h3>
<Icon name="pin" />
Expand All @@ -128,10 +128,18 @@ const PinnedProjects: React.FC<PinnedProjectsInterface> = () => {
/>
</div>
</div>
<Tab
panes={panes}
menu={{ vertical: isTailwindLg, tabular: !isTailwindLg }}
></Tab>
<div className="overflow-x-auto overflow-y-auto flex-1 min-h-0 -mx-4 px-4">
<div className="min-w-min h-full">
<Tab
panes={panes}
menu={{
vertical: isTailwindLg,
tabular: !isTailwindLg,
className: !isTailwindLg ? 'flex-nowrap whitespace-nowrap' : ''
}}
/>
</div>
</div>
</Segment>
);
};
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/projects/ProjectCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const ProjectCard = ({

return (
<Card raised {...props} className="!max-h-[130px]">
<div className="flex flex-col flex-grow p-4">
<div className="flex flex-col flex-grow p-4 overflow-y-auto overflow-x-auto">
<div className="flex">
<div className="flex flex-col flex-1">
<Link
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/support/StaffDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const StaffDashboard = () => {
);

return (
<div className="flex flex-col p-8">
<div className="flex flex-col p-8 overflow-y-auto">
<div className="flex flex-row justify-between items-center">
<p className="text-4xl font-semibold">Staff Dashboard</p>
<div className="flex flex-row">
Expand Down
40 changes: 2 additions & 38 deletions client/src/screens/conductor/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ const Home = () => {
</Message>
</div>
)}
<div className="flex flex-col xl:flex-row w-full">
<div className="flex flex-col xl:flex-row w-full min-h-screen">
<div className="flex flex-col mb-4 xl:w-1/6 xl:mr-12 xl:mb-0">
<UserMenu />
</div>
<div className="flex flex-col mb-8 xl:w-1/2 xl:mr-12 xl:mb-0">
<div className="flex flex-col mb-8 xl:w-1/2 xl:mr-12 xl:mb-0 flex-1 max-h-[1000px] min-h-fit">
<Button
onClick={() => setShowCreateProjectModal(true)}
fluid
Expand All @@ -213,42 +213,6 @@ const Home = () => {
labelPosition="left"
/>
<PinnedProjects />
<Segment padded>
<div className="dividing-header-custom">
<h3>
<Icon name="clock outline" />
Recently Edited Projects
</h3>
<div className="right-flex">
<Popup
content={
<span>
To see all of your projects, visit{" "}
<strong>Projects</strong> in the Navbar.
</span>
}
trigger={<Icon name="info circle" />}
position="top center"
/>
</div>
</div>
<Segment basic loading={!loadedAllRecents}>
<Card.Group itemsPerRow={2}>
{recentProjects.length > 0 &&
recentProjects.map((item) => (
<ProjectCard
project={item}
key={item.projectID}
showPinButton={true}
onPin={(pid) => handlePinProject(pid)}
/>
))}
{recentProjects.length === 0 && (
<p>You don't have any projects right now.</p>
)}
</Card.Group>
</Segment>
</Segment>
</div>
<div className="flex flex-col mb-8 xl:w-1/3 xl:mb-0">
<Segment padded>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const CentralIdentityUsers = () => {
{ key: "email", text: "Email" },
{ key: "userType", text: "User Type" },
{ key: "verification", text: "Verification Status" },
{ key: "studentId", text: "Student ID" },
{ key: "Auth Source", text: "Auth Source" },
{ key: "Actions", text: "Actions" },
];
Expand Down Expand Up @@ -166,7 +165,7 @@ const CentralIdentityUsers = () => {
<Grid.Column width={5}>
<Input
icon="search"
placeholder="Search by Name, Email, Student ID, or UUID..."
placeholder="Search by Name, Email, or UUID..."
onChange={(e) => {
setSearchInput(e.target.value);
getUsersDebounced(e.target.value);
Expand Down Expand Up @@ -254,13 +253,6 @@ const CentralIdentityUsers = () => {
<span className="muted-text">N/A</span>
)}
</Table.Cell>
<Table.Cell>
{user.student_id ? (
<span>{user.student_id}</span>
) : (
<span className="muted-text">N/A</span>
)}
</Table.Cell>
<Table.Cell>
<span>
{user.external_idp
Expand Down
22 changes: 22 additions & 0 deletions client/src/screens/conductor/support/SupportCreateTicket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import AuthHelper from "../../../components/util/AuthHelper";
import CreateTicketFlow from "../../../components/support/CreateTicketFlow";
import useSystemAnnouncement from "../../../hooks/useSystemAnnouncement";
import SystemAnnouncement from "../../../components/util/SystemAnnouncement";
import { Message } from 'semantic-ui-react';

const SupportCreateTicket = () => {
const user = useTypedSelector((state) => state.user);
Expand Down Expand Up @@ -48,6 +49,27 @@ const SupportCreateTicket = () => {
<p className="mt-2">
Submit a support ticket to get help from our team.
</p>
<div className="flex flex-col border rounded-lg mt-4 w-full lg:w-2/3 bg-white">
<Message info>
<Message.Content>
<div>
<strong>Important:</strong>
<p>
Please do not submit a support ticket for account creation. You can visit {' '}
<a
href="https://register.libretexts.org"
target="_blank"
rel="noopener noreferrer"
className="text-[#276f86] hover:underline"
>
https://register.libretexts.org
</a>
{' '} to create an account and complete instructor verification (if applicable).
</p>
</div>
</Message.Content>
</Message>
</div>
<>
{!isLoggedIn && !guestMode && (
<div className="flex flex-col w-1/2 lg:w-2/5 mt-8 items-center">
Expand Down