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
92a44e26
Commit
92a44e26
authored
Mar 04, 2025
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove emoji regex
parent
6ed6b86a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
12 deletions
+2
-12
package.json
web/package.json
+0
-1
pnpm-lock.yaml
web/pnpm-lock.yaml
+0
-8
ShortcutsSection.tsx
web/src/components/HomeSidebar/ShortcutsSection.tsx
+2
-3
No files found.
web/package.json
View file @
92a44e26
...
...
@@ -22,7 +22,6 @@
"clsx"
:
"^2.1.1"
,
"copy-to-clipboard"
:
"^3.3.3"
,
"dayjs"
:
"^1.11.13"
,
"emoji-regex"
:
"^10.4.0"
,
"fuse.js"
:
"^7.1.0"
,
"highlight.js"
:
"^11.11.1"
,
"i18next"
:
"^24.2.2"
,
...
...
web/pnpm-lock.yaml
View file @
92a44e26
...
...
@@ -47,9 +47,6 @@ importers:
dayjs
:
specifier
:
^1.11.13
version
:
1.11.13
emoji-regex
:
specifier
:
^10.4.0
version
:
10.4.0
fuse.js
:
specifier
:
^7.1.0
version
:
7.1.0
...
...
@@ -1955,9 +1952,6 @@ packages:
electron-to-chromium@1.5.109
:
resolution
:
{
integrity
:
sha512-AidaH9JETVRr9DIPGfp1kAarm/W6hRJTPuCnkF+2MqhF4KaAgRIcBc8nvjk+YMXZhwfISof/7WG29eS4iGxQLQ==
}
emoji-regex@10.4.0
:
resolution
:
{
integrity
:
sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==
}
emoji-regex@8.0.0
:
resolution
:
{
integrity
:
sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
}
...
...
@@ -5411,8 +5405,6 @@ snapshots:
electron-to-chromium@1.5.109
:
{}
emoji-regex@10.4.0
:
{}
emoji-regex@8.0.0
:
{}
emoji-regex@9.2.2
:
{}
...
...
web/src/components/HomeSidebar/ShortcutsSection.tsx
View file @
92a44e26
import
{
Dropdown
,
Menu
,
MenuButton
,
MenuItem
,
Tooltip
}
from
"@mui/joy"
;
import
EmojiRegex
from
"emoji-regex"
;
import
{
Edit3Icon
,
MoreVerticalIcon
,
TrashIcon
,
PlusIcon
}
from
"lucide-react"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
userServiceClient
}
from
"@/grpcweb"
;
...
...
@@ -12,7 +11,7 @@ import { cn } from "@/utils";
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
showCreateShortcutDialog
from
"../CreateShortcutDialog"
;
const
emojiRegex
=
EmojiRegex
()
;
const
emojiRegex
=
/^
(\p
{Emoji_Presentation}|
\p
{Emoji}
\u
FE0F
)
$/
u
;
const
ShortcutsSection
=
observer
(()
=>
{
const
t
=
useTranslate
();
...
...
@@ -42,10 +41,10 @@ const ShortcutsSection = observer(() => {
</
div
>
<
div
className=
"w-full flex flex-row justify-start items-center relative flex-wrap gap-x-2 gap-y-1"
>
{
shortcuts
.
map
((
shortcut
)
=>
{
const
selected
=
memoFilterStore
.
shortcut
===
shortcut
.
id
;
const
maybeEmoji
=
shortcut
.
title
.
split
(
" "
)[
0
];
const
emoji
=
emojiRegex
.
test
(
maybeEmoji
)
?
maybeEmoji
:
undefined
;
const
title
=
emoji
?
shortcut
.
title
.
replace
(
emoji
,
""
)
:
shortcut
.
title
;
const
selected
=
memoFilterStore
.
shortcut
===
shortcut
.
id
;
return
(
<
div
key=
{
shortcut
.
id
}
...
...
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