Toggle status stub, stub muted statuses
FossilOrigin-Name: 612e8523e256f4d59f17ef79f8cf9eaedeacfd37ec9e1141c779a82e0196c3ee
This commit is contained in:
parent
8bd187bece
commit
72dd972c42
4 changed files with 69 additions and 15 deletions
59
dist/treebird20.css
vendored
59
dist/treebird20.css
vendored
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
*
|
||||
{
|
||||
margin: 0;
|
||||
|
@ -632,6 +630,11 @@ svg.in-reply-to-icon
|
|||
border-spacing: 0px;
|
||||
}
|
||||
|
||||
.status-hide:checked + .status
|
||||
{
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.status.focused,
|
||||
.status:target
|
||||
{
|
||||
|
@ -660,6 +663,45 @@ svg.in-reply-to-icon
|
|||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.status-view
|
||||
{
|
||||
display: inline;
|
||||
border: 1px solid #cacaca;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 3px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.status-view:hover
|
||||
{
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
|
||||
.status-view:before
|
||||
{
|
||||
content: "-";
|
||||
}
|
||||
|
||||
.status-hide:checked + .status .status-view:before
|
||||
{
|
||||
content: "+";
|
||||
}
|
||||
|
||||
.status-hide
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.status-hide:checked + .status .status-data,
|
||||
.status-hide:checked + .status .pfp-td
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pfp-td
|
||||
{
|
||||
width: 56px;
|
||||
|
@ -745,12 +787,18 @@ svg.in-reply-to-icon
|
|||
max-width: 480px;
|
||||
}
|
||||
|
||||
.status-hide:checked + .status .poster-stats
|
||||
{
|
||||
max-width: 540px;
|
||||
}
|
||||
|
||||
.poster-stats .alignend
|
||||
{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.status .username,
|
||||
|
@ -780,9 +828,8 @@ svg.in-reply-to-icon
|
|||
{
|
||||
color: #808080;
|
||||
display: inline;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.status-interact
|
||||
|
@ -1572,7 +1619,7 @@ ul.large-list li a
|
|||
.menu-container:hover + .menu
|
||||
{
|
||||
position: absolute;
|
||||
display: block;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.menu
|
||||
|
|
|
@ -689,6 +689,7 @@ char* construct_status(struct session* ssn,
|
|||
struct status_template tmpl = {
|
||||
.status_id = status->id,
|
||||
.notif_info = notif_info,
|
||||
.thread_hidden = status->muted ? "checked" : "",
|
||||
// TODO doesn't even need to be a hashtag, this is a temporary hack
|
||||
.is_cat = status->account.note && strstr(status->account.note, "isCat") ? "is-cat" : NULL,
|
||||
.is_bun = status->account.note && strstr(status->account.note, "isBun") ? " is-bun" : NULL,
|
||||
|
|
|
@ -47,6 +47,7 @@ void tl_home(struct session* ssn, mastodont_t* api, int local)
|
|||
char* start_id;
|
||||
|
||||
struct mstdnt_timeline_args args = {
|
||||
.with_muted = 1,
|
||||
.local = local,
|
||||
.max_id = keystr(ssn->post.max_id),
|
||||
.since_id = NULL,
|
||||
|
@ -113,7 +114,7 @@ void tl_direct(struct session* ssn, mastodont_t* api)
|
|||
char* start_id;
|
||||
|
||||
struct mstdnt_timeline_args args = {
|
||||
.with_muted = 0,
|
||||
.with_muted = 1,
|
||||
.max_id = keystr(ssn->post.max_id),
|
||||
.since_id = NULL,
|
||||
.min_id = keystr(ssn->post.min_id),
|
||||
|
@ -181,6 +182,7 @@ void tl_public(struct session* ssn, mastodont_t* api, int local, enum base_categ
|
|||
char* start_id;
|
||||
|
||||
struct mstdnt_timeline_args args = {
|
||||
.with_muted = 1,
|
||||
.local = local,
|
||||
.remote = 0,
|
||||
.only_media = 0,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<input type="checkbox" class="status-hide" id="status-toggle-{{%s:status_id}}" {{ %s:thread_hidden }}>
|
||||
<table id="{{%s:status_id}}" class="status ui-table">
|
||||
{{ %s : notif_info }}
|
||||
<tr>
|
||||
|
@ -30,16 +31,19 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<label for="status-toggle-{{%s:status_id}}" class="status-view"></label>
|
||||
</span>
|
||||
</div>
|
||||
{{%s:in_reply_to_str}}
|
||||
<span class="status-content">
|
||||
{{%s:status_content}}
|
||||
</span>
|
||||
{{%s:attachments}}
|
||||
{{%s:interactions}}
|
||||
{{%s:emoji_reactions}}
|
||||
{{%s:interaction_btns}}
|
||||
<div class="status-data">
|
||||
{{%s:in_reply_to_str}}
|
||||
<span class="status-content">
|
||||
{{%s:status_content}}
|
||||
</span>
|
||||
{{%s:attachments}}
|
||||
{{%s:interactions}}
|
||||
{{%s:emoji_reactions}}
|
||||
{{%s:interaction_btns}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue