Compare commits
4 Commits
794e2447c0
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 4cca273db4 | |||
| 761e623a56 | |||
| 21d3a588b9 | |||
| 2765d76500 |
+2
-2
@@ -112,7 +112,7 @@ CreateApi(function ($api) {
|
|||||||
$classId = substr(strtoupper($req->data['classId']), 0, 10);
|
$classId = substr(strtoupper($req->data['classId']), 0, 10);
|
||||||
// according docs (UPPERCASE, MIN 3 MAX 10)
|
// according docs (UPPERCASE, MIN 3 MAX 10)
|
||||||
$db = db();
|
$db = db();
|
||||||
$results = FastDBReq($db, "SELECT classid FROM classes WHERE classid = ?", [$classId]);
|
$results = FastDBReq($db, "SELECT classid, userclassname FROM classes WHERE classid = ?", [$classId]);
|
||||||
|
|
||||||
if (count($results) != 0) {
|
if (count($results) != 0) {
|
||||||
return $results[0];
|
return $results[0];
|
||||||
@@ -180,7 +180,7 @@ CreateApi(function ($api) {
|
|||||||
}
|
}
|
||||||
$adminId = $req->data['adminId'];
|
$adminId = $req->data['adminId'];
|
||||||
$db = db();
|
$db = db();
|
||||||
$results = FastDBReq($db, "SELECT adminId FROM admins WHERE adminid = ?", [$adminId]);
|
$results = FastDBReq($db, "SELECT * FROM admins WHERE adminid = ?", [$adminId]);
|
||||||
|
|
||||||
|
|
||||||
if (count($results) != 0) {
|
if (count($results) != 0) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { useAtom } from "jotai";
|
|||||||
import { motion } from "motion/react";
|
import { motion } from "motion/react";
|
||||||
import { BiCopy, BiError, BiLeftArrowAlt, BiLink, BiX } from "react-icons/bi";
|
import { BiCopy, BiError, BiLeftArrowAlt, BiLink, BiX } from "react-icons/bi";
|
||||||
import Logo from "../assets/logo.svg";
|
import Logo from "../assets/logo.svg";
|
||||||
|
import LogoAlternative from "../assets/fully_alternative_logo.svg";
|
||||||
import { AdminReq, AdminUpdateRequest } from "../trash/req_mgr";
|
import { AdminReq, AdminUpdateRequest } from "../trash/req_mgr";
|
||||||
import { API_BASE_URL } from "../App";
|
import { API_BASE_URL } from "../App";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
@@ -205,7 +206,12 @@ const Header = ({ setsetRoute, setRoute, pickmeMode }) => {
|
|||||||
" lg:hover:scale-105 transition cursor-pointer"
|
" lg:hover:scale-105 transition cursor-pointer"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<img src={Logo} alt="logo" width={100} draggable={false} />
|
<img
|
||||||
|
src={pickmeMode ? LogoAlternative : Logo}
|
||||||
|
alt="logo"
|
||||||
|
width={100}
|
||||||
|
draggable={false}
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
BiX,
|
BiX,
|
||||||
} from "react-icons/bi";
|
} from "react-icons/bi";
|
||||||
import Logo from "../assets/logo.svg";
|
import Logo from "../assets/logo.svg";
|
||||||
|
import LogoAlternative from "../assets/fully_alternative_logo.svg";
|
||||||
import {
|
import {
|
||||||
AdminUpdateRequest,
|
AdminUpdateRequest,
|
||||||
ClassUpdateRequest,
|
ClassUpdateRequest,
|
||||||
@@ -176,8 +177,8 @@ export function ClassProfileEditor({
|
|||||||
setAdminFrId: (v) => {
|
setAdminFrId: (v) => {
|
||||||
setAdminsData((prev) =>
|
setAdminsData((prev) =>
|
||||||
prev.map((a) =>
|
prev.map((a) =>
|
||||||
a.adminId === i.adminId ? { ...a, adminName: v } : a
|
a.adminId === i.adminId ? { ...a, adminName: v } : a,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -244,7 +245,7 @@ function CreateAdmin({ editorAdminId, update }) {
|
|||||||
{
|
{
|
||||||
action: "create_admin",
|
action: "create_admin",
|
||||||
value: `${adminId};${b64e(adminName)}`,
|
value: `${adminId};${b64e(adminName)}`,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
if (c[1] == true) {
|
if (c[1] == true) {
|
||||||
update();
|
update();
|
||||||
@@ -511,7 +512,12 @@ const Header = ({ setsetRoute, setRoute, pickmeMode }) => {
|
|||||||
" lg:hover:scale-105 transition cursor-pointer"
|
" lg:hover:scale-105 transition cursor-pointer"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<img src={Logo} alt="logo" width={100} draggable={false} />
|
<img
|
||||||
|
src={pickmeMode ? LogoAlternative : Logo}
|
||||||
|
alt="logo"
|
||||||
|
width={100}
|
||||||
|
draggable={false}
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useAtom } from "jotai";
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import Logo from "../assets/logo.svg";
|
import Logo from "../assets/logo.svg";
|
||||||
import { AdminUserFRequest, classUserFRequest } from "../trash/req_mgr";
|
import { AdminUserFRequest, classUserFRequest } from "../trash/req_mgr";
|
||||||
|
import LogoAlternative from "../assets/fully_alternative_logo.svg";
|
||||||
import {
|
import {
|
||||||
BiCalendar,
|
BiCalendar,
|
||||||
BiCalendarEdit,
|
BiCalendarEdit,
|
||||||
@@ -145,14 +146,12 @@ export default function EditorPage(props) {
|
|||||||
>
|
>
|
||||||
<motion.div
|
<motion.div
|
||||||
className="flex items-center w-full justify-between px-5"
|
className="flex items-center w-full justify-between px-5"
|
||||||
layout="position"
|
|
||||||
>
|
>
|
||||||
<motion.img
|
<motion.img
|
||||||
src={Logo}
|
src={pickmeMode ? LogoAlternative : Logo}
|
||||||
alt="logo"
|
alt="logo"
|
||||||
width={100}
|
width={100}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
layout="position"
|
|
||||||
/>
|
/>
|
||||||
<motion.div className="flex gap-5 items-center">
|
<motion.div className="flex gap-5 items-center">
|
||||||
<motion.span
|
<motion.span
|
||||||
@@ -218,7 +217,7 @@ export default function EditorPage(props) {
|
|||||||
setTabDiagRequestTab(404);
|
setTabDiagRequestTab(404);
|
||||||
setTabDiagShow(true);
|
setTabDiagShow(true);
|
||||||
} else {
|
} else {
|
||||||
window['DX_OPEN_DATE'] = date
|
window["DX_OPEN_DATE"] = date;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ export function TableEditor({
|
|||||||
show={deleteDiag}
|
show={deleteDiag}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full overflow-hidden my-1 flex flex-col gap-3">
|
<div className="w-full overflow-hidden my-1 flex flex-col gap-3 pb-40">
|
||||||
<div className="flex gap-2 flex-wrap">
|
<div className="flex gap-2 flex-wrap">
|
||||||
<DengiButton onClick={handleUndo} disabled={undoItems.length == 0}>
|
<DengiButton onClick={handleUndo} disabled={undoItems.length == 0}>
|
||||||
<BiUndo />
|
<BiUndo />
|
||||||
@@ -603,8 +603,8 @@ export function TableEditor({
|
|||||||
strategy={verticalListSortingStrategy}
|
strategy={verticalListSortingStrategy}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<AnimatePresence mode={items.length > 0 ? "sync" : "wait"}>
|
<AnimatePresence mode="popLayout">
|
||||||
{items.map((item) => (
|
{items.map((item, idx) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
initial={{
|
initial={{
|
||||||
x: -15,
|
x: -15,
|
||||||
@@ -632,12 +632,10 @@ export function TableEditor({
|
|||||||
initial={{
|
initial={{
|
||||||
filter: "blur(5px)",
|
filter: "blur(5px)",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
scale: 0.8,
|
|
||||||
}}
|
}}
|
||||||
animate={{
|
animate={{
|
||||||
filter: "blur(0px)",
|
filter: "blur(0px)",
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
scale: 1,
|
|
||||||
}}
|
}}
|
||||||
className={`border-2 border-dashed ${
|
className={`border-2 border-dashed ${
|
||||||
pickmeMode ? "border-pink-700" : "border-gray-700"
|
pickmeMode ? "border-pink-700" : "border-gray-700"
|
||||||
@@ -658,7 +656,7 @@ export function TableEditor({
|
|||||||
<LoadingSpinner size={35} />
|
<LoadingSpinner size={35} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<motion.div className="flex w-full justify-end gap-2 fixed pr-20 bottom-2 left-0">
|
<motion.div layout="position" className="flex w-full justify-end gap-2">
|
||||||
<DengiButton
|
<DengiButton
|
||||||
onClick={handleDeleteAll}
|
onClick={handleDeleteAll}
|
||||||
className="border-red-600! md:not-disabled:not-hover:border-red-400!"
|
className="border-red-600! md:not-disabled:not-hover:border-red-400!"
|
||||||
|
|||||||
@@ -165,18 +165,27 @@ export const DatePicker = (props) => {
|
|||||||
props.setDate(new Date());
|
props.setDate(new Date());
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<AnimatePresence>
|
||||||
|
{props.indicator && (
|
||||||
<motion.span
|
<motion.span
|
||||||
className={
|
className={
|
||||||
"block min-w-2 min-h-2 rounded-full mx-1 transition-colors" +
|
"block min-w-2 min-h-2 rounded-full mx-1 transition-colors" +
|
||||||
(props.indicator
|
(props.pink
|
||||||
? props.pink
|
|
||||||
? " bg-pink-500 animate-pulse"
|
? " bg-pink-500 animate-pulse"
|
||||||
: " bg-zinc-300 animate-pulse"
|
: " bg-zinc-300 animate-pulse")
|
||||||
: " bg-transparent")
|
|
||||||
}
|
}
|
||||||
|
variants={{
|
||||||
|
a: { opacity: 0 },
|
||||||
|
b: { opacity: 1 },
|
||||||
|
}}
|
||||||
|
initial="a"
|
||||||
|
animate="b"
|
||||||
|
exit="a"
|
||||||
layoutId="datepicker_indicator"
|
layoutId="datepicker_indicator"
|
||||||
layout="position"
|
layout="position"
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
<motion.span
|
<motion.span
|
||||||
layoutId="datepicker_date"
|
layoutId="datepicker_date"
|
||||||
layout="position"
|
layout="position"
|
||||||
|
|||||||
Reference in New Issue
Block a user