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
9593b0b0
Commit
9593b0b0
authored
Jan 04, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix link rel field
parent
ca536304
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
22 deletions
+10
-22
AutoLink.tsx
web/src/components/MemoContent/AutoLink.tsx
+0
-17
Link.tsx
web/src/components/MemoContent/Link.tsx
+3
-2
Renderer.tsx
web/src/components/MemoContent/Renderer.tsx
+1
-2
UserProfile.tsx
web/src/pages/UserProfile.tsx
+6
-1
No files found.
web/src/components/MemoContent/AutoLink.tsx
deleted
100644 → 0
View file @
ca536304
interface
Props
{
url
:
string
;
}
const
AutoLink
:
React
.
FC
<
Props
>
=
({
url
}:
Props
)
=>
{
return
(
<
a
className=
"text-blue-600 dark:text-blue-400 cursor-pointer underline break-all hover:opacity-80 decoration-1"
href=
{
url
}
target=
"_blank"
>
{
url
}
</
a
>
);
};
export
default
AutoLink
;
web/src/components/MemoContent/Link.tsx
View file @
9593b0b0
interface
Props
{
interface
Props
{
text
:
string
;
url
:
string
;
url
:
string
;
text
?:
string
;
}
}
const
Link
:
React
.
FC
<
Props
>
=
({
text
,
url
}:
Props
)
=>
{
const
Link
:
React
.
FC
<
Props
>
=
({
text
,
url
}:
Props
)
=>
{
...
@@ -9,8 +9,9 @@ const Link: React.FC<Props> = ({ text, url }: Props) => {
...
@@ -9,8 +9,9 @@ const Link: React.FC<Props> = ({ text, url }: Props) => {
className=
"text-blue-600 dark:text-blue-400 cursor-pointer underline break-all hover:opacity-80 decoration-1"
className=
"text-blue-600 dark:text-blue-400 cursor-pointer underline break-all hover:opacity-80 decoration-1"
href=
{
url
}
href=
{
url
}
target=
"_blank"
target=
"_blank"
rel=
"noopener noreferrer"
>
>
{
text
}
{
text
||
url
}
</
a
>
</
a
>
);
);
};
};
...
...
web/src/components/MemoContent/Renderer.tsx
View file @
9593b0b0
...
@@ -22,7 +22,6 @@ import {
...
@@ -22,7 +22,6 @@ import {
TextNode
,
TextNode
,
UnorderedListNode
,
UnorderedListNode
,
}
from
"@/types/proto/api/v2/markdown_service"
;
}
from
"@/types/proto/api/v2/markdown_service"
;
import
AutoLink
from
"./AutoLink"
;
import
Blockquote
from
"./Blockquote"
;
import
Blockquote
from
"./Blockquote"
;
import
Bold
from
"./Bold"
;
import
Bold
from
"./Bold"
;
import
BoldItalic
from
"./BoldItalic"
;
import
BoldItalic
from
"./BoldItalic"
;
...
@@ -85,7 +84,7 @@ const Renderer: React.FC<Props> = ({ node }: Props) => {
...
@@ -85,7 +84,7 @@ const Renderer: React.FC<Props> = ({ node }: Props) => {
case
NodeType
.
LINK
:
case
NodeType
.
LINK
:
return
<
Link
{
...
(
node
.
linkNode
as
LinkNode
)}
/>;
return
<
Link
{
...
(
node
.
linkNode
as
LinkNode
)}
/>;
case
NodeType
.
AUTO_LINK
:
case
NodeType
.
AUTO_LINK
:
return
<
Auto
Link
{
...
(
node
.
autoLinkNode
as
AutoLinkNode
)}
/>;
return
<
Link
{
...
(
node
.
autoLinkNode
as
AutoLinkNode
)}
/>;
case
NodeType
.
TAG
:
case
NodeType
.
TAG
:
return
<
Tag
{
...
(
node
.
tagNode
as
TagNode
)}
/>;
return
<
Tag
{
...
(
node
.
tagNode
as
TagNode
)}
/>;
case
NodeType
.
STRIKETHROUGH
:
case
NodeType
.
STRIKETHROUGH
:
...
...
web/src/pages/UserProfile.tsx
View file @
9593b0b0
...
@@ -95,7 +95,12 @@ const UserProfile = () => {
...
@@ -95,7 +95,12 @@ const UserProfile = () => {
<
UserAvatar
className=
"!w-20 !h-20 mb-2 drop-shadow"
avatarUrl=
{
user
?.
avatarUrl
}
/>
<
UserAvatar
className=
"!w-20 !h-20 mb-2 drop-shadow"
avatarUrl=
{
user
?.
avatarUrl
}
/>
<
div
className=
"w-full flex flex-row justify-center items-center"
>
<
div
className=
"w-full flex flex-row justify-center items-center"
>
<
p
className=
"text-3xl text-black leading-none opacity-80 dark:text-gray-200"
>
{
user
?.
nickname
}
</
p
>
<
p
className=
"text-3xl text-black leading-none opacity-80 dark:text-gray-200"
>
{
user
?.
nickname
}
</
p
>
<
a
className=
"ml-1 cursor-pointer text-gray-500"
href=
{
`/u/${user?.id}/rss.xml`
}
target=
"_blank"
>
<
a
className=
"ml-1 cursor-pointer text-gray-500"
href=
{
`/u/${user?.id}/rss.xml`
}
target=
"_blank"
rel=
"noopener noreferrer"
>
<
Icon
.
Rss
className=
"w-5 h-auto opacity-60 mt-0.5"
/>
<
Icon
.
Rss
className=
"w-5 h-auto opacity-60 mt-0.5"
/>
</
a
>
</
a
>
</
div
>
</
div
>
...
...
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