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: {
|
components: {
|
||||||
StickerPicker: defineAsyncComponent(() => import('../sticker_picker/sticker_picker.vue')),
|
StickerPicker: defineAsyncComponent(() =>
|
||||||
|
import('../sticker_picker/sticker_picker.vue')
|
||||||
|
),
|
||||||
Checkbox,
|
Checkbox,
|
||||||
EmojiGrid
|
EmojiGrid
|
||||||
},
|
},
|
||||||
|
@ -50,96 +52,19 @@ const EmojiPicker = {
|
||||||
: emoji.replacement
|
: emoji.replacement
|
||||||
this.$emit('emoji', { insertion: value, keepOpen: this.keepOpen })
|
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) {
|
||||||
=======
|
|
||||||
onWheel (e) {
|
|
||||||
>>>>>>> upstream/develop
|
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.$refs['emoji-tabs'].scrollBy(e.deltaY, 0)
|
this.$refs['emoji-tabs'].scrollBy(e.deltaY, 0)
|
||||||
},
|
},
|
||||||
highlight(key) {
|
highlight(key) {
|
||||||
this.setShowStickers(false)
|
this.setShowStickers(false)
|
||||||
this.activeGroup = key
|
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) {
|
if (this.keyword.length) {
|
||||||
this.$refs.emojiGrid.scrollToItem(key)
|
this.$refs.emojiGrid.scrollToItem(key)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onActiveGroup(group) {
|
onActiveGroup(group) {
|
||||||
this.activeGroup = group
|
this.activeGroup = group
|
||||||
>>>>>>> upstream/develop
|
|
||||||
},
|
},
|
||||||
toggleStickers() {
|
toggleStickers() {
|
||||||
this.showingStickers = !this.showingStickers
|
this.showingStickers = !this.showingStickers
|
||||||
|
@ -158,16 +83,6 @@ const EmojiPicker = {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
watch: {
|
|
||||||
keyword() {
|
|
||||||
this.customEmojiLoadAllConfirmed = false
|
|
||||||
this.onScroll()
|
|
||||||
this.startEmojiLoad(true)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
=======
|
|
||||||
>>>>>>> upstream/develop
|
|
||||||
computed: {
|
computed: {
|
||||||
activeGroupView() {
|
activeGroupView() {
|
||||||
return this.showingStickers ? '' : this.activeGroup
|
return this.showingStickers ? '' : this.activeGroup
|
||||||
|
@ -181,14 +96,7 @@ const EmojiPicker = {
|
||||||
filteredEmoji() {
|
filteredEmoji() {
|
||||||
return this.filterByKeyword(this.$store.state.instance.customEmoji || [])
|
return this.filterByKeyword(this.$store.state.instance.customEmoji || [])
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
customEmojiBuffer() {
|
|
||||||
return this.filteredEmoji.slice(0, this.customEmojiBufferSlice)
|
|
||||||
},
|
|
||||||
emojis() {
|
emojis() {
|
||||||
=======
|
|
||||||
emojis () {
|
|
||||||
>>>>>>> upstream/develop
|
|
||||||
const standardEmojis = this.$store.state.instance.emoji || []
|
const standardEmojis = this.$store.state.instance.emoji || []
|
||||||
const customEmojis = this.sortedEmoji
|
const customEmojis = this.sortedEmoji
|
||||||
const emojiPacks = []
|
const emojiPacks = []
|
||||||
|
|
|
@ -72,11 +72,6 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.reaction-emoji {
|
.reaction-emoji {
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
width: 2.55em !important;
|
|
||||||
height: 2.55em !important;
|
|
||||||
>>>>>>> upstream/develop
|
|
||||||
margin-right: 0.25em;
|
margin-right: 0.25em;
|
||||||
}
|
}
|
||||||
img.reaction-emoji {
|
img.reaction-emoji {
|
||||||
|
|
|
@ -9,16 +9,10 @@ import List from '../list/list.vue'
|
||||||
import withLoadMore from '../../hocs/with_load_more/with_load_more'
|
import withLoadMore from '../../hocs/with_load_more/with_load_more'
|
||||||
import { debounce } from 'lodash'
|
import { debounce } from 'lodash'
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import { faCircleNotch, faCircleCheck } from '@fortawesome/free-solid-svg-icons'
|
||||||
faCircleNotch,
|
|
||||||
faCircleCheck
|
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
|
||||||
import FollowedTagCard from '../followed_tag_card/FollowedTagCard.vue'
|
import FollowedTagCard from '../followed_tag_card/FollowedTagCard.vue'
|
||||||
|
|
||||||
library.add(
|
library.add(faCircleNotch, faCircleCheck)
|
||||||
faCircleNotch,
|
|
||||||
faCircleCheck
|
|
||||||
)
|
|
||||||
|
|
||||||
const FollowerList = withLoadMore({
|
const FollowerList = withLoadMore({
|
||||||
fetch: (props, $store) => $store.dispatch('fetchFollowers', props.userId),
|
fetch: (props, $store) => $store.dispatch('fetchFollowers', props.userId),
|
||||||
|
@ -44,13 +38,18 @@ const FriendList = withLoadMore({
|
||||||
|
|
||||||
const FollowedTagList = withLoadMore({
|
const FollowedTagList = withLoadMore({
|
||||||
fetch: (props, $store) => $store.dispatch('fetchFollowedTags', props.userId),
|
fetch: (props, $store) => $store.dispatch('fetchFollowedTags', props.userId),
|
||||||
select: (props, $store) => get($store.getters.findUser(props.userId), 'followedTagIds', []).map(id => $store.getters.findTag(id)),
|
select: (props, $store) =>
|
||||||
destroy: (props, $store) => $store.dispatch('clearFollowedTags', props.userId),
|
get($store.getters.findUser(props.userId), 'followedTagIds', []).map((id) =>
|
||||||
|
$store.getters.findTag(id)
|
||||||
|
),
|
||||||
|
destroy: (props, $store) =>
|
||||||
|
$store.dispatch('clearFollowedTags', props.userId),
|
||||||
childPropName: 'items',
|
childPropName: 'items',
|
||||||
additionalPropNames: ['userId']
|
additionalPropNames: ['userId']
|
||||||
})(List)
|
})(List)
|
||||||
|
|
||||||
const isUserPage = ({ name }) => name === 'user-profile' || name === 'external-user-profile'
|
const isUserPage = ({ name }) =>
|
||||||
|
name === 'user-profile' || name === 'external-user-profile'
|
||||||
|
|
||||||
const UserProfile = {
|
const UserProfile = {
|
||||||
data() {
|
data() {
|
||||||
|
@ -193,14 +192,10 @@ const UserProfile = {
|
||||||
this.tab = tab
|
this.tab = tab
|
||||||
this.$router.replace({ hash: `#${tab}` })
|
this.$router.replace({ hash: `#${tab}` })
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
linkClicked({ target }) {
|
|
||||||
=======
|
|
||||||
onFollowsTabSwitch(tab) {
|
onFollowsTabSwitch(tab) {
|
||||||
this.followsTab = tab
|
this.followsTab = tab
|
||||||
},
|
},
|
||||||
linkClicked({ target }) {
|
linkClicked({ target }) {
|
||||||
>>>>>>> upstream/develop
|
|
||||||
if (target.tagName === 'SPAN') {
|
if (target.tagName === 'SPAN') {
|
||||||
target = target.parentNode
|
target = target.parentNode
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,8 +121,8 @@
|
||||||
</FriendList>
|
</FriendList>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
key="tags"
|
|
||||||
v-if="isUs"
|
v-if="isUs"
|
||||||
|
key="tags"
|
||||||
:label="$t('user_card.followed_tags')"
|
:label="$t('user_card.followed_tags')"
|
||||||
>
|
>
|
||||||
<FollowedTagList
|
<FollowedTagList
|
||||||
|
|
Loading…
Reference in a new issue