Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
pleroma-fe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Your New SJW Waifu
pleroma-fe
Commits
0a778160
Commit
0a778160
authored
Jun 08, 2019
by
HJ
🐼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
styles
parent
8872b480
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
63 deletions
+78
-63
src/App.scss
src/App.scss
+0
-47
src/components/emoji-input/emoji-input.js
src/components/emoji-input/emoji-input.js
+2
-3
src/components/emoji-input/emoji-input.vue
src/components/emoji-input/emoji-input.vue
+76
-13
No files found.
src/App.scss
View file @
0a778160
...
...
@@ -806,50 +806,3 @@ nav {
.btn.btn-default
{
min-height
:
28px
;
}
.autocomplete
{
&
-panel
{
&
-body
{
margin
:
0
0
.5em
0
0
.5em
;
border-radius
:
$fallback--tooltipRadius
;
border-radius
:
var
(
--
tooltipRadius
,
$fallback--tooltipRadius
);
box-shadow
:
1px
2px
4px
rgba
(
0
,
0
,
0
,
0
.5
);
// this doesn't match original but i don't care, making it uniform.
box-shadow
:
var
(
--
popupShadow
);
min-width
:
75%
;
background
:
$fallback--bg
;
background
:
var
(
--
bg
,
$fallback--bg
);
color
:
$fallback--lightText
;
color
:
var
(
--
lightText
,
$fallback--lightText
);
}
}
&
-item
{
cursor
:
pointer
;
padding
:
0
.2em
0
.4em
0
.2em
0
.4em
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.4
);
display
:
flex
;
img
{
width
:
24px
;
height
:
24px
;
object-fit
:
contain
;
}
span
{
line-height
:
24px
;
margin
:
0
0
.1em
0
0
.2em
;
}
small
{
margin-left
:
.5em
;
color
:
$fallback--faint
;
color
:
var
(
--
faint
,
$fallback--faint
);
}
&
.highlighted
{
background-color
:
$fallback--fg
;
background-color
:
var
(
--
lightBg
,
$fallback--fg
);
}
}
}
src/components/emoji-input/emoji-input.js
View file @
0a778160
...
...
@@ -37,9 +37,8 @@ const EmojiInput = {
return
false
}
return
take
(
matchedSuggestions
,
5
)
.
map
(({
displayText
,
imageUrl
,
replacement
},
index
)
=>
({
displayText
,
replacement
,
.
map
(({
imageUrl
,
...
rest
},
index
)
=>
({
...
rest
,
// eslint-disable-next-line camelcase
img
:
imageUrl
||
''
,
highlighted
:
index
===
this
.
highlighted
...
...
src/components/emoji-input/emoji-input.vue
View file @
0a778160
<
template
>
<div
class=
"emoji-input"
>
<slot></slot>
<div
ref=
"panel"
class=
"autocomplete-panel"
:class=
"
{ hide:
suggestions
}">
<div
ref=
"panel"
class=
"autocomplete-panel"
:class=
"
{ hide:
!showPopup
}">
<div
class=
"autocomplete-panel-body"
>
<div
v-for=
"(suggestion, index) in suggestions"
...
...
@@ -10,13 +10,15 @@
class=
"autocomplete-item"
:class=
"
{ highlighted: suggestion.highlighted }"
>
<span
v-if=
"suggestion.img"
>
<img
:src=
"suggestion.img"
/>
<span
class=
"image"
>
<img
v-if=
"suggestion.img"
:src=
"suggestion.img"
/>
<span
v-else
>
{{
suggestion
.
replacement
}}
</span>
</span>
<
span
v-else
>
{{
suggestion
.
replacement
}}
</span
>
<span
>
{{
suggestion
.
displayText
}}
</span>
<span
>
{{
suggestion
.
detailText
}}
</span>
<
div
class=
"label"
>
<span
class=
"displayText"
>
{{
suggestion
.
displayText
}}
</span>
<span
class=
"detailText"
>
{{
suggestion
.
detailText
}}
</span>
</div>
</div>
</div>
</div>
</div>
...
...
@@ -31,16 +33,77 @@
display
:
flex
;
flex-direction
:
column
;
&
.hide
{
display
:
none
}
.autocomplete
{
&
-panel
{
position
:
absolute
;
z-index
:
9
;
margin-top
:
2px
;
&
.hide
{
display
:
none
}
&
-body
{
margin
:
0
0
.5em
0
0
.5em
;
border-radius
:
$fallback--tooltipRadius
;
border-radius
:
var
(
--
tooltipRadius
,
$fallback--tooltipRadius
);
box-shadow
:
1px
2px
4px
rgba
(
0
,
0
,
0
,
0
.5
);
box-shadow
:
var
(
--
popupShadow
);
min-width
:
75%
;
background
:
$fallback--bg
;
background
:
var
(
--
bg
,
$fallback--bg
);
color
:
$fallback--lightText
;
color
:
var
(
--
lightText
,
$fallback--lightText
);
}
}
&
-item
{
display
:
flex
;
cursor
:
pointer
;
padding
:
0
.2em
0
.4em
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.4
);
height
:
32px
;
.image
{
width
:
32px
;
height
:
32px
;
line-height
:
32px
;
text-align
:
center
;
font-size
:
32px
;
margin-right
:
4px
;
.autocomplete-panel
{
position
:
absolute
;
z-index
:
9
;
margin-top
:
2px
;
img
{
width
:
32px
;
height
:
32px
;
object-fit
:
contain
;
}
}
.label
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
margin
:
0
0
.1em
0
0
.2em
;
.displayText
{
line-height
:
1
.5
;
}
.detailText
{
font-size
:
9px
;
line-height
:
9px
;
}
}
&
.highlighted
{
background-color
:
$fallback--fg
;
background-color
:
var
(
--
lightBg
,
$fallback--fg
);
}
}
}
input
,
textarea
{
flex
:
1
;
}
...
...
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