mirror of
https://github.com/usememos/memos.git
synced 2025-02-20 21:30:55 +01:00
chore: revert sidebar updates
This commit is contained in:
parent
37cd841992
commit
ffe145d436
@ -6,7 +6,6 @@ import { TAG_REG, LINK_REG } from "../labs/marked/parser";
|
||||
import * as utils from "../helpers/utils";
|
||||
import { checkShouldShowMemoWithFilters } from "../helpers/filter";
|
||||
import toastHelper from "./Toast";
|
||||
import { closeSidebar } from "../helpers/utils";
|
||||
import Memo from "./Memo";
|
||||
import "../less/memo-list.less";
|
||||
|
||||
@ -93,7 +92,7 @@ const MemoList = () => {
|
||||
}, [query]);
|
||||
|
||||
return (
|
||||
<div className="memo-list-container" ref={wrapperElement} onClick={closeSidebar}>
|
||||
<div className="memo-list-container" ref={wrapperElement}>
|
||||
{sortedMemos.map((memo) => (
|
||||
<Memo key={`${memo.id}-${memo.createdTs}-${memo.updatedTs}`} memo={memo} />
|
||||
))}
|
||||
|
@ -5,7 +5,6 @@ import { useAppSelector } from "../store";
|
||||
import * as utils from "../helpers/utils";
|
||||
import useToggle from "../hooks/useToggle";
|
||||
import useLoading from "../hooks/useLoading";
|
||||
import { closeSidebar } from "../helpers/utils";
|
||||
import Icon from "./Icon";
|
||||
import toastHelper from "./Toast";
|
||||
import showCreateShortcutDialog from "./CreateShortcutDialog";
|
||||
@ -64,7 +63,6 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
|
||||
const [showConfirmDeleteBtn, toggleConfirmDeleteBtn] = useToggle(false);
|
||||
|
||||
const handleShortcutClick = () => {
|
||||
closeSidebar();
|
||||
if (isActive) {
|
||||
locationService.setMemoShortcut(undefined);
|
||||
} else {
|
||||
|
@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next";
|
||||
import { useAppSelector } from "../store";
|
||||
import { locationService, memoService, userService } from "../services";
|
||||
import useToggle from "../hooks/useToggle";
|
||||
import { closeSidebar } from "../helpers/utils";
|
||||
import Icon from "./Icon";
|
||||
import "../less/tag-list.less";
|
||||
|
||||
@ -70,7 +69,7 @@ const TagList = () => {
|
||||
}, [tagsText]);
|
||||
|
||||
return (
|
||||
<div className="tags-wrapper" onClick={closeSidebar}>
|
||||
<div className="tags-wrapper">
|
||||
<p className="title-text">{t("common.tags")}</p>
|
||||
<div className="tags-container">
|
||||
{tags.map((t, idx) => (
|
||||
|
@ -134,8 +134,3 @@ export const parseHTMLToRawText = (htmlStr: string): string => {
|
||||
const text = tempEl.innerText;
|
||||
return text;
|
||||
};
|
||||
|
||||
export function closeSidebar() {
|
||||
const sidebarEl = document.body.querySelector(".sidebar-wrapper") as HTMLDivElement;
|
||||
sidebarEl.style.display = "none";
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
@apply w-full px-2 my-2 flex flex-col justify-start items-start shrink-0;
|
||||
|
||||
> .action-btn {
|
||||
@apply leading-10 px-4 rounded-lg text-base text-left w-full hover:bg-white;
|
||||
@apply leading-10 px-4 rounded-lg text-base hover:bg-white;
|
||||
|
||||
> .icon {
|
||||
@apply mr-1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user