Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85824821
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
6 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/emoji_input/emoji_input.vue b/src/components/emoji_input/emoji_input.vue
index b72e389dc8..8e8f239953 100644
--- a/src/components/emoji_input/emoji_input.vue
+++ b/src/components/emoji_input/emoji_input.vue
@@ -1,242 +1,243 @@
<template>
<div
ref="root"
class="input emoji-input"
:class="{ '-with-picker': !hideEmojiButton, '-textarea': input?.tagName === 'TEXTAREA' }"
>
<slot
:id="'textbox-' + uniqueId"
:aria-owns="ariaOwns"
aria-autocomplete="list"
:aria-activedescendant="(!showSuggestions || highlighted === -1) ? undefined : suggestionItemId(highlighted)"
aria-haspopup="menu"
/>
<!-- TODO: make the 'x' disappear if at the end maybe? -->
<div
ref="hiddenOverlay"
class="hidden-overlay"
:style="overlayStyle"
:aria-hidden="true"
>
<span>{{ preText }}</span>
<span
ref="hiddenOverlayCaret"
class="caret"
>
x
<Popover
ref="suggest"
class="autocomplete-panel"
:aria-label="$t('general.suggestions')"
placement="bottom"
hide-trigger
@show="onSuggestShown"
@close="onSuggestClosed"
@forward-tab-content-focus="focusInput"
@reverse-tab-content-focus="focusInput"
>
<template #content>
<div
:id="suggestionListId"
ref="panel-body"
class="autocomplete-panel-body"
+ role="listbox"
>
<div
v-for="(suggestion, index) in suggestions"
:id="suggestionItemId(index)"
:key="index"
class="menu-item autocomplete-item"
- role="radio"
+ role="option"
:class="{ '-active': index === highlighted }"
:aria-label="autoCompleteItemLabel(suggestion)"
- :aria-checked="index === highlighted"
+ :aria-selected="index === highlighted"
@click.stop.prevent="onClick($event, suggestion)"
>
<span class="image">
<img
v-if="suggestion.img"
:src="suggestion.img"
:alt="suggestion.user ? $t('user_card.avatar') : $t('emoji.emoji')"
:title="suggestion.user ? $t('user_card.avatar') : $t('emoji.emoji')"
>
<span v-else>{{ suggestion.replacement }}</span>
</span>
<div class="label">
<span
v-if="suggestion.user"
class="displayText"
>
{{ suggestion.displayText }}<UnicodeDomainIndicator
:user="suggestion.user"
:at="false"
/>
</span>
<span
v-if="!suggestion.user"
class="displayText"
>
{{ maybeLocalizedEmojiName(suggestion) }}
</span>
<span class="detailText">{{ suggestion.detailText }}</span>
</div>
</div>
</div>
</template>
</Popover>
<EmojiPicker
v-if="enableEmojiPicker"
:id="emojiPickerId"
ref="picker"
:enable-sticker-picker="enableStickerPicker"
class="emoji-picker-panel"
hide-trigger
@emoji="insert"
@sticker-uploaded="onStickerUploaded"
@sticker-upload-failed="onStickerUploadFailed"
@show="onPickerShown"
@close="onPickerClosed"
@forward-tab-content-focus="focusInput"
@reverse-tab-content-focus="focusInput"
/>
</span>
<span>{{ postText }}</span>
</div>
<screen-reader-notice
ref="screenReaderNotice"
aria-live="assertive"
/>
<template v-if="enableEmojiPicker">
<button
v-if="!hideEmojiButton"
class="button-unstyled emoji-picker-icon"
type="button"
:title="$t('emoji.add_emoji')"
@click.prevent="togglePicker"
>
<FAIcon :icon="['far', 'face-smile-beam']" />
</button>
</template>
</div>
</template>
<script src="./emoji_input.js"></script>
<style lang="scss">
.input.emoji-input {
padding: 0;
display: flex;
flex-direction: column;
position: relative;
.emoji-picker-icon {
position: absolute;
bottom: 0;
right: 0;
height: 100%;
padding: 0 0.2em;
font-size: 1.3em;
cursor: pointer;
line-height: 1.2em;
&:hover i {
color: var(--text);
}
}
&.-textarea {
.emoji-picker-icon {
height: auto;
padding: 0.2em;
}
}
input,
textarea {
flex: 1 0 auto;
color: inherit;
/* stylelint-disable-next-line declaration-no-important */
background: none !important;
box-shadow: none;
border: none;
outline: none;
}
&.-with-picker {
textarea,
input {
padding-right: 2.4em;
}
}
.hidden-overlay {
opacity: 0;
pointer-events: none;
position: absolute;
inset: 0;
overflow: hidden;
/* DEBUG STUFF */
color: red;
/* set opacity to non-zero to see the overlay */
.caret {
width: 0;
margin-right: calc(-1ch - 1px);
border: 1px solid red;
.popover-trigger-button {
height: 100%;
position: absolute;
}
}
}
}
.autocomplete {
&-panel {
position: absolute;
}
&-item.menu-item {
display: flex;
padding-top: 0;
padding-bottom: 0;
.image {
width: calc(var(--__line-height) + var(--__vertical-gap) * 2);
height: calc(var(--__line-height) + var(--__vertical-gap) * 2);
line-height: var(--__line-height);
text-align: center;
margin-right: var(--__horizontal-gap);
img {
width: calc(var(--__line-height) + var(--__vertical-gap) * 2);
height: calc(var(--__line-height) + var(--__vertical-gap) * 2);
object-fit: contain;
}
span {
font-size: var(--__line-height);
line-height: var(--__line-height);
}
}
.label {
display: flex;
flex-direction: column;
justify-content: center;
margin: 0 0.1em 0 0.2em;
.displayText {
line-height: 1.5;
}
.detailText {
font-size: 0.6em;
line-height: 0.6em;
}
}
}
}
</style>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Oct 29, 7:14 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1796519
Default Alt Text
(6 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline