Rename UserCardContent to UserCard

This commit is contained in:
taehoon 2019-03-05 14:01:49 -05:00
parent baf603a506
commit 7bceabb5bd
14 changed files with 26 additions and 26 deletions

View file

@ -1,4 +1,4 @@
import UserCardContent from '../user_card_content/user_card_content.vue' import UserCard from '../user_card/user_card.vue'
import UserAvatar from '../user_avatar/user_avatar.vue' import UserAvatar from '../user_avatar/user_avatar.vue'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
@ -12,7 +12,7 @@ const BasicUserCard = {
} }
}, },
components: { components: {
UserCardContent, UserCard,
UserAvatar UserAvatar
}, },
methods: { methods: {

View file

@ -4,7 +4,7 @@
<UserAvatar class="avatar" @click.prevent.native="toggleUserExpanded" :src="user.profile_image_url"/> <UserAvatar class="avatar" @click.prevent.native="toggleUserExpanded" :src="user.profile_image_url"/>
</router-link> </router-link>
<div class="basic-user-card-expanded-content" v-if="userExpanded"> <div class="basic-user-card-expanded-content" v-if="userExpanded">
<UserCardContent :user="user" :rounded="true" :bordered="true"/> <UserCard :user="user" :rounded="true" :bordered="true"/>
</div> </div>
<div class="basic-user-card-collapsed-content" v-else> <div class="basic-user-card-collapsed-content" v-else>
<div :title="user.name" class="basic-user-card-user-name"> <div :title="user.name" class="basic-user-card-user-name">

View file

@ -1,6 +1,6 @@
import Status from '../status/status.vue' import Status from '../status/status.vue'
import UserAvatar from '../user_avatar/user_avatar.vue' import UserAvatar from '../user_avatar/user_avatar.vue'
import UserCardContent from '../user_card_content/user_card_content.vue' import UserCard from '../user_card/user_card.vue'
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js' import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
@ -13,7 +13,7 @@ const Notification = {
}, },
props: [ 'notification' ], props: [ 'notification' ],
components: { components: {
Status, UserAvatar, UserCardContent Status, UserAvatar, UserCard
}, },
methods: { methods: {
toggleUserExpanded () { toggleUserExpanded () {

View file

@ -5,7 +5,7 @@
<UserAvatar :compact="true" :betterShadow="betterShadow" :src="notification.action.user.profile_image_url_original"/> <UserAvatar :compact="true" :betterShadow="betterShadow" :src="notification.action.user.profile_image_url_original"/>
</a> </a>
<div class='notification-right'> <div class='notification-right'>
<UserCardContent :user="notification.action.user" :rounded="true" :bordered="true" v-if="userExpanded"/> <UserCard :user="notification.action.user" :rounded="true" :bordered="true" v-if="userExpanded"/>
<span class="notification-details"> <span class="notification-details">
<div class="name-and-action"> <div class="name-and-action">
<span class="username" v-if="!!notification.action.user.name_html" :title="'@'+notification.action.user.screen_name" v-html="notification.action.user.name_html"></span> <span class="username" v-if="!!notification.action.user.name_html" :title="'@'+notification.action.user.screen_name" v-html="notification.action.user.name_html"></span>

View file

@ -1,4 +1,4 @@
import UserCardContent from '../user_card_content/user_card_content.vue' import UserCard from '../user_card/user_card.vue'
import { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils' import { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils'
// TODO: separate touch gesture stuff into their own utils if more components want them // TODO: separate touch gesture stuff into their own utils if more components want them
@ -12,7 +12,7 @@ const SideDrawer = {
closed: true, closed: true,
touchCoord: [0, 0] touchCoord: [0, 0]
}), }),
components: { UserCardContent }, components: { UserCard },
computed: { computed: {
currentUser () { currentUser () {
return this.$store.state.users.currentUser return this.$store.state.users.currentUser

View file

@ -8,7 +8,7 @@
@touchmove="touchMove" @touchmove="touchMove"
> >
<div class="side-drawer-heading" @click="toggleDrawer"> <div class="side-drawer-heading" @click="toggleDrawer">
<UserCardContent :user="currentUser" :hideBio="true" v-if="currentUser"/> <UserCard :user="currentUser" :hideBio="true" v-if="currentUser"/>
<div class="side-drawer-logo-wrapper" v-else> <div class="side-drawer-logo-wrapper" v-else>
<img :src="logo"/> <img :src="logo"/>
<span>{{sitename}}</span> <span>{{sitename}}</span>

View file

@ -3,7 +3,7 @@ import FavoriteButton from '../favorite_button/favorite_button.vue'
import RetweetButton from '../retweet_button/retweet_button.vue' import RetweetButton from '../retweet_button/retweet_button.vue'
import DeleteButton from '../delete_button/delete_button.vue' import DeleteButton from '../delete_button/delete_button.vue'
import PostStatusForm from '../post_status_form/post_status_form.vue' import PostStatusForm from '../post_status_form/post_status_form.vue'
import UserCardContent from '../user_card_content/user_card_content.vue' import UserCard from '../user_card/user_card.vue'
import UserAvatar from '../user_avatar/user_avatar.vue' import UserAvatar from '../user_avatar/user_avatar.vue'
import Gallery from '../gallery/gallery.vue' import Gallery from '../gallery/gallery.vue'
import LinkPreview from '../link-preview/link-preview.vue' import LinkPreview from '../link-preview/link-preview.vue'
@ -259,7 +259,7 @@ const Status = {
RetweetButton, RetweetButton,
DeleteButton, DeleteButton,
PostStatusForm, PostStatusForm,
UserCardContent, UserCard,
UserAvatar, UserAvatar,
Gallery, Gallery,
LinkPreview LinkPreview

View file

@ -31,7 +31,7 @@
</router-link> </router-link>
</div> </div>
<div class="status-body"> <div class="status-body">
<UserCardContent :user="status.user" :rounded="true" :bordered="true" class="status-usercard-content" v-if="userExpanded"/> <UserCard :user="status.user" :rounded="true" :bordered="true" class="status-usercard-content" v-if="userExpanded"/>
<div v-if="!noHeading" class="media-heading"> <div v-if="!noHeading" class="media-heading">
<div class="heading-name-row"> <div class="heading-name-row">
<div class="name-and-account-name"> <div class="name-and-account-name">

View file

@ -18,9 +18,9 @@ export default {
computed: { computed: {
classes () { classes () {
return [{ return [{
'user-card-content-rt': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius 'user-card-rt': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius
'user-card-content-r': this.rounded === true, // set border-radius for all sides 'user-card-r': this.rounded === true, // set border-radius for all sides
'user-card-content-b': this.bordered === true // set border for all sides 'user-card-b': this.bordered === true // set border for all sides
}] }]
}, },
style () { style () {

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="user-card-content" :class="classes" :style="style"> <div class="user-card" :class="classes" :style="style">
<div class="panel-heading"> <div class="panel-heading">
<div class='user-info'> <div class='user-info'>
<div class='container'> <div class='container'>
@ -123,18 +123,18 @@
<span>{{user.followers_count}}</span> <span>{{user.followers_count}}</span>
</div> </div>
</div> </div>
<p @click.prevent="linkClicked" v-if="!hideBio && user.description_html" class="user-card-content-bio" v-html="user.description_html"></p> <p @click.prevent="linkClicked" v-if="!hideBio && user.description_html" class="user-card-bio" v-html="user.description_html"></p>
<p v-else-if="!hideBio" class="user-card-content-bio">{{ user.description }}</p> <p v-else-if="!hideBio" class="user-card-bio">{{ user.description }}</p>
</div> </div>
</div> </div>
</template> </template>
<script src="./user_card_content.js"></script> <script src="./user_card.js"></script>
<style lang="scss"> <style lang="scss">
@import '../../_variables.scss'; @import '../../_variables.scss';
.user-card-content { .user-card {
background-size: cover; background-size: cover;
overflow: hidden; overflow: hidden;

View file

@ -1,6 +1,6 @@
import LoginForm from '../login_form/login_form.vue' import LoginForm from '../login_form/login_form.vue'
import PostStatusForm from '../post_status_form/post_status_form.vue' import PostStatusForm from '../post_status_form/post_status_form.vue'
import UserCardContent from '../user_card_content/user_card_content.vue' import UserCard from '../user_card/user_card.vue'
const UserPanel = { const UserPanel = {
computed: { computed: {
@ -9,7 +9,7 @@ const UserPanel = {
components: { components: {
LoginForm, LoginForm,
PostStatusForm, PostStatusForm,
UserCardContent UserCard
} }
} }

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="user-panel"> <div class="user-panel">
<div v-if='user' class="panel panel-default" style="overflow: visible;"> <div v-if='user' class="panel panel-default" style="overflow: visible;">
<UserCardContent :user="user" :hideBio="true" rounded="top"/> <UserCard :user="user" :hideBio="true" rounded="top"/>
<div class="panel-footer"> <div class="panel-footer">
<post-status-form v-if='user'></post-status-form> <post-status-form v-if='user'></post-status-form>
</div> </div>

View file

@ -1,6 +1,6 @@
import { compose } from 'vue-compose' import { compose } from 'vue-compose'
import get from 'lodash/get' import get from 'lodash/get'
import UserCardContent from '../user_card_content/user_card_content.vue' import UserCard from '../user_card/user_card.vue'
import FollowCard from '../follow_card/follow_card.vue' import FollowCard from '../follow_card/follow_card.vue'
import Timeline from '../timeline/timeline.vue' import Timeline from '../timeline/timeline.vue'
import withLoadMore from '../../hocs/with_load_more/with_load_more' import withLoadMore from '../../hocs/with_load_more/with_load_more'
@ -147,7 +147,7 @@ const UserProfile = {
} }
}, },
components: { components: {
UserCardContent, UserCard,
Timeline, Timeline,
FollowerList, FollowerList,
FriendList FriendList

View file

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div v-if="user.id" class="user-profile panel panel-default"> <div v-if="user.id" class="user-profile panel panel-default">
<UserCardContent :user="user" :switcher="true" :selected="timeline.viewing" rounded="top"/> <UserCard :user="user" :switcher="true" :selected="timeline.viewing" rounded="top"/>
<tab-switcher :renderOnlyFocused="true" ref="tabSwitcher"> <tab-switcher :renderOnlyFocused="true" ref="tabSwitcher">
<Timeline <Timeline
:label="$t('user_card.statuses')" :label="$t('user_card.statuses')"