restyle the fields

This commit is contained in:
Shpuld Shpuldson 2020-06-17 18:26:06 +03:00
parent f8cf92a01f
commit 580fcd3ad9
2 changed files with 18 additions and 8 deletions

View file

@ -133,12 +133,14 @@
<script src="./user_profile.js"></script> <script src="./user_profile.js"></script>
<style lang="scss"> <style lang="scss">
@import '../../_variables.scss';
.user-profile { .user-profile {
flex: 2; flex: 2;
flex-basis: 500px; flex-basis: 500px;
.user-profile-fields { .user-profile-fields {
margin: 0 0.5em;
img { img {
object-fit: contain; object-fit: contain;
vertical-align: middle; vertical-align: middle;
@ -146,28 +148,28 @@
max-height: 400px; max-height: 400px;
&.emoji { &.emoji {
width: 18px; width: 24px;
height: 18px; height: 24px;
} }
} }
.user-profile-field { .user-profile-field {
display: flex; display: flex;
margin: 1em 1.5em; margin: 0.25em auto;
max-width: 32em;
.user-profile-field-name { .user-profile-field-name {
flex: 0 0 auto; flex: 0 1 30%;
font-weight: 500; font-weight: 500;
text-align: right; text-align: right;
color: var(--lightText); color: var(--lightText);
width: 30%;
min-width: 120px; min-width: 120px;
} }
.user-profile-field-value { .user-profile-field-value {
flex: 1 1 auto; flex: 1 1 auto;
color: var(--text); color: var(--text);
margin-left: 10px; margin: 0 0 0 0.25em;
} }
.user-profile-field-name, .user-profile-field-value { .user-profile-field-name, .user-profile-field-value {
@ -175,6 +177,14 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
padding: 0.5em 1.5em;
box-sizing: border-box;
border: var(--border, $fallback--border);
border-radius: $fallback--inputRadius;
border-radius: var(--inputRadius, $fallback--inputRadius);
border-style: solid;
border-width: 1px;
} }
} }
} }

View file

@ -58,8 +58,8 @@ export const parseUser = (data) => {
}) })
output.fields_text = data.fields.map(field => { output.fields_text = data.fields.map(field => {
return { return {
name: field.name.replace(/<[^>]*>/g, ''), name: unescape(field.name.replace(/<[^>]*>/g, '')),
value: field.value.replace(/<[^>]*>/g, '') value: unescape(field.value.replace(/<[^>]*>/g, ''))
} }
}) })