Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
ffe145d4
Commit
ffe145d4
authored
Oct 13, 2022
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: revert sidebar updates
parent
37cd8419
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
12 deletions
+3
-12
MemoList.tsx
web/src/components/MemoList.tsx
+1
-2
ShortcutList.tsx
web/src/components/ShortcutList.tsx
+0
-2
TagList.tsx
web/src/components/TagList.tsx
+1
-2
utils.ts
web/src/helpers/utils.ts
+0
-5
siderbar.less
web/src/less/siderbar.less
+1
-1
No files found.
web/src/components/MemoList.tsx
View file @
ffe145d4
...
@@ -6,7 +6,6 @@ import { TAG_REG, LINK_REG } from "../labs/marked/parser";
...
@@ -6,7 +6,6 @@ import { TAG_REG, LINK_REG } from "../labs/marked/parser";
import
*
as
utils
from
"../helpers/utils"
;
import
*
as
utils
from
"../helpers/utils"
;
import
{
checkShouldShowMemoWithFilters
}
from
"../helpers/filter"
;
import
{
checkShouldShowMemoWithFilters
}
from
"../helpers/filter"
;
import
toastHelper
from
"./Toast"
;
import
toastHelper
from
"./Toast"
;
import
{
closeSidebar
}
from
"../helpers/utils"
;
import
Memo
from
"./Memo"
;
import
Memo
from
"./Memo"
;
import
"../less/memo-list.less"
;
import
"../less/memo-list.less"
;
...
@@ -93,7 +92,7 @@ const MemoList = () => {
...
@@ -93,7 +92,7 @@ const MemoList = () => {
}
, [query]);
}
, [query]);
return (
return (
<
div
className=
"memo-list-container"
ref=
{
wrapperElement
}
onClick=
{
closeSidebar
}
>
<
div
className=
"memo-list-container"
ref=
{
wrapperElement
}
>
{
sortedMemos
.
map
((
memo
)
=>
(
{
sortedMemos
.
map
((
memo
)
=>
(
<
Memo
key=
{
`${memo.id}-${memo.createdTs}-${memo.updatedTs}`
}
memo=
{
memo
}
/>
<
Memo
key=
{
`${memo.id}-${memo.createdTs}-${memo.updatedTs}`
}
memo=
{
memo
}
/>
))
}
))
}
...
...
web/src/components/ShortcutList.tsx
View file @
ffe145d4
...
@@ -5,7 +5,6 @@ import { useAppSelector } from "../store";
...
@@ -5,7 +5,6 @@ import { useAppSelector } from "../store";
import
*
as
utils
from
"../helpers/utils"
;
import
*
as
utils
from
"../helpers/utils"
;
import
useToggle
from
"../hooks/useToggle"
;
import
useToggle
from
"../hooks/useToggle"
;
import
useLoading
from
"../hooks/useLoading"
;
import
useLoading
from
"../hooks/useLoading"
;
import
{
closeSidebar
}
from
"../helpers/utils"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
import
toastHelper
from
"./Toast"
;
import
toastHelper
from
"./Toast"
;
import
showCreateShortcutDialog
from
"./CreateShortcutDialog"
;
import
showCreateShortcutDialog
from
"./CreateShortcutDialog"
;
...
@@ -64,7 +63,6 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
...
@@ -64,7 +63,6 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
const
[
showConfirmDeleteBtn
,
toggleConfirmDeleteBtn
]
=
useToggle
(
false
);
const
[
showConfirmDeleteBtn
,
toggleConfirmDeleteBtn
]
=
useToggle
(
false
);
const
handleShortcutClick
=
()
=>
{
const
handleShortcutClick
=
()
=>
{
closeSidebar
();
if
(
isActive
)
{
if
(
isActive
)
{
locationService
.
setMemoShortcut
(
undefined
);
locationService
.
setMemoShortcut
(
undefined
);
}
else
{
}
else
{
...
...
web/src/components/TagList.tsx
View file @
ffe145d4
...
@@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next";
...
@@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next";
import
{
useAppSelector
}
from
"../store"
;
import
{
useAppSelector
}
from
"../store"
;
import
{
locationService
,
memoService
,
userService
}
from
"../services"
;
import
{
locationService
,
memoService
,
userService
}
from
"../services"
;
import
useToggle
from
"../hooks/useToggle"
;
import
useToggle
from
"../hooks/useToggle"
;
import
{
closeSidebar
}
from
"../helpers/utils"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
import
"../less/tag-list.less"
;
import
"../less/tag-list.less"
;
...
@@ -70,7 +69,7 @@ const TagList = () => {
...
@@ -70,7 +69,7 @@ const TagList = () => {
},
[
tagsText
]);
},
[
tagsText
]);
return
(
return
(
<
div
className=
"tags-wrapper"
onClick=
{
closeSidebar
}
>
<
div
className=
"tags-wrapper"
>
<
p
className=
"title-text"
>
{
t
(
"common.tags"
)
}
</
p
>
<
p
className=
"title-text"
>
{
t
(
"common.tags"
)
}
</
p
>
<
div
className=
"tags-container"
>
<
div
className=
"tags-container"
>
{
tags
.
map
((
t
,
idx
)
=>
(
{
tags
.
map
((
t
,
idx
)
=>
(
...
...
web/src/helpers/utils.ts
View file @
ffe145d4
...
@@ -134,8 +134,3 @@ export const parseHTMLToRawText = (htmlStr: string): string => {
...
@@ -134,8 +134,3 @@ export const parseHTMLToRawText = (htmlStr: string): string => {
const
text
=
tempEl
.
innerText
;
const
text
=
tempEl
.
innerText
;
return
text
;
return
text
;
};
};
export
function
closeSidebar
()
{
const
sidebarEl
=
document
.
body
.
querySelector
(
".sidebar-wrapper"
)
as
HTMLDivElement
;
sidebarEl
.
style
.
display
=
"none"
;
}
web/src/less/siderbar.less
View file @
ffe145d4
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
@apply w-full px-2 my-2 flex flex-col justify-start items-start shrink-0;
@apply w-full px-2 my-2 flex flex-col justify-start items-start shrink-0;
> .action-btn {
> .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 {
> .icon {
@apply mr-1;
@apply mr-1;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment