Skip to content

Commit

Permalink
undo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Dec 6, 2023
1 parent 23878cc commit c48b428
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ const PanAndZoomImage = ({ src, id, ...props }: IPanAndZoomImage) => {
<img
className={`pan-zoom-image--image image--default ${props.translateRotation}`}
alt="image"
role="presentation"
src={src}
onLoad={
new OnLoadMouseAction(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const FormControl: React.FunctionComponent<IFormControlProps> = ({

<div
data-test={props["data-test"] ? props["data-test"] : "form-control"}
role="button"
onBlur={
new LimitLength(setChildLength, onBlur, maxlength).LimitLengthBlur
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ const ListImage: React.FunctionComponent<IListImageProps> = memo((props) => {
<img
src={src}
alt={alt}
role="presentation"
data-test="list-image-img"
onLoad={() => {
setError(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export default function Modal({
return ReactDOM.createPortal(
<div
onClick={(event) => ifModalOpenHandleExit(event, handleExit)}
role="presentation"
onKeyDown={(event) => {
event.key === "Enter" && handleExit();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ const MenuInlineSearch: React.FunctionComponent<IMenuSearchBarProps> = (
<div
className={!formFocus ? "blur" : ""}
onFocus={() => setFormFocus(true)}
role="presentation"
>
<ul>
<li className="menu-item menu-item--half-extra">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ const MenuOptionMoveToTrash: React.FunctionComponent<IMenuOptionMoveToTrashProps
if (selectParams.length === 0) return;

const bodyParams = new URLSearchParams();
// noinspection PointlessBooleanExpressionJS
const collections = new URLPath().StringToIUrl(history.location.search).collections !==
false;

bodyParams.append("f", selectParams);
bodyParams.set("Tags", "!delete!");
bodyParams.set("append", "true");
bodyParams.set("Colorclass", "8");
bodyParams.set(
"collections",
(
new URLPath().StringToIUrl(history.location.search).collections !==
false
).toString()
collections.toString()
);

const resultDo = await FetchPost(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ const DetailViewMp4: React.FunctionComponent = memo(() => {
);
}

function updateProgressByClick(event: React.MouseEvent) {
if (!videoRef.current || !event.target) return;
function updateProgressByClick(event?: React.MouseEvent) {
if (!videoRef.current || !event?.target) return;
const mousePosition = getMousePosition(event);

const result = isNaN(mousePosition)
Expand Down Expand Up @@ -271,9 +271,11 @@ const DetailViewMp4: React.FunctionComponent = memo(() => {
<progress
ref={progressRef}
onClick={updateProgressByClick}
role="presentation"
className="progress"
value="0"
onKeyDown={(event) => {
event.key === "Enter" && updateProgressByClick();
}}
>
<span id="progress-bar"></span>
</progress>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ function GetHeaderClass(
return "header header--main header--edit";
}
} else {
if (isMarkedAsDeleted) {
return "header header--main header--deleted";
} else {
return "header header--main";
}
return isMarkedAsDeleted ? "header header--main header--deleted" : "header header--main";
}
}

Expand Down

0 comments on commit c48b428

Please sign in to comment.