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
6028838f
Commit
6028838f
authored
Apr 09, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update component name
parent
000b3a7a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
10 deletions
+9
-10
BaseDialog.tsx
web/src/components/Dialog/BaseDialog.tsx
+2
-3
HomeSidebar.tsx
web/src/components/HomeSidebar/HomeSidebar.tsx
+2
-2
MemoEditorDialog.tsx
web/src/components/MemoEditor/MemoEditorDialog.tsx
+0
-1
PreviewMarkdownDialog.tsx
web/src/components/PreviewMarkdownDialog.tsx
+0
-1
UserStatisticsView.tsx
web/src/components/UserStatisticsView.tsx
+5
-3
No files found.
web/src/components/Dialog/BaseDialog.tsx
View file @
6028838f
...
@@ -12,7 +12,6 @@ import "@/less/base-dialog.less";
...
@@ -12,7 +12,6 @@ import "@/less/base-dialog.less";
interface
DialogConfig
{
interface
DialogConfig
{
dialogName
:
string
;
dialogName
:
string
;
className
?:
string
;
className
?:
string
;
containerClassName
?:
string
;
clickSpaceDestroy
?:
boolean
;
clickSpaceDestroy
?:
boolean
;
}
}
...
@@ -21,7 +20,7 @@ interface Props extends DialogConfig, DialogProps {
...
@@ -21,7 +20,7 @@ interface Props extends DialogConfig, DialogProps {
}
}
const
BaseDialog
:
React
.
FC
<
Props
>
=
(
props
:
Props
)
=>
{
const
BaseDialog
:
React
.
FC
<
Props
>
=
(
props
:
Props
)
=>
{
const
{
children
,
className
,
c
ontainerClassName
,
c
lickSpaceDestroy
,
dialogName
,
destroy
}
=
props
;
const
{
children
,
className
,
clickSpaceDestroy
,
dialogName
,
destroy
}
=
props
;
const
dialogStore
=
useDialogStore
();
const
dialogStore
=
useDialogStore
();
const
dialogContainerRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
dialogContainerRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
dialogIndex
=
dialogStore
.
state
.
dialogStack
.
findIndex
((
item
)
=>
item
===
dialogName
);
const
dialogIndex
=
dialogStore
.
state
.
dialogStack
.
findIndex
((
item
)
=>
item
===
dialogName
);
...
@@ -58,7 +57,7 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
...
@@ -58,7 +57,7 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
return
(
return
(
<
div
className=
{
classNames
(
"dialog-wrapper"
,
className
)
}
onMouseDown=
{
handleSpaceClicked
}
>
<
div
className=
{
classNames
(
"dialog-wrapper"
,
className
)
}
onMouseDown=
{
handleSpaceClicked
}
>
<
div
ref=
{
dialogContainerRef
}
className=
{
classNames
(
"dialog-container"
,
containerClassName
)
}
onMouseDown=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
<
div
ref=
{
dialogContainerRef
}
className=
{
classNames
(
"dialog-container"
)
}
onMouseDown=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
{
children
}
{
children
}
</
div
>
</
div
>
</
div
>
</
div
>
...
...
web/src/components/HomeSidebar/HomeSidebar.tsx
View file @
6028838f
import
classNames
from
"classnames"
;
import
classNames
from
"classnames"
;
import
PersonalStatistics
from
"@/components/PersonalStatistics"
;
import
SearchBar
from
"@/components/SearchBar"
;
import
SearchBar
from
"@/components/SearchBar"
;
import
UserStatisticsView
from
"@/components/UserStatisticsView"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
TagsSection
from
"./TagsSection"
;
import
TagsSection
from
"./TagsSection"
;
...
@@ -19,7 +19,7 @@ const HomeSidebar = (props: Props) => {
...
@@ -19,7 +19,7 @@ const HomeSidebar = (props: Props) => {
)
}
)
}
>
>
<
SearchBar
/>
<
SearchBar
/>
<
PersonalStatistics
user=
{
currentUser
}
/>
<
UserStatisticsView
user=
{
currentUser
}
/>
<
TagsSection
/>
<
TagsSection
/>
</
aside
>
</
aside
>
);
);
...
...
web/src/components/MemoEditor/MemoEditorDialog.tsx
View file @
6028838f
...
@@ -55,7 +55,6 @@ export default function showMemoEditorDialog(props: Pick<Props, "memoName" | "ca
...
@@ -55,7 +55,6 @@ export default function showMemoEditorDialog(props: Pick<Props, "memoName" | "ca
{
{
className
:
"memo-editor-dialog"
,
className
:
"memo-editor-dialog"
,
dialogName
:
"memo-editor-dialog"
,
dialogName
:
"memo-editor-dialog"
,
containerClassName
:
"dark:!bg-zinc-800"
,
},
},
MemoEditorDialog
,
MemoEditorDialog
,
props
,
props
,
...
...
web/src/components/PreviewMarkdownDialog.tsx
View file @
6028838f
...
@@ -34,7 +34,6 @@ export default function showPreviewMarkdownDialog(content: string): void {
...
@@ -34,7 +34,6 @@ export default function showPreviewMarkdownDialog(content: string): void {
{
{
className
:
"preview-markdown-dialog"
,
className
:
"preview-markdown-dialog"
,
dialogName
:
"preview-markdown-dialog"
,
dialogName
:
"preview-markdown-dialog"
,
containerClassName
:
"dark:!bg-zinc-800"
,
},
},
PreviewMarkdownDialog
,
PreviewMarkdownDialog
,
{
{
...
...
web/src/components/
PersonalStatistics
.tsx
→
web/src/components/
UserStatisticsView
.tsx
View file @
6028838f
...
@@ -10,7 +10,7 @@ interface Props {
...
@@ -10,7 +10,7 @@ interface Props {
user
:
User
;
user
:
User
;
}
}
const
PersonalStatistics
=
(
props
:
Props
)
=>
{
const
UserStatisticsView
=
(
props
:
Props
)
=>
{
const
{
user
}
=
props
;
const
{
user
}
=
props
;
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
tagStore
=
useTagStore
();
const
tagStore
=
useTagStore
();
...
@@ -39,7 +39,9 @@ const PersonalStatistics = (props: Props) => {
...
@@ -39,7 +39,9 @@ const PersonalStatistics = (props: Props) => {
return
(
return
(
<
div
className=
"w-full border mt-2 py-2 px-3 rounded-md space-y-0.5 text-gray-500 dark:text-gray-400 bg-zinc-50 dark:bg-zinc-900 dark:border-zinc-800"
>
<
div
className=
"w-full border mt-2 py-2 px-3 rounded-md space-y-0.5 text-gray-500 dark:text-gray-400 bg-zinc-50 dark:bg-zinc-900 dark:border-zinc-800"
>
<
p
className=
"text-sm font-medium dark:text-gray-500"
>
{
t
(
"common.statistics"
)
}
</
p
>
<
div
className=
"mb-1 w-full flex flex-row justify-between items-center"
>
<
p
className=
"text-sm font-medium leading-6 dark:text-gray-500"
>
{
t
(
"common.statistics"
)
}
</
p
>
</
div
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
Icon
.
CalendarDays
className=
"w-4 h-auto mr-1"
/>
<
Icon
.
CalendarDays
className=
"w-4 h-auto mr-1"
/>
...
@@ -65,4 +67,4 @@ const PersonalStatistics = (props: Props) => {
...
@@ -65,4 +67,4 @@ const PersonalStatistics = (props: Props) => {
);
);
};
};
export
default
PersonalStatistics
;
export
default
UserStatisticsView
;
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