Fix more bugs

This commit is contained in:
MeowcaTheoRange 2023-09-24 20:15:59 -05:00
parent 1fa4a00841
commit da4c3d3838
4 changed files with 16 additions and 11 deletions

View file

@ -387,7 +387,7 @@ export default function ClanFormTemplate({
<span className={globals.text}>The color that represents your clan the most.</span>
</div>
<div className={globals.verticalListTop}>
{values.color != null && errors.color == null ? (
{values.color != null ? (
<>
<div className={globals.horizontalListLeft}>
<span className={globals.text}>Red</span>

View file

@ -790,7 +790,7 @@ export default function TrollFormTemplate({
</span>
</div>
<div className={globals.verticalListTop}>
{values.textColor != null && errors.textColor == null ? (
{values.textColor != null ? (
<>
<div className={globals.horizontalListLeft}>
<span className={globals.text}>Red</span>

View file

@ -59,15 +59,20 @@ export default async function handler(
// Encrypt code lole
serverClan.code = await hash(serverClan.code);
if (
serverClan.flairs != null &&
!compareLevels(getLevel(checkExistingClan), "SUPPORTER")
) {
serverClan.bgimage = null;
serverClan.css = null;
}
const bothClans = MergeServerClans(checkExistingClan, serverClan);
if (
bothClans.flairs == null ||
!(
bothClans.flairs != null &&
compareLevels(getLevel(checkExistingClan), "SUPPORTER")
)
) {
bothClans.bgimage = null;
bothClans.css = null;
}
if (bothClans.bgimage === "") bothClans.bgimage = null;
if (bothClans.css === "") bothClans.css = null;
const newClan = await changeClan(bothClans);
if (newClan == null) return res.status(503).end();
// Give cookies, redundant style

View file

@ -93,7 +93,7 @@
width: 25ch;
color: inherit;
box-shadow: inset 0 0 2px currentColor;
background-color: transparent;
background-color: var(--pri-bg);
border: 1px solid currentColor;
padding: 4px 8px;