mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Rename props and classes in 'ProfileList'
This commit is contained in:
parent
b7be7018e8
commit
9e544b0e64
@ -3,10 +3,10 @@
|
|||||||
:uniqueName="`${type}Filter`"
|
:uniqueName="`${type}Filter`"
|
||||||
:title="$filters.truncate(userName, 15) + ' ' + $t(`profile.network.${type}`)"
|
:title="$filters.truncate(userName, 15) + ' ' + $t(`profile.network.${type}`)"
|
||||||
:titleNobody="$filters.truncate(userName, 15) + ' ' + $t(`profile.network.${type}Nobody`)"
|
:titleNobody="$filters.truncate(userName, 15) + ' ' + $t(`profile.network.${type}Nobody`)"
|
||||||
:allConnectionsCount="allConnectionsCount"
|
:allProfilesCount="allConnectionsCount"
|
||||||
:connections="connections"
|
:profiles="connections"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@fetchAllConnections="$emit('fetchAllConnections', type)"
|
@fetchAllProfiles="$emit('fetchAllConnections', type)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<base-card class="follow-list">
|
<base-card class="profile-list">
|
||||||
<template v-if="connections && connections.length">
|
<template v-if="profiles && profiles.length">
|
||||||
<h5 class="title spacer-x-small">
|
<h5 class="title spacer-x-small">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h5>
|
</h5>
|
||||||
@ -18,11 +18,11 @@
|
|||||||
:loading="loading"
|
:loading="loading"
|
||||||
class="spacer-x-small"
|
class="spacer-x-small"
|
||||||
size="small"
|
size="small"
|
||||||
@click="$emit('fetchAllConnections')"
|
@click="$emit('fetchAllProfiles')"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
$t('profile.network.andMore', {
|
$t('profile.network.andMore', {
|
||||||
number: allConnectionsCount - connections.length,
|
number: allProfilesCount - profiles.length,
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
</base-button>
|
</base-button>
|
||||||
@ -53,8 +53,8 @@ export default {
|
|||||||
uniqueName: { type: String, required: true },
|
uniqueName: { type: String, required: true },
|
||||||
title: { type: String, required: true },
|
title: { type: String, required: true },
|
||||||
titleNobody: { type: String, required: true },
|
titleNobody: { type: String, required: true },
|
||||||
allConnectionsCount: { type: Number, required: true },
|
allProfilesCount: { type: Number, required: true },
|
||||||
connections: { type: Array, required: true },
|
profiles: { type: Array, required: true },
|
||||||
type: { type: String, default: 'following' },
|
type: { type: String, default: 'following' },
|
||||||
loading: { type: Boolean, default: false },
|
loading: { type: Boolean, default: false },
|
||||||
},
|
},
|
||||||
@ -65,14 +65,14 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
hasMore() {
|
hasMore() {
|
||||||
return this.allConnectionsCount > this.connections.length
|
return this.allProfilesCount > this.profiles.length
|
||||||
},
|
},
|
||||||
connectionsClass() {
|
connectionsClass() {
|
||||||
return `connections${this.hasMore ? '' : ' --overflow'}`
|
return `profiles${this.hasMore ? '' : ' --overflow'}`
|
||||||
},
|
},
|
||||||
filteredConnections() {
|
filteredConnections() {
|
||||||
if (!this.filter) {
|
if (!this.filter) {
|
||||||
return this.connections
|
return this.profiles
|
||||||
}
|
}
|
||||||
|
|
||||||
// @example
|
// @example
|
||||||
@ -83,7 +83,7 @@ export default {
|
|||||||
'i',
|
'i',
|
||||||
)
|
)
|
||||||
|
|
||||||
const fuzzyScores = this.connections
|
const fuzzyScores = this.profiles
|
||||||
.map((user) => {
|
.map((user) => {
|
||||||
const match = user.name.match(fuzzyExpression)
|
const match = user.name.match(fuzzyExpression)
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.follow-list {
|
.profile-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -127,7 +127,7 @@ export default {
|
|||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connections {
|
.profiles {
|
||||||
height: $size-height-connections;
|
height: $size-height-connections;
|
||||||
padding: $space-none;
|
padding: $space-none;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user