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
d1bafd66
Unverified
Commit
d1bafd66
authored
Mar 07, 2023
by
Zeng1998
Committed by
GitHub
Mar 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: allow to filter memos with resources (#1299)
parent
daa1e9ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
filter.ts
web/src/helpers/filter.ts
+6
-0
en.json
web/src/locales/en.json
+2
-1
zh.json
web/src/locales/zh.json
+2
-1
No files found.
web/src/helpers/filter.ts
View file @
d1bafd66
...
@@ -43,6 +43,10 @@ export const filterConsts = {
...
@@ -43,6 +43,10 @@ export const filterConsts = {
text
:
"filter.value.linked"
,
text
:
"filter.value.linked"
,
value
:
"LINKED"
,
value
:
"LINKED"
,
},
},
{
text
:
"filter.value.has-attachment"
,
value
:
"HAS_ATTACHMENT"
,
},
],
],
},
},
TEXT
:
{
TEXT
:
{
...
@@ -179,6 +183,8 @@ export const checkShouldShowMemo = (memo: Memo, filter: Filter) => {
...
@@ -179,6 +183,8 @@ export const checkShouldShowMemo = (memo: Memo, filter: Filter) => {
matched
=
true
;
matched
=
true
;
}
else
if
(
value
===
"LINKED"
&&
memo
.
content
.
match
(
LINK_REG
)
!==
null
)
{
}
else
if
(
value
===
"LINKED"
&&
memo
.
content
.
match
(
LINK_REG
)
!==
null
)
{
matched
=
true
;
matched
=
true
;
}
else
if
(
value
===
"HAS_ATTACHMENT"
&&
memo
.
resourceList
.
length
>
0
)
{
matched
=
true
;
}
}
if
(
operator
===
"IS_NOT"
)
{
if
(
operator
===
"IS_NOT"
)
{
matched
=
!
matched
;
matched
=
!
matched
;
...
...
web/src/locales/en.json
View file @
d1bafd66
...
@@ -136,7 +136,8 @@
...
@@ -136,7 +136,8 @@
},
},
"value"
:
{
"value"
:
{
"not-tagged"
:
"No tags"
,
"not-tagged"
:
"No tags"
,
"linked"
:
"Has links"
"linked"
:
"Has links"
,
"has-attachment"
:
"Has attachments"
},
},
"text-placeholder"
:
"Starts with ^ to use regex"
"text-placeholder"
:
"Starts with ^ to use regex"
},
},
...
...
web/src/locales/zh.json
View file @
d1bafd66
...
@@ -136,7 +136,8 @@
...
@@ -136,7 +136,8 @@
},
},
"value"
:
{
"value"
:
{
"not-tagged"
:
"无标签"
,
"not-tagged"
:
"无标签"
,
"linked"
:
"包含链接"
"linked"
:
"包含链接"
,
"has-attachment"
:
"包含附件"
},
},
"text-placeholder"
:
"以 ^ 开头使用正则表达式"
"text-placeholder"
:
"以 ^ 开头使用正则表达式"
},
},
...
...
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