2018-11-13 01:20:54 +01:00
|
|
|
{#if massagedFields.length}
|
2018-08-28 15:44:36 +02:00
|
|
|
<h2 class="sr-only">Fields</h2>
|
2018-08-24 03:58:25 +02:00
|
|
|
<div class="account-profile-meta">
|
|
|
|
<div class="account-profile-meta-border"></div>
|
2018-11-13 01:20:54 +01:00
|
|
|
{#each massagedFields as field, i}
|
2018-08-28 15:44:36 +02:00
|
|
|
<div
|
|
|
|
id="account-profile-meta-name-{i}"
|
|
|
|
class="account-profile-meta-cell account-profile-meta-name"
|
|
|
|
role="term"
|
|
|
|
>
|
2018-08-24 03:58:25 +02:00
|
|
|
{field.name}
|
|
|
|
</div>
|
2018-08-28 15:44:36 +02:00
|
|
|
<div
|
|
|
|
class="account-profile-meta-cell account-profile-meta-value"
|
|
|
|
role="definition"
|
|
|
|
aria-labelledby="account-profile-meta-name-{i}"
|
|
|
|
>
|
2018-08-24 03:58:25 +02:00
|
|
|
{@html field.value}
|
|
|
|
</div>
|
2018-11-13 01:20:54 +01:00
|
|
|
<div class="account-profile-meta-cell account-profile-meta-verified">
|
|
|
|
{#if field.verified}
|
|
|
|
<svg class="account-profile-meta-verified-svg">
|
|
|
|
<use xlink:href='#fa-check' />
|
|
|
|
</svg>
|
|
|
|
{/if}
|
|
|
|
</div>
|
2018-08-24 03:58:25 +02:00
|
|
|
{/each}
|
|
|
|
<div class="account-profile-meta-border"></div>
|
|
|
|
</div>
|
|
|
|
{/if}
|
2018-08-21 04:41:42 +02:00
|
|
|
<style>
|
|
|
|
.account-profile-meta {
|
2018-08-24 03:58:25 +02:00
|
|
|
grid-area: meta;
|
2018-08-21 04:41:42 +02:00
|
|
|
display: grid;
|
2018-11-17 21:24:09 +01:00
|
|
|
grid-template-columns: auto 1fr max-content;
|
2018-08-24 03:58:25 +02:00
|
|
|
grid-row-gap: 5px;
|
|
|
|
align-items: center;
|
2018-08-21 04:41:42 +02:00
|
|
|
padding: 10px 0;
|
|
|
|
}
|
|
|
|
|
2018-08-24 03:58:25 +02:00
|
|
|
.account-profile-meta-border {
|
|
|
|
height: 1px;
|
|
|
|
width: 100%;
|
2018-11-13 01:20:54 +01:00
|
|
|
grid-column: 1 / 4;
|
2018-08-24 03:58:25 +02:00
|
|
|
background: var(--main-border);
|
|
|
|
justify-self: center;
|
2018-08-21 04:41:42 +02:00
|
|
|
}
|
|
|
|
|
2018-08-24 03:58:25 +02:00
|
|
|
.account-profile-meta-cell {
|
|
|
|
word-wrap: break-word;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: pre-wrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
font-size: 1.1em;
|
2018-08-21 04:41:42 +02:00
|
|
|
}
|
|
|
|
|
2018-11-13 01:20:54 +01:00
|
|
|
.account-profile-meta-verified-svg {
|
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
fill: var(--svg-fill);
|
|
|
|
}
|
|
|
|
|
2018-08-24 03:58:25 +02:00
|
|
|
.account-profile-meta-name {
|
|
|
|
padding: 10px 20px 10px 0;
|
|
|
|
text-transform: uppercase;
|
|
|
|
color: var(--deemphasized-text-color);
|
2018-08-21 04:41:42 +02:00
|
|
|
position: relative;
|
2018-11-17 21:24:09 +01:00
|
|
|
max-width: 300px;
|
2018-08-21 04:41:42 +02:00
|
|
|
}
|
|
|
|
|
2018-08-24 03:58:25 +02:00
|
|
|
.account-profile-meta-name:after {
|
2018-08-21 04:41:42 +02:00
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
top: 15%;
|
|
|
|
height: 70%;
|
|
|
|
border-right: 1px solid var(--main-border);
|
|
|
|
}
|
|
|
|
|
2018-08-24 03:58:25 +02:00
|
|
|
.account-profile-meta-value {
|
|
|
|
padding: 10px 10px 10px 20px;
|
2018-08-21 04:41:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 767px) {
|
|
|
|
.account-profile-meta {
|
|
|
|
padding: 5px 0;
|
|
|
|
}
|
2018-08-24 03:58:25 +02:00
|
|
|
.account-profile-meta-cell {
|
|
|
|
font-size: 1em;
|
2018-08-21 04:41:42 +02:00
|
|
|
}
|
2018-08-24 03:58:25 +02:00
|
|
|
.account-profile-meta-name {
|
|
|
|
padding: 5px 10px 5px 0;
|
2018-11-17 21:24:09 +01:00
|
|
|
max-width: 40vw;
|
2018-08-21 04:41:42 +02:00
|
|
|
}
|
2018-08-24 03:58:25 +02:00
|
|
|
.account-profile-meta-value {
|
|
|
|
padding: 5px 10px 5px 10px;
|
2018-08-21 04:41:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
2018-08-24 03:58:25 +02:00
|
|
|
import { emojifyText } from '../../_utils/emojifyText'
|
|
|
|
import { store } from '../../_store/store'
|
|
|
|
|
2018-08-21 04:41:42 +02:00
|
|
|
export default {
|
2018-08-24 03:58:25 +02:00
|
|
|
store: () => store,
|
2018-08-21 04:41:42 +02:00
|
|
|
computed: {
|
2018-08-24 03:58:25 +02:00
|
|
|
emojis: ({ account }) => account.emojis || [],
|
|
|
|
fields: ({ account }) => account.fields || [],
|
2018-11-13 01:20:54 +01:00
|
|
|
massagedFields: ({ fields, emojis, $autoplayGifs }) => (fields.map(field => ({
|
2018-08-24 03:58:25 +02:00
|
|
|
name: field.name,
|
2018-11-13 01:20:54 +01:00
|
|
|
value: emojifyText(field.value, emojis, $autoplayGifs),
|
|
|
|
verified: !!field.verified_at
|
2018-08-24 03:58:25 +02:00
|
|
|
})))
|
2018-08-21 04:41:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|