Lists perlify , remove compact notifications CSS
FossilOrigin-Name: 6110d9f562673f233328fa5c5abd845c1ab1b3da5a314e94adb4d142287e70fa
This commit is contained in:
parent
6f0c959dc7
commit
71b636d77f
|
@ -742,40 +742,6 @@ input[type=submit].post-btn
|
|||
object-fit: cover;
|
||||
}
|
||||
|
||||
.notification-compact
|
||||
{
|
||||
min-width: 100%;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.notification-compact p
|
||||
{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.notification-compact .notification-content
|
||||
{
|
||||
max-height: 100px;
|
||||
overflow: auto;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.notification-compact .notification-info
|
||||
{
|
||||
font-size: 12px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
margin-top: 0;
|
||||
vertical-align: middle;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.notification-compact .username .emoji
|
||||
{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.notification-info svg,
|
||||
.notification-info-format svg
|
||||
{
|
||||
|
@ -838,52 +804,12 @@ input[type=checkbox].hidden:not(:checked) + .reply-form
|
|||
display: none;
|
||||
}
|
||||
|
||||
.notification-compact .notification-content
|
||||
{
|
||||
color: #808080;
|
||||
font-size: 12px;
|
||||
padding: 4px 0 2px 0;
|
||||
}
|
||||
|
||||
.notification-compact .notification-content.is-mention
|
||||
{
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
.notification-compact .notification-stats
|
||||
{
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.notification-compact .notification-stats .status-interact
|
||||
{
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.notification-compact .notification-stats svg
|
||||
{
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.notification-compact .notification-stats .statbtn
|
||||
{
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.notification-info
|
||||
{
|
||||
margin-left: 28px;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.notification-compact .notification-info
|
||||
{
|
||||
margin-left: unset;
|
||||
margin-bottom: unset;
|
||||
}
|
||||
|
||||
|
||||
.notification-info img.avatar,
|
||||
.notification-info .pfp-compact-td img,
|
||||
.notification-info-format .pfp-compact-td img
|
||||
|
@ -1073,13 +999,6 @@ input[type=checkbox].hidden:not(:checked) + .reply-form
|
|||
font-size: 10px;
|
||||
}
|
||||
|
||||
.notification-compact .time:before
|
||||
{
|
||||
content: "•";
|
||||
padding-right: 10px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.status .time
|
||||
{
|
||||
margin-right: 4px;
|
||||
|
@ -1111,8 +1030,7 @@ input[type=checkbox].hidden:not(:checked) + .reply-form
|
|||
}
|
||||
|
||||
.status .time,
|
||||
.status .status-meta,
|
||||
.notification-compact .time
|
||||
.status .status-meta
|
||||
{
|
||||
color: #606060;
|
||||
font-size: 14px;
|
||||
|
@ -1769,11 +1687,6 @@ p}
|
|||
top: 5px;
|
||||
}
|
||||
|
||||
.notification-compact .status-interact .statbtn
|
||||
{
|
||||
min-width: 0px !important;
|
||||
}
|
||||
|
||||
.status-interact svg
|
||||
{
|
||||
stroke: #303030;
|
||||
|
|
32
src/lists.c
32
src/lists.c
|
@ -39,7 +39,7 @@ void content_lists(PATH_ARGS)
|
|||
struct mstdnt_args m_args;
|
||||
set_mstdnt_args(&m_args, ssn);
|
||||
struct mstdnt_list* lists = NULL;
|
||||
size_t list_len = 0;
|
||||
size_t lists_len = 0;
|
||||
struct mstdnt_storage storage = { 0 };
|
||||
|
||||
if (ssn->post.title.is_set)
|
||||
|
@ -53,7 +53,7 @@ void content_lists(PATH_ARGS)
|
|||
mastodont_storage_cleanup(&create_storage);
|
||||
}
|
||||
|
||||
mastodont_get_lists(api, &m_args, &storage, &lists, &list_len);
|
||||
mastodont_get_lists(api, &m_args, &storage, &lists, &lists_len);
|
||||
|
||||
// Call perl
|
||||
perl_lock();
|
||||
|
@ -65,7 +65,7 @@ void content_lists(PATH_ARGS)
|
|||
HV* session_hv = perlify_session(ssn);
|
||||
XPUSHs(newRV_noinc((SV*)session_hv));
|
||||
XPUSHs(newRV_noinc((SV*)template_files));
|
||||
// TODO Perlify lists
|
||||
XPUSHs(newRV_noinc((SV*)perlify_lists(lists, lists_len)));
|
||||
|
||||
// ARGS
|
||||
PUTBACK;
|
||||
|
@ -118,3 +118,29 @@ void list_edit(PATH_ARGS)
|
|||
redirect(req, REDIRECT_303, referer);
|
||||
mastodont_storage_cleanup(&storage);
|
||||
}
|
||||
|
||||
HV* perlify_list(struct mstdnt_list* list)
|
||||
{
|
||||
if (!list) return NULL;
|
||||
|
||||
HV* list_hv = newHV();
|
||||
hvstores_str(list_hv, "id", list->id);
|
||||
hvstores_str(list_hv, "title", list->title);
|
||||
// hvstores_int(list_hv, "replies_policy", list->replies_policy);
|
||||
|
||||
return list_hv;
|
||||
}
|
||||
|
||||
AV* perlify_lists(const struct mstdnt_list* lists, size_t len)
|
||||
{
|
||||
if (!(lists && len)) return NULL;
|
||||
AV* av = newAV();
|
||||
av_extend(av, len-1);
|
||||
|
||||
for (int i = 0; i < len; ++i)
|
||||
{
|
||||
av_store(av, i, newRV_inc((SV*)perlify_list(lists + i)));
|
||||
}
|
||||
|
||||
return av;
|
||||
}
|
||||
|
|
|
@ -27,4 +27,10 @@ void content_lists(PATH_ARGS);
|
|||
/** Creates a list and then redirects */
|
||||
void list_edit(PATH_ARGS);
|
||||
|
||||
/** Converts list to perl hash */
|
||||
HV* perlify_list(struct mstdnt_list* list);
|
||||
|
||||
/** Converts lists to perl array */
|
||||
AV* perlify_lists(const struct mstdnt_list* lists, size_t len);
|
||||
|
||||
#endif // LISTS_H
|
||||
|
|
Loading…
Reference in New Issue