forked from AkkomaGang/akkoma-fe
fix missed conflicts
This commit is contained in:
parent
d8fa8c4ee4
commit
5476a2794d
5 changed files with 18 additions and 120 deletions
|
@ -33,7 +33,9 @@ const EmojiPicker = {
|
|||
}
|
||||
},
|
||||
components: {
|
||||
StickerPicker: defineAsyncComponent(() => import('../sticker_picker/sticker_picker.vue')),
|
||||
StickerPicker: defineAsyncComponent(() =>
|
||||
import('../sticker_picker/sticker_picker.vue')
|
||||
),
|
||||
Checkbox,
|
||||
EmojiGrid
|
||||
},
|
||||
|
@ -50,96 +52,19 @@ const EmojiPicker = {
|
|||
: emoji.replacement
|
||||
this.$emit('emoji', { insertion: value, keepOpen: this.keepOpen })
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
onScroll(e) {
|
||||
const target = (e && e.target) || this.$refs['emoji-groups']
|
||||
this.updateScrolledClass(target)
|
||||
this.scrolledGroup(target)
|
||||
this.triggerLoadMore(target)
|
||||
},
|
||||
onWheel(e) {
|
||||
=======
|
||||
onWheel (e) {
|
||||
>>>>>>> upstream/develop
|
||||
e.preventDefault()
|
||||
this.$refs['emoji-tabs'].scrollBy(e.deltaY, 0)
|
||||
},
|
||||
highlight(key) {
|
||||
this.setShowStickers(false)
|
||||
this.activeGroup = key
|
||||
<<<<<<< HEAD
|
||||
},
|
||||
updateScrolledClass(target) {
|
||||
if (target.scrollTop <= 5) {
|
||||
this.groupsScrolledClass = 'scrolled-top'
|
||||
} else if (target.scrollTop >= target.scrollTopMax - 5) {
|
||||
this.groupsScrolledClass = 'scrolled-bottom'
|
||||
} else {
|
||||
this.groupsScrolledClass = 'scrolled-middle'
|
||||
}
|
||||
},
|
||||
triggerLoadMore(target) {
|
||||
const ref = this.$refs['group-end-custom']
|
||||
if (!ref) return
|
||||
const bottom = ref.offsetTop + ref.offsetHeight
|
||||
|
||||
const scrollerBottom = target.scrollTop + target.clientHeight
|
||||
const scrollerTop = target.scrollTop
|
||||
const scrollerMax = target.scrollHeight
|
||||
|
||||
// Loads more emoji when they come into view
|
||||
const approachingBottom = bottom - scrollerBottom < LOAD_EMOJI_MARGIN
|
||||
// Always load when at the very top in case there's no scroll space yet
|
||||
const atTop = scrollerTop < 5
|
||||
// Don't load when looking at unicode category or at the very bottom
|
||||
const bottomAboveViewport =
|
||||
bottom < scrollerTop || scrollerBottom === scrollerMax
|
||||
if (!bottomAboveViewport && (approachingBottom || atTop)) {
|
||||
this.loadEmoji()
|
||||
}
|
||||
},
|
||||
scrolledGroup(target) {
|
||||
const top = target.scrollTop + 5
|
||||
this.$nextTick(() => {
|
||||
this.emojisView.forEach((group) => {
|
||||
const ref = this.$refs['group-' + group.id]
|
||||
if (ref.offsetTop <= top) {
|
||||
this.activeGroup = group.id
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
loadEmoji() {
|
||||
const allLoaded =
|
||||
this.customEmojiBuffer.length === this.filteredEmoji.length
|
||||
|
||||
if (allLoaded) {
|
||||
return
|
||||
}
|
||||
|
||||
this.customEmojiBufferSlice += LOAD_EMOJI_BY
|
||||
},
|
||||
startEmojiLoad(forceUpdate = false) {
|
||||
if (!forceUpdate) {
|
||||
this.keyword = ''
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['emoji-groups'].scrollTop = 0
|
||||
})
|
||||
const bufferSize = this.customEmojiBuffer.length
|
||||
const bufferPrefilledAll = bufferSize === this.filteredEmoji.length
|
||||
if (bufferPrefilledAll && !forceUpdate) {
|
||||
return
|
||||
}
|
||||
this.customEmojiBufferSlice = LOAD_EMOJI_BY
|
||||
=======
|
||||
if (this.keyword.length) {
|
||||
this.$refs.emojiGrid.scrollToItem(key)
|
||||
}
|
||||
},
|
||||
onActiveGroup (group) {
|
||||
onActiveGroup(group) {
|
||||
this.activeGroup = group
|
||||
>>>>>>> upstream/develop
|
||||
},
|
||||
toggleStickers() {
|
||||
this.showingStickers = !this.showingStickers
|
||||
|
@ -158,16 +83,6 @@ const EmojiPicker = {
|
|||
})
|
||||
}
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
watch: {
|
||||
keyword() {
|
||||
this.customEmojiLoadAllConfirmed = false
|
||||
this.onScroll()
|
||||
this.startEmojiLoad(true)
|
||||
}
|
||||
},
|
||||
=======
|
||||
>>>>>>> upstream/develop
|
||||
computed: {
|
||||
activeGroupView() {
|
||||
return this.showingStickers ? '' : this.activeGroup
|
||||
|
@ -181,14 +96,7 @@ const EmojiPicker = {
|
|||
filteredEmoji() {
|
||||
return this.filterByKeyword(this.$store.state.instance.customEmoji || [])
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
customEmojiBuffer() {
|
||||
return this.filteredEmoji.slice(0, this.customEmojiBufferSlice)
|
||||
},
|
||||
emojis() {
|
||||
=======
|
||||
emojis () {
|
||||
>>>>>>> upstream/develop
|
||||
const standardEmojis = this.$store.state.instance.emoji || []
|
||||
const customEmojis = this.sortedEmoji
|
||||
const emojiPacks = []
|
||||
|
|
|
@ -72,11 +72,6 @@
|
|||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
.reaction-emoji {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
width: 2.55em !important;
|
||||
height: 2.55em !important;
|
||||
>>>>>>> upstream/develop
|
||||
margin-right: 0.25em;
|
||||
}
|
||||
img.reaction-emoji {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
<div class="panel-body">
|
||||
<FollowRequestList :user-id="userId">
|
||||
<template #item="{item}">
|
||||
<template #item="{ item }">
|
||||
<FollowRequestCard :user="item" />
|
||||
</template>
|
||||
</FollowRequestList>
|
||||
|
|
|
@ -9,16 +9,10 @@ import List from '../list/list.vue'
|
|||
import withLoadMore from '../../hocs/with_load_more/with_load_more'
|
||||
import { debounce } from 'lodash'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faCircleNotch,
|
||||
faCircleCheck
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { faCircleNotch, faCircleCheck } from '@fortawesome/free-solid-svg-icons'
|
||||
import FollowedTagCard from '../followed_tag_card/FollowedTagCard.vue'
|
||||
|
||||
library.add(
|
||||
faCircleNotch,
|
||||
faCircleCheck
|
||||
)
|
||||
library.add(faCircleNotch, faCircleCheck)
|
||||
|
||||
const FollowerList = withLoadMore({
|
||||
fetch: (props, $store) => $store.dispatch('fetchFollowers', props.userId),
|
||||
|
@ -44,13 +38,18 @@ const FriendList = withLoadMore({
|
|||
|
||||
const FollowedTagList = withLoadMore({
|
||||
fetch: (props, $store) => $store.dispatch('fetchFollowedTags', props.userId),
|
||||
select: (props, $store) => get($store.getters.findUser(props.userId), 'followedTagIds', []).map(id => $store.getters.findTag(id)),
|
||||
destroy: (props, $store) => $store.dispatch('clearFollowedTags', props.userId),
|
||||
select: (props, $store) =>
|
||||
get($store.getters.findUser(props.userId), 'followedTagIds', []).map((id) =>
|
||||
$store.getters.findTag(id)
|
||||
),
|
||||
destroy: (props, $store) =>
|
||||
$store.dispatch('clearFollowedTags', props.userId),
|
||||
childPropName: 'items',
|
||||
additionalPropNames: ['userId']
|
||||
})(List)
|
||||
|
||||
const isUserPage = ({ name }) => name === 'user-profile' || name === 'external-user-profile'
|
||||
const isUserPage = ({ name }) =>
|
||||
name === 'user-profile' || name === 'external-user-profile'
|
||||
|
||||
const UserProfile = {
|
||||
data() {
|
||||
|
@ -193,14 +192,10 @@ const UserProfile = {
|
|||
this.tab = tab
|
||||
this.$router.replace({ hash: `#${tab}` })
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
linkClicked({ target }) {
|
||||
=======
|
||||
onFollowsTabSwitch (tab) {
|
||||
onFollowsTabSwitch(tab) {
|
||||
this.followsTab = tab
|
||||
},
|
||||
linkClicked ({ target }) {
|
||||
>>>>>>> upstream/develop
|
||||
linkClicked({ target }) {
|
||||
if (target.tagName === 'SPAN') {
|
||||
target = target.parentNode
|
||||
}
|
||||
|
|
|
@ -121,8 +121,8 @@
|
|||
</FriendList>
|
||||
</div>
|
||||
<div
|
||||
key="tags"
|
||||
v-if="isUs"
|
||||
key="tags"
|
||||
:label="$t('user_card.followed_tags')"
|
||||
>
|
||||
<FollowedTagList
|
||||
|
|
Loading…
Reference in a new issue