From 2e8588b7efcbe6b2401c8880dfe1bb042128c0d4 Mon Sep 17 00:00:00 2001
From: Yummy_Bacon5 <68166338+YummyBacon5@users.noreply.github.com>
Date: Mon, 5 Feb 2024 14:09:45 +0000
Subject: [PATCH] And fix accessibility issues with contrast, and fix updoot
buttons
---
frontend/src/AddNewWord.tsx | 8 +++++-
frontend/src/DfnArea.tsx | 13 +++++-----
frontend/src/hooks/utils.tsx | 2 +-
frontend/src/index.tsx | 2 +-
frontend/src/static_original/checkmark.svg | 2 +-
frontend/src/static_original/index.html | 1 -
frontend/src/static_original/style.css | 29 ++++++++++++----------
7 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/frontend/src/AddNewWord.tsx b/frontend/src/AddNewWord.tsx
index ac3766c..553ffdc 100644
--- a/frontend/src/AddNewWord.tsx
+++ b/frontend/src/AddNewWord.tsx
@@ -1,6 +1,7 @@
import { useState } from "react";
import { UploadWord, UploadWordError, Word } from "./types";
import { ChevronIcon, createWordDomId } from "./hooks/utils";
+import Tooltip from "./components/Tooltip";
type AddNewWordProps = {
onSubmitFinished?: () => void
@@ -86,7 +87,12 @@ export default function AddNewWord(props: AddNewWordProps) {
-
+
diff --git a/frontend/src/DfnArea.tsx b/frontend/src/DfnArea.tsx
index fe4c1d2..6bc99d1 100644
--- a/frontend/src/DfnArea.tsx
+++ b/frontend/src/DfnArea.tsx
@@ -19,11 +19,10 @@ function UpdootButtons({ word, onUpdootUpdate: updateState }: UpdootButtonsProps
async function handleUpdootClick(state: UpdootStates) {
setUpdootState(state);
- if(state == "none") {
+ if(state == "none")
localStorage.removeItem(`${word.id}-updootState`);
- return;
- }
- localStorage.setItem(`${word.id}-updootState`, state);
+ else
+ localStorage.setItem(`${word.id}-updootState`, state);
const updatedWord: Word = await fetch("/api/update_updoot", {
headers: {
@@ -101,7 +100,6 @@ export default function DfnArea({ word }: DfnAreaProps) {
return (
- Id: {wordData.id}
{wordData.word}
@@ -143,8 +141,9 @@ export default function DfnArea({ word }: DfnAreaProps) {
{wordData.uploader}
+ {wordData.id}
- Creation date:{" "}
+ Creation date:
-
diff --git a/frontend/src/hooks/utils.tsx b/frontend/src/hooks/utils.tsx
index 7528d31..8600e0a 100644
--- a/frontend/src/hooks/utils.tsx
+++ b/frontend/src/hooks/utils.tsx
@@ -22,7 +22,7 @@ export function LinkIcon() {
export function UpdootIcon() {
return (
-