Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Pleroma
pleroma-fe
Merge requests
!208
Who to follow panel
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Who to follow panel
hakabahitoyo/pleroma-fe:feature/who-to-follow-panel
into
develop
Overview
5
Commits
1
Pipelines
6
Changes
7
Closed
Hakaba Hitoyo
requested to merge
hakabahitoyo/pleroma-fe:feature/who-to-follow-panel
into
develop
7 years ago
Overview
5
Commits
1
Pipelines
6
Changes
3
Expand
Who to follow
panel which recommends the users with similar vocabulary.
Edited
7 years ago
by
Hakaba Hitoyo
1
0
Merge request reports
Compare
version 3
version 5
bd3ef9ac
7 years ago
version 4
f9c1e7e9
7 years ago
version 3
bceec02b
7 years ago
version 2
d29a49ee
7 years ago
version 1
05dc0eb1
7 years ago
develop (base)
and
version 4
latest version
b3257313
1 commit,
7 years ago
version 5
bd3ef9ac
5 commits,
7 years ago
version 4
f9c1e7e9
24 commits,
7 years ago
version 3
bceec02b
23 commits,
7 years ago
version 2
d29a49ee
21 commits,
7 years ago
version 1
05dc0eb1
20 commits,
7 years ago
Show latest version
3 files
+
61
−
13
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
src/components/post_status_form/post_status_form.js
+
47
−
4
Options
@@ -41,6 +41,7 @@ const PostStatusForm = {
submitDisabled
:
false
,
error
:
null
,
posting
:
false
,
highlighted
:
0
,
newStatus
:
{
status
:
statusText
,
files
:
[]
@@ -57,23 +58,26 @@ const PostStatusForm = {
return
false
}
// eslint-disable-next-line camelcase
return
map
(
take
(
matchedUsers
,
5
),
({
screen_name
,
name
,
profile_image_url_original
})
=>
({
return
map
(
take
(
matchedUsers
,
5
),
({
screen_name
,
name
,
profile_image_url_original
}
,
index
)
=>
({
// eslint-disable-next-line camelcase
screen_name
:
`@
${
screen_name
}
`
,
name
:
name
,
img
:
profile_image_url_original
img
:
profile_image_url_original
,
highlighted
:
index
===
this
.
highlighted
}))
}
else
if
(
firstchar
===
'
:
'
)
{
if
(
this
.
textAtCaret
===
'
:
'
)
{
return
}
const
matchedEmoji
=
filter
(
this
.
emoji
.
concat
(
this
.
customEmoji
),
(
emoji
)
=>
emoji
.
shortcode
.
match
(
this
.
textAtCaret
.
slice
(
1
)))
if
(
matchedEmoji
.
length
<=
0
)
{
return
false
}
return
map
(
take
(
matchedEmoji
,
5
),
({
shortcode
,
image_url
,
utf
})
=>
({
return
map
(
take
(
matchedEmoji
,
5
),
({
shortcode
,
image_url
,
utf
}
,
index
)
=>
({
// eslint-disable-next-line camelcase
screen_name
:
`:
${
shortcode
}
:`
,
name
:
''
,
utf
:
utf
||
''
,
img
:
image_url
img
:
image_url
,
highlighted
:
index
===
this
.
highlighted
}))
}
else
{
return
false
@@ -118,6 +122,45 @@ const PostStatusForm = {
el
.
focus
()
this
.
caret
=
0
},
replaceCandidate
(
e
)
{
const
len
=
this
.
candidates
.
length
||
0
if
(
this
.
textAtCaret
===
'
:
'
||
e
.
ctrlKey
)
{
return
}
if
(
len
>
0
)
{
e
.
preventDefault
()
const
candidate
=
this
.
candidates
[
this
.
highlighted
]
const
replacement
=
candidate
.
utf
||
(
candidate
.
screen_name
+
'
'
)
this
.
newStatus
.
status
=
Completion
.
replaceWord
(
this
.
newStatus
.
status
,
this
.
wordAtCaret
,
replacement
)
const
el
=
this
.
$el
.
querySelector
(
'
textarea
'
)
el
.
focus
()
this
.
caret
=
0
this
.
highlighted
=
0
}
},
cycleBackward
(
e
)
{
const
len
=
this
.
candidates
.
length
||
0
if
(
len
>
0
)
{
e
.
preventDefault
()
this
.
highlighted
-=
1
if
(
this
.
highlighted
<
0
)
{
this
.
highlighted
=
this
.
candidates
.
length
-
1
}
}
else
{
this
.
highlighted
=
0
}
},
cycleForward
(
e
)
{
const
len
=
this
.
candidates
.
length
||
0
if
(
len
>
0
)
{
if
(
e
.
shiftKey
)
{
return
}
e
.
preventDefault
()
this
.
highlighted
+=
1
if
(
this
.
highlighted
>=
len
)
{
this
.
highlighted
=
0
}
}
else
{
this
.
highlighted
=
0
}
},
setCaret
({
target
:
{
selectionStart
}})
{
this
.
caret
=
selectionStart
},
Loading