Compare commits

..

4 Commits

Author SHA1 Message Date
katamaz 4cca273db4 fix: update editor delete animations 2026-09-05 11:17:44 +03:00
katamaz 761e623a56 fix(ui): properly hide indicator 2026-09-05 11:17:15 +03:00
katamaz 21d3a588b9 fix(auth): correct sql select 2026-09-03 21:07:15 +03:00
katamaz 2765d76500 fix: add alternative logo to everywhere 2026-09-03 20:58:35 +03:00
6 changed files with 54 additions and 36 deletions
+2 -2
View File
@@ -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) {
+7 -1
View File
@@ -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>
);
+10 -4
View File
@@ -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>
);
+3 -4
View File
@@ -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;
}
}}
>
+4 -6
View File
@@ -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!"
+21 -12
View File
@@ -165,18 +165,27 @@ export const DatePicker = (props) => {
props.setDate(new Date());
}}
>
<motion.span
className={
"block min-w-2 min-h-2 rounded-full mx-1 transition-colors" +
(props.indicator
? props.pink
? " bg-pink-500 animate-pulse"
: " bg-zinc-300 animate-pulse"
: " bg-transparent")
}
layoutId="datepicker_indicator"
layout="position"
/>
<AnimatePresence>
{props.indicator && (
<motion.span
className={
"block min-w-2 min-h-2 rounded-full mx-1 transition-colors" +
(props.pink
? " bg-pink-500 animate-pulse"
: " 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"