Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
336
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
23
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
b45bc3fd
Commit
b45bc3fd
authored
1 year ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
feat(frontend): in channel search
parent
5c08f2b9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
packages/frontend/src/pages/channel.vue
+33
-0
33 additions, 0 deletions
packages/frontend/src/pages/channel.vue
with
34 additions
and
0 deletions
CHANGELOG.md
+
1
−
0
View file @
b45bc3fd
...
...
@@ -34,6 +34,7 @@
-
Fix: フォローリクエストの通知が残る問題を修正
### Client
-
チャンネル内検索ができるように
-
チャンネル検索ですべてのチャンネルの取得/表示ができるように
-
通知の表示をカスタマイズできるように
-
ドライブのファイル一覧から直接ノートを作成できるように
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/src/pages/channel.vue
+
33
−
0
View file @
b45bc3fd
...
...
@@ -36,6 +36,17 @@
<div
v-else-if=
"tab === 'featured'"
>
<MkNotes
:pagination=
"featuredPagination"
/>
</div>
<div
v-else-if=
"tab === 'search'"
>
<div
class=
"_gaps"
>
<div>
<MkInput
v-model=
"searchQuery"
>
<
template
#prefix
><i
class=
"ti ti-search"
></i></
template
>
</MkInput>
<MkButton
primary
rounded
style=
"margin-top: 8px;"
@
click=
"search()"
>
{{ i18n.ts.search }}
</MkButton>
</div>
<MkNotes
v-if=
"searchPagination"
:key=
"searchQuery"
:pagination=
"searchPagination"
/>
</div>
</div>
</MkSpacer>
<
template
#footer
>
<div
:class=
"$style.footer"
>
...
...
@@ -63,6 +74,7 @@ import { deviceKind } from '@/scripts/device-kind';
import
MkNotes
from
'
@/components/MkNotes.vue
'
;
import
{
url
}
from
'
@/config
'
;
import
MkButton
from
'
@/components/MkButton.vue
'
;
import
MkInput
from
'
@/components/MkInput.vue
'
;
import
{
defaultStore
}
from
'
@/store
'
;
import
MkNote
from
'
@/components/MkNote.vue
'
;
import
MkFoldableSection
from
'
@/components/MkFoldableSection.vue
'
;
...
...
@@ -76,6 +88,8 @@ const props = defineProps<{
let
tab
=
$ref
(
'
timeline
'
);
let
channel
=
$ref
(
null
);
let
favorited
=
$ref
(
false
);
let
searchQuery
=
$ref
(
''
);
let
searchPagination
=
$ref
();
const
featuredPagination
=
$computed
(()
=>
({
endpoint
:
'
notes/featured
'
as
const
,
limit
:
10
,
...
...
@@ -123,6 +137,21 @@ async function unfavorite() {
});
}
async
function
search
()
{
const
query
=
searchQuery
.
toString
().
trim
();
if
(
query
==
null
)
return
;
searchPagination
=
{
endpoint
:
'
notes/search
'
,
limit
:
10
,
params
:
{
query
:
searchQuery
,
channelId
:
channel
.
id
,
},
};
}
const
headerActions
=
$computed
(()
=>
{
if
(
channel
&&
channel
.
userId
)
{
const
share
=
{
...
...
@@ -160,6 +189,10 @@ const headerTabs = $computed(() => [{
key
:
'
featured
'
,
title
:
i18n
.
ts
.
featured
,
icon
:
'
ti ti-bolt
'
,
},
{
key
:
'
search
'
,
title
:
i18n
.
ts
.
search
,
icon
:
'
ti ti-search
'
,
}]);
definePageMetadata
(
computed
(()
=>
channel
?
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment