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