Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
pleroma-fe
Commits
44edb730
Commit
44edb730
authored
4 years ago
by
Shpuld Shpludson
Browse files
Options
Downloads
Patches
Plain Diff
rip restyle subject, fix some issues with long subject
parent
4da0a0c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1217
2.1.0 into master
,
!1150
StatusContent: Better separate subject from status content.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/status_content/status_content.js
+1
-1
1 addition, 1 deletion
src/components/status_content/status_content.js
src/components/status_content/status_content.vue
+73
-42
73 additions, 42 deletions
src/components/status_content/status_content.vue
with
74 additions
and
43 deletions
src/components/status_content/status_content.js
+
1
−
1
View file @
44edb730
...
...
@@ -44,7 +44,7 @@ const StatusContent = {
return
lengthScore
>
20
},
longSubject
()
{
return
this
.
status
.
summary
.
length
>
90
0
return
this
.
status
.
summary
.
length
>
24
0
},
// When a status has a subject and is also tall, we should only have one show more/less button. If the default is to collapse statuses with subjects, we just treat it like a status with a subject; otherwise, we just treat it like a tall status.
mightHideBecauseSubject
()
{
...
...
This diff is collapsed.
Click to expand it.
src/components/status_content/status_content.vue
+
73
−
42
View file @
44edb730
...
...
@@ -3,45 +3,32 @@
<div
class=
"status-body"
>
<slot
name=
"header"
/>
<div
v-if=
"
longSubject
"
class=
"s
tatus-content
-wrapper"
:class=
"
{ 'tall-s
tatus':
!showingLongSubject }"
v-if=
"
status.summary_html
"
class=
"s
ummary
-wrapper"
:class=
"
{ 'tall-s
ubject': (longSubject
&&
!showingLongSubject
)
}"
>
<a
v-if=
"!showingLongSubject"
class=
"tall-status-hider"
:class=
"
{ 'tall-status-hider_focused': focused }"
href="#"
@click.prevent="showingLongSubject=true"
>
{{
$t
(
"
general.show_more
"
)
}}
<span
v-if=
"hasImageAttachments"
class=
"icon-picture"
/>
<span
v-if=
"hasVideoAttachments"
class=
"icon-video"
/>
<span
v-if=
"status.card"
class=
"icon-link"
/>
</a>
<div
class=
"
status-content
media-body"
class=
"media-body
summary
"
@
click.prevent=
"linkClicked"
v-html=
"
postBodyH
tml"
v-html=
"
status.summary_h
tml"
/>
<a
v-if=
"showingLongSubject"
v-if=
"
longSubject &&
showingLongSubject"
href=
"#"
class=
"
s
ta
tus-un
hider"
class=
"ta
ll-subject-
hider"
@
click.prevent=
"showingLongSubject=false"
>
{{
$t
(
"
general.show_less
"
)
}}
</a>
<a
v-else-if=
"longSubject"
class=
"tall-subject-hider"
:class=
"
{ 'tall-subject-hider_focused': focused }"
href="#"
@click.prevent="showingLongSubject=true"
>
{{
$t
(
"
general.show_more
"
)
}}
</a>
</div>
<div
v-else
:class=
"
{'tall-status': hideTallStatus}"
class="status-content-wrapper"
>
...
...
@@ -51,13 +38,9 @@
:class=
"
{ 'tall-status-hider_focused': focused }"
href="#"
@click.prevent="toggleShowMore"
>
{{
$t
(
"
general.show_more
"
)
}}
</a>
<div
v-if=
"status.summary_html"
class=
"status-content media-body summary"
@
click.prevent=
"linkClicked"
v-html=
"status.summary_html"
/>
>
{{
$t
(
"
general.show_more
"
)
}}
</a>
<div
v-if=
"!hideSubjectStatus"
class=
"status-content media-body"
...
...
@@ -69,7 +52,21 @@
href=
"#"
class=
"cw-status-hider"
@
click.prevent=
"toggleShowMore"
>
{{
$t
(
"
general.show_more
"
)
}}
</a>
>
{{
$t
(
"
general.show_more
"
)
}}
<span
v-if=
"hasImageAttachments"
class=
"icon-picture"
/>
<span
v-if=
"hasVideoAttachments"
class=
"icon-video"
/>
<span
v-if=
"status.card"
class=
"icon-link"
/>
</a>
<a
v-if=
"showingMore"
href=
"#"
...
...
@@ -129,6 +126,12 @@ $status-margin: 0.75em;
flex
:
1
;
min-width
:
0
;
.status-content-wrapper
{
display
:
flex
;
flex-direction
:
column
;
flex-wrap
:
nowrap
;
}
.tall-status
{
position
:
relative
;
height
:
220px
;
...
...
@@ -136,7 +139,7 @@ $status-margin: 0.75em;
overflow-y
:
hidden
;
z-index
:
1
;
.status-content
{
height
:
100%
;
min-
height
:
0
;
mask
:
linear-gradient
(
to
top
,
white
,
transparent
)
bottom
/
100%
70px
no-repeat
,
linear-gradient
(
to
top
,
white
,
white
);
/* Autoprefixed seem to ignore this one, and also syntax is different */
...
...
@@ -176,15 +179,43 @@ $status-margin: 0.75em;
}
}
.summary-wrapper
{
margin-bottom
:
0
.5em
;
border-style
:
solid
;
border-width
:
0
0
1px
0
;
border-color
:
var
(
--
border
,
$fallback--border
);
flex-grow
:
0
;
}
.summary
{
font-style
:
italic
;
padding-bottom
:
0
.5em
;
}
.tall-subject
{
position
:
relative
;
.summary
{
max-height
:
2em
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
}
.tall-subject-hider
{
display
:
inline-block
;
word-break
:
break-all
;
// position: absolute;
width
:
100%
;
text-align
:
center
;
padding-bottom
:
0
.5em
;
}
.status-content
{
font-family
:
var
(
--
postFont
,
sans-serif
);
line-height
:
1
.4em
;
white-space
:
pre-wrap
;
&
.summary
{
font-weight
:
bold
;
}
blockquote
{
margin
:
0
.2em
0
0
.2em
2em
;
font-style
:
italic
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment