Compare commits
2 Commits
df36c180af
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| ec81492d49 | |||
| 562302b5a0 |
@@ -24,7 +24,7 @@ import {
|
|||||||
} from "@heroicons/react/24/outline";
|
} from "@heroicons/react/24/outline";
|
||||||
import { FunctionComponent } from "preact";
|
import { FunctionComponent } from "preact";
|
||||||
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
||||||
import { Checkbox } from "primereact/checkbox";
|
import { Checkbox, CheckboxPassThroughMethodOptions } from "primereact/checkbox";
|
||||||
import { Nullable } from "primereact/ts-helpers";
|
import { Nullable } from "primereact/ts-helpers";
|
||||||
import { SubmitHandler, useForm } from "react-hook-form";
|
import { SubmitHandler, useForm } from "react-hook-form";
|
||||||
import { v4 as uuid } from "uuid";
|
import { v4 as uuid } from "uuid";
|
||||||
@@ -259,7 +259,9 @@ const ProfileTasks: FunctionComponent = () => {
|
|||||||
<div class="flex w-full flex-row items-start justify-between">
|
<div class="flex w-full flex-row items-start justify-between">
|
||||||
<div class="flex flex-1 flex-col gap-1 pe-2">
|
<div class="flex flex-1 flex-col gap-1 pe-2">
|
||||||
<input
|
<input
|
||||||
class="w-full text-2xl outline-0"
|
class={cn("w-full p-2 text-2xl outline-0", {
|
||||||
|
"rounded-md bg-gray-400/30 ring-1 ring-gray-400": isEditModal,
|
||||||
|
})}
|
||||||
disabled={!isEditModal}
|
disabled={!isEditModal}
|
||||||
placeholder="Название"
|
placeholder="Название"
|
||||||
{...register("name", {
|
{...register("name", {
|
||||||
@@ -268,7 +270,9 @@ const ProfileTasks: FunctionComponent = () => {
|
|||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
<textarea
|
<textarea
|
||||||
class="h-[5rem] w-full resize-none outline-0"
|
class={cn("h-[5rem] w-full resize-none p-2 outline-0", {
|
||||||
|
"rounded-md bg-gray-400/30 ring-1 ring-gray-400": isEditModal,
|
||||||
|
})}
|
||||||
disabled={!isEditModal}
|
disabled={!isEditModal}
|
||||||
placeholder={isEditModal ? "Описание" : ""}
|
placeholder={isEditModal ? "Описание" : ""}
|
||||||
{...register("description", {
|
{...register("description", {
|
||||||
@@ -283,7 +287,7 @@ const ProfileTasks: FunctionComponent = () => {
|
|||||||
/>
|
/>
|
||||||
<input type="checkbox" hidden {...register("checked")} />
|
<input type="checkbox" hidden {...register("checked")} />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row gap-4">
|
<div class="flex flex-col gap-4 md:flex-row">
|
||||||
<div
|
<div
|
||||||
className="flex cursor-pointer flex-col items-center gap-3"
|
className="flex cursor-pointer flex-col items-center gap-3"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -373,13 +377,13 @@ const ProfileTasks: FunctionComponent = () => {
|
|||||||
<div class="flex w-full flex-1 flex-row items-start justify-between">
|
<div class="flex w-full flex-1 flex-row items-start justify-between">
|
||||||
<div class="flex flex-1 flex-col gap-1 pe-2">
|
<div class="flex flex-1 flex-col gap-1 pe-2">
|
||||||
<input
|
<input
|
||||||
class="w-full text-2xl outline-0"
|
class="w-full rounded-md bg-gray-400/30 p-2 text-2xl ring-1 ring-gray-400 outline-0"
|
||||||
maxLength={20}
|
maxLength={20}
|
||||||
placeholder="Название"
|
placeholder="Название"
|
||||||
{...register("name", { required: "Заполните название" })}
|
{...register("name", { required: "Заполните название" })}
|
||||||
/>
|
/>
|
||||||
<textarea
|
<textarea
|
||||||
class="h-[5rem] w-full resize-none outline-0"
|
class="h-[5rem] w-full resize-none rounded-md bg-gray-400/30 p-2 ring-1 ring-gray-400 outline-0"
|
||||||
placeholder="Описание"
|
placeholder="Описание"
|
||||||
maxLength={200}
|
maxLength={200}
|
||||||
{...register("description")}
|
{...register("description")}
|
||||||
@@ -392,7 +396,7 @@ const ProfileTasks: FunctionComponent = () => {
|
|||||||
/>
|
/>
|
||||||
<input type="checkbox" checked={false} hidden {...register("checked")} />
|
<input type="checkbox" checked={false} hidden {...register("checked")} />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row gap-3 self-start">
|
<div class="flex flex-col gap-3 self-start md:flex-row">
|
||||||
<CalendarDaysIcon
|
<CalendarDaysIcon
|
||||||
class="size-8 cursor-pointer"
|
class="size-8 cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -665,7 +669,7 @@ const ProfileTasks: FunctionComponent = () => {
|
|||||||
"absolute appearance-none top-0 left-0 size-full p-0 m-0 opacity-0 z-10 outline-none cursor-pointer"
|
"absolute appearance-none top-0 left-0 size-full p-0 m-0 opacity-0 z-10 outline-none cursor-pointer"
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
box: ({ props, context }) => ({
|
box: ({ props, context }: CheckboxPassThroughMethodOptions) => ({
|
||||||
className: cn(
|
className: cn(
|
||||||
"flex items-center justify-center",
|
"flex items-center justify-center",
|
||||||
"border-2 w-6 h-6 text-gray-600 rounded-lg transition-colors duration-200",
|
"border-2 w-6 h-6 text-gray-600 rounded-lg transition-colors duration-200",
|
||||||
@@ -680,7 +684,9 @@ const ProfileTasks: FunctionComponent = () => {
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
icon: "w-4 h-4 transition-all duration-200 text-white text-base",
|
icon: {
|
||||||
|
className: "w-4 h-4 transition-all duration-200 text-white text-base",
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
></Checkbox>
|
></Checkbox>
|
||||||
<label htmlFor="overdue" class="cursor-pointer">
|
<label htmlFor="overdue" class="cursor-pointer">
|
||||||
|
|||||||
Reference in New Issue
Block a user