Server: Improve notification page styling
This commit is contained in:
parent
1e62b11a01
commit
84d5aa39cf
|
@ -108,6 +108,18 @@ picture {
|
||||||
padding: 80px 0 32px;
|
padding: 80px 0 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notification {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.button-section {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
@ -336,6 +348,14 @@ picture {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notification {
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
.button-section {
|
||||||
|
padding: 8px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.profile-search {
|
.profile-search {
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
|
|
||||||
if std::env::var("RUST_LOG").is_err() {
|
if std::env::var("RUST_LOG").is_err() {
|
||||||
if config.debug {
|
if config.debug {
|
||||||
std::env::set_var("RUST_LOG", "hyaenidae_content=debug,hyaenidae_profiles=debug,hyaenidae_accounts=debug,hyaenidae_toolkit=debug,hyaenidae_server=debug,info");
|
std::env::set_var("RUST_LOG", "hyaenidae_content=debug,hyaenidae_profiles=debug,hyaenidae_accounts=debug,hyaenidae_toolkit=debug,hyaenidae=debug,info");
|
||||||
} else {
|
} else {
|
||||||
std::env::set_var("RUST_LOG", "info");
|
std::env::set_var("RUST_LOG", "info");
|
||||||
}
|
}
|
||||||
|
|
|
@ -475,10 +475,16 @@ impl NotificationsView {
|
||||||
.for_profile(profile_id)
|
.for_profile(profile_id)
|
||||||
{
|
{
|
||||||
if let Some(follow_req) = store.store.view.follow_requests.by_id(fr_id)? {
|
if let Some(follow_req) = store.store.view.follow_requests.by_id(fr_id)? {
|
||||||
if !view.profile_hm.contains_key(&follow_req.right) {
|
let icon = if let Some(profile) = view.profile_hm.get(&follow_req.right) {
|
||||||
|
profile.icon()
|
||||||
|
} else {
|
||||||
let profile = store.store.profiles.by_id(follow_req.right)?.req()?;
|
let profile = store.store.profiles.by_id(follow_req.right)?.req()?;
|
||||||
|
let icon = profile.icon();
|
||||||
|
view.profile_hm.insert(profile.id(), profile);
|
||||||
|
icon
|
||||||
|
};
|
||||||
|
|
||||||
if let Some(file_id) = profile.icon() {
|
if let Some(file_id) = icon {
|
||||||
if !view.file_hm.contains_key(&file_id) {
|
if !view.file_hm.contains_key(&file_id) {
|
||||||
if let Some(file) = store.store.files.by_id(file_id)? {
|
if let Some(file) = store.store.files.by_id(file_id)? {
|
||||||
view.file_hm.insert(file.id(), file);
|
view.file_hm.insert(file.id(), file);
|
||||||
|
@ -486,9 +492,6 @@ impl NotificationsView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
view.profile_hm.insert(profile.id(), profile);
|
|
||||||
}
|
|
||||||
|
|
||||||
view.fr_profile_hm.insert(follow_req.id, follow_req.right);
|
view.fr_profile_hm.insert(follow_req.id, follow_req.right);
|
||||||
view.follow_requests.push(follow_req.id);
|
view.follow_requests.push(follow_req.id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
@if nav_state.has_notifications() {
|
@if nav_state.has_notifications() {
|
||||||
<div class="toolkit-button toolkit-button__link">
|
<div class="toolkit-button toolkit-button__link">
|
||||||
<span><i class="fa fa-bell"></i></span>
|
<span><i class="fa fa-bell"></i></span>
|
||||||
@:link(&Link::current_tab(nav_state.notifications_path()).plain(true).class("toolkit-button--action"), {
|
@:link(&Link::current_tab(nav_state.notifications_path()).plain(true).class("toolkit-button--action").title("Notifications"), {
|
||||||
<i class="fa fa-bell"></i>
|
<i class="fa fa-bell"></i>
|
||||||
})
|
})
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
@:card_title({ Follow Requests })
|
@:card_title({ Follow Requests })
|
||||||
@for fr in view.follow_requests() {
|
@for fr in view.follow_requests() {
|
||||||
@:card_body({
|
@:card_body({
|
||||||
|
<div class="notification">
|
||||||
@:profile_box(loader, &fr.view(), None, nav_state.dark(), {})
|
@:profile_box(loader, &fr.view(), None, nav_state.dark(), {})
|
||||||
<div class="button-section">
|
<div class="button-section">
|
||||||
@:button_group(&[
|
@:button_group(&[
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
fr.reject_button(loader),
|
fr.reject_button(loader),
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@:card_body({
|
@:card_body({
|
||||||
|
@ -56,6 +58,8 @@
|
||||||
})
|
})
|
||||||
@for c in view.comments() {
|
@for c in view.comments() {
|
||||||
@:card_body({
|
@:card_body({
|
||||||
|
<div class="notification">
|
||||||
|
<div class="notification-line">
|
||||||
@:link(&c.author_link(), {
|
@:link(&c.author_link(), {
|
||||||
@Html(c.author_name())
|
@Html(c.author_name())
|
||||||
})
|
})
|
||||||
|
@ -69,12 +73,14 @@
|
||||||
@fl!(loader, "notification-comment-comment")
|
@fl!(loader, "notification-comment-comment")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
<div class="button-section">
|
<div class="button-section">
|
||||||
@:button_group(&[
|
@:button_group(&[
|
||||||
c.view_button(loader),
|
c.view_button(loader),
|
||||||
c.remove_button(loader),
|
c.remove_button(loader),
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@:card_body({
|
@:card_body({
|
||||||
|
|
|
@ -234,7 +234,7 @@ post-date-years-small = {$years}y
|
||||||
post-date-now = posted now
|
post-date-now = posted now
|
||||||
post-date-seconds = {$seconds ->
|
post-date-seconds = {$seconds ->
|
||||||
[one] posted one second ago
|
[one] posted one second ago
|
||||||
*[other] posted ${seconds} seconds ago
|
*[other] posted {$seconds} seconds ago
|
||||||
}
|
}
|
||||||
post-date-minutes = {$minutes ->
|
post-date-minutes = {$minutes ->
|
||||||
[one] posted one minute ago
|
[one] posted one minute ago
|
||||||
|
|
Loading…
Reference in a new issue