diff --git a/changelog.d/user_profile_redesign.change b/changelog.d/user_profile_redesign.change new file mode 100644 index 000000000..27fc5f890 --- /dev/null +++ b/changelog.d/user_profile_redesign.change @@ -0,0 +1 @@ +User card/profile got an overhaul diff --git a/src/App.scss b/src/App.scss index 59995664c..64c8b8b82 100644 --- a/src/App.scss +++ b/src/App.scss @@ -525,6 +525,10 @@ textarea { height: unset; } + &::placeholder { + color: var(--textFaint) + } + --_padding: 0.5em; border: none; diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index f3cca45d0..cc00a735d 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -3,7 +3,6 @@ -
- - -
-
- -
+ + + @@ -279,57 +239,148 @@ > -
+
-
{{ $t('user_card.highlight_header') }} + + + +
+
+ + +
+ +
-
{{ $t('user_card.statuses') }}
- {{ user.statuses_count }}
-
-
{{ user.statuses_count }} + {{ ' ' }} +
{{ $t('user_card.statuses') }}
+ +
+
{{ dailyAvg }}
+ {{ ' ' }} +
{{ $t('user_card.statuses_per_day') }}
+
+
-
{{ $t('user_card.followees') }}
- {{ hideFollowsCount ? $t('user_card.hidden') : user.friends_count }} -
-
{{ hideFollowsCount ? $t('user_card.hidden') : user.friends_count }} + {{ ' ' }} +
{{ $t('user_card.followees') }}
+ +
-
{{ $t('user_card.followers') }}
- {{ hideFollowersCount ? $t('user_card.hidden') : user.followers_count }} -
+
{{ hideFollowersCount ? $t('user_card.hidden') : user.followers_count }}
+ {{ ' ' }} +
{{ $t('user_card.followers') }}
+ + +
+ + {{ $t('user_card.birthday', { birthday: formattedBirthday }) }}
-
diff --git a/src/components/user_note/user_note.js b/src/components/user_note/user_note.js index 830b2e594..e5ead513c 100644 --- a/src/components/user_note/user_note.js +++ b/src/components/user_note/user_note.js @@ -1,19 +1,24 @@ +import PanelLoading from 'src/components/panel_loading/panel_loading.vue' + const UserNote = { props: { user: Object, relationship: Object, editable: Boolean }, + components: { + PanelLoading + }, data () { return { - localNote: '', + localNote: this.relationship.note, editing: false, frozen: false } }, - computed: { - shouldShow () { - return this.relationship.note || this.editing + watch: { + relationship () { + this.localNote = this.relationship.note } }, methods: { @@ -21,9 +26,6 @@ const UserNote = { this.localNote = this.relationship.note this.editing = true }, - cancelEditing () { - this.editing = false - }, finalizeEditing () { this.frozen = true @@ -37,6 +39,7 @@ const UserNote = { }) .catch(() => { this.frozen = false + this.editing = false }) } } diff --git a/src/components/user_note/user_note.vue b/src/components/user_note/user_note.vue index e175ced00..8c4ec3662 100644 --- a/src/components/user_note/user_note.vue +++ b/src/components/user_note/user_note.vue @@ -1,46 +1,23 @@