diff options
| author | Ilja <ilja@ilja.space> | 2022-03-26 12:07:57 +0100 |
|---|---|---|
| committer | Ilja <ilja@ilja.space> | 2022-03-26 12:07:57 +0100 |
| commit | c34fdd46daedf94b8c777e541623f166dabde798 (patch) | |
| tree | f3f766970638cbffdbeac29b4b8a39d66f3b34bc /src/components/status_body | |
| parent | 2dd75ca76cd36846e76d74fc2f4d5dcedfcc66d7 (diff) | |
| parent | fd77c583bf18be81b628d92b1f95cc14a2d9c09d (diff) | |
Merge remote-tracking branch 'pleroma/develop' into improve_delete_user_confirmation_message
Diffstat (limited to 'src/components/status_body')
| -rw-r--r-- | src/components/status_body/status_body.js | 16 | ||||
| -rw-r--r-- | src/components/status_body/status_body.vue | 4 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index 91c33135..b8f6f9a0 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -26,14 +26,16 @@ const StatusContent = { 'focused', 'noHeading', 'fullContent', - 'singleLine' + 'singleLine', + 'showingTall', + 'expandingSubject', + 'showingLongSubject', + 'toggleShowingTall', + 'toggleExpandingSubject', + 'toggleShowingLongSubject' ], data () { return { - showingTall: this.fullContent || (this.inConversation && this.focused), - showingLongSubject: false, - // not as computed because it sets the initial state which will be changed later - expandingSubject: !this.$store.getters.mergedConfig.collapseMessageWithSubject, postLength: this.status.text.length, parseReadyDone: false } @@ -115,9 +117,9 @@ const StatusContent = { }, toggleShowMore () { if (this.mightHideBecauseTall) { - this.showingTall = !this.showingTall + this.toggleShowingTall() } else if (this.mightHideBecauseSubject) { - this.expandingSubject = !this.expandingSubject + this.toggleExpandingSubject() } }, generateTagLink (tag) { diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue index a088e6bc..24d842c2 100644 --- a/src/components/status_body/status_body.vue +++ b/src/components/status_body/status_body.vue @@ -17,14 +17,14 @@ <button v-if="longSubject && showingLongSubject" class="button-unstyled -link tall-subject-hider" - @click.prevent="showingLongSubject=false" + @click.prevent="toggleShowingLongSubject" > {{ $t("status.hide_full_subject") }} </button> <button v-else-if="longSubject" class="button-unstyled -link tall-subject-hider" - @click.prevent="showingLongSubject=true" + @click.prevent="toggleShowingLongSubject" > {{ $t("status.show_full_subject") }} </button> |
