aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_profile/user_profile.vue
diff options
context:
space:
mode:
authorkPherox <admin@mail.kr-kp.com>2019-11-16 03:12:16 +0900
committerkPherox <admin@mail.kr-kp.com>2019-11-20 00:19:47 +0900
commitca4d5950d08aec6fe016b56f7125f7328c1e19a1 (patch)
treea9b0bdeadca46e5b77d22573f33fba4d474777cb /src/components/user_profile/user_profile.vue
parent0eda60eeb49f4fa460fe6f9f6196ddbb014427c7 (diff)
Display user profile fields
Diffstat (limited to 'src/components/user_profile/user_profile.vue')
-rw-r--r--src/components/user_profile/user_profile.vue50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index 14082e83..f979eff4 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -11,6 +11,44 @@
:allow-zooming-avatar="true"
rounded="top"
/>
+ <div
+ v-if="user.fields_html && user.fields_html.length > 0"
+ class="user-profile-fields"
+ >
+ <dl
+ v-for="(field, index) in user.fields_html"
+ :key="index"
+ >
+ <!-- eslint-disable vue/no-v-html -->
+ <dt
+ class="user-profile-field-name"
+ @click.prevent="linkClicked"
+ v-html="field.name"
+ />
+ <dd
+ class="user-profile-field-value"
+ @click.prevent="linkClicked"
+ v-html="field.value"
+ />
+ <!-- eslint-enable vue/no-v-html -->
+ </dl>
+ </div>
+ <div
+ v-else-if="user.fields && user.fields.length > 0"
+ class="user-card-fields"
+ >
+ <dl
+ v-for="(field, index) in user.fields"
+ :key="index"
+ >
+ <dt class="user-card-field-name">
+ {{ field.name }}
+ </dt>
+ <dd class="user-card-field-value">
+ {{ field.value }}
+ </dd>
+ </dl>
+ </div>
<tab-switcher
:active-tab="tab"
:render-only-focused="true"
@@ -113,6 +151,18 @@
flex: 2;
flex-basis: 500px;
+ .user-profile-fields {
+ dl {
+ margin: 1em 1.5em;
+
+ dt, dd {
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ }
+ }
+ }
+
.userlist-placeholder {
display: flex;
justify-content: center;