mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: ui changes
This commit is contained in:
parent
5f28420040
commit
3cca78d6e1
9 changed files with 50 additions and 73 deletions
|
|
@ -12,26 +12,27 @@ function Activity(props: any) {
|
|||
<Draggable key={props.activity.id} draggableId={props.activity.id} index={props.index}>
|
||||
{(provided) => (
|
||||
<div
|
||||
className="flex flex-row items-center py-2 my-3 rounded-md justify-center bg-gray-50 hover:bg-gray-100 space-x-2 w-auto" key={props.activity.id} {...provided.draggableProps} {...provided.dragHandleProps} ref={provided.innerRef}>
|
||||
<div >
|
||||
className="flex flex-row py-2 my-2 rounded-md bg-gray-50 text-gray-500 hover:bg-gray-100 hover:scale-105 hover:shadow space-x-2 w-auto items-center ring-1 ring-inset ring-gray-400/10 shadow-sm transition-all delay-100 duration-75 ease-linear" key={props.activity.id} {...provided.draggableProps} {...provided.dragHandleProps} ref={provided.innerRef}>
|
||||
<div className="px-3 text-gray-300 space-x-1" >
|
||||
{props.activity.type === "video" && <Video size={16} />}
|
||||
{props.activity.type === "documentpdf" && <FileText size={16} />}
|
||||
{props.activity.type === "dynamic" && <Sparkles size={16} />}
|
||||
|
||||
</div>
|
||||
<p className="first-letter:uppercase">{props.activity.name} </p>
|
||||
<Link
|
||||
<div className="grow justify-end text-center items-center">
|
||||
<p className="first-letter:uppercase">{props.activity.name} </p>
|
||||
</div>
|
||||
<div className="flex flex-row space-x-1 px-3"><Link
|
||||
href={getUriWithOrg(props.orgslug, "") + `/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}`}
|
||||
className=" hover:cursor-pointer p-1 rounded-md bg-slate-200"
|
||||
rel="noopener noreferrer">
|
||||
<EyeOpenIcon className="text-slate-700"/>
|
||||
</Link>
|
||||
<Link
|
||||
href={getUriWithOrg(props.orgslug, "") + `/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}/edit`}
|
||||
className=" hover:cursor-pointer p-1 rounded-md bg-slate-200"
|
||||
className=" hover:cursor-pointer p-1 rounded-md "
|
||||
rel="noopener noreferrer">
|
||||
<Pencil2Icon className="text-slate-700" />
|
||||
<EyeOpenIcon className="text-gray-500" />
|
||||
</Link>
|
||||
<Link
|
||||
href={getUriWithOrg(props.orgslug, "") + `/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}/edit`}
|
||||
className=" hover:cursor-pointer p-1 rounded-md "
|
||||
rel="noopener noreferrer">
|
||||
<Pencil2Icon className="text-gray-500" />
|
||||
</Link></div>
|
||||
</div>
|
||||
)}
|
||||
</Draggable>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from "react";
|
|||
import styled from "styled-components";
|
||||
import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
|
||||
import Activity from "./Activity";
|
||||
import { PlusSquare, Trash, Trash2 } from "lucide-react";
|
||||
import { PlusSquare, Sparkle, Sparkles, Trash, Trash2 } from "lucide-react";
|
||||
import ConfirmationModal from "@components/StyledElements/ConfirmationModal/ConfirmationModal";
|
||||
|
||||
function Chapter(props: any) {
|
||||
|
|
@ -14,7 +14,7 @@ function Chapter(props: any) {
|
|||
{...provided.draggableProps}
|
||||
ref={provided.innerRef}
|
||||
// isDragging={snapshot.isDragging}
|
||||
className="backdrop-blur-md"
|
||||
className=""
|
||||
key={props.info.list.chapter.id}
|
||||
>
|
||||
<h3 className="flex space-x-2 pt-3 font-bold text-md items-center">
|
||||
|
|
@ -36,7 +36,7 @@ function Chapter(props: any) {
|
|||
<Droppable key={props.info.list.chapter.id} droppableId={props.info.list.chapter.id} type="activity">
|
||||
{(provided) => (
|
||||
<ActivitiesList {...provided.droppableProps} ref={provided.innerRef}>
|
||||
<div className="flex flex-col ">
|
||||
<div className="flex flex-col">
|
||||
{props.info.list.activities.map((activity: any, index: any) => (
|
||||
<Activity orgslug={props.orgslug} courseid={props.courseid} key={activity.id} activity={activity} index={index}></Activity>
|
||||
))}
|
||||
|
|
@ -44,9 +44,9 @@ function Chapter(props: any) {
|
|||
|
||||
<div onClick={() => {
|
||||
props.openNewActivityModal(props.info.list.chapter.id);
|
||||
}} className="flex space-x-2 items-center py-2 my-3 rounded-md justify-center text-slate-500 outline-slate-200 bg-slate-50 hover:cursor-pointer">
|
||||
<PlusSquare className="" size={17} />
|
||||
<div className="text-sm mx-auto my-auto items-center font-bold">Add Activity</div>
|
||||
}} className="flex space-x-2 items-center py-2 my-3 rounded-md justify-center text-white bg-black hover:cursor-pointer">
|
||||
<Sparkles className="" size={17} />
|
||||
<div className="text-sm mx-auto my-auto items-center font-bold">Add Activity + </div>
|
||||
</div>
|
||||
</div>
|
||||
</ActivitiesList>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue