Server: Improve notification page styling
This commit is contained in:
parent
1e62b11a01
commit
84d5aa39cf
|
@ -108,6 +108,18 @@ picture {
|
|||
padding: 80px 0 32px;
|
||||
}
|
||||
|
||||
.notification {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.button-section {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs {
|
||||
padding: 0 12px;
|
||||
overflow-x: auto;
|
||||
|
@ -336,6 +348,14 @@ picture {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.notification {
|
||||
display: block;
|
||||
|
||||
.button-section {
|
||||
padding: 8px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.profile-search {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
if std::env::var("RUST_LOG").is_err() {
|
||||
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 {
|
||||
std::env::set_var("RUST_LOG", "info");
|
||||
}
|
||||
|
|
|
@ -475,18 +475,21 @@ impl NotificationsView {
|
|||
.for_profile(profile_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 icon = profile.icon();
|
||||
view.profile_hm.insert(profile.id(), profile);
|
||||
icon
|
||||
};
|
||||
|
||||
if let Some(file_id) = profile.icon() {
|
||||
if !view.file_hm.contains_key(&file_id) {
|
||||
if let Some(file) = store.store.files.by_id(file_id)? {
|
||||
view.file_hm.insert(file.id(), file);
|
||||
}
|
||||
if let Some(file_id) = icon {
|
||||
if !view.file_hm.contains_key(&file_id) {
|
||||
if let Some(file) = store.store.files.by_id(file_id)? {
|
||||
view.file_hm.insert(file.id(), file);
|
||||
}
|
||||
}
|
||||
|
||||
view.profile_hm.insert(profile.id(), profile);
|
||||
}
|
||||
|
||||
view.fr_profile_hm.insert(follow_req.id, follow_req.right);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
@if nav_state.has_notifications() {
|
||||
<div class="toolkit-button toolkit-button__link">
|
||||
<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>
|
||||
})
|
||||
</div>
|
||||
|
|
|
@ -32,12 +32,14 @@
|
|||
@:card_title({ Follow Requests })
|
||||
@for fr in view.follow_requests() {
|
||||
@:card_body({
|
||||
@:profile_box(loader, &fr.view(), None, nav_state.dark(), {})
|
||||
<div class="button-section">
|
||||
@:button_group(&[
|
||||
fr.accept_button(loader),
|
||||
fr.reject_button(loader),
|
||||
])
|
||||
<div class="notification">
|
||||
@:profile_box(loader, &fr.view(), None, nav_state.dark(), {})
|
||||
<div class="button-section">
|
||||
@:button_group(&[
|
||||
fr.accept_button(loader),
|
||||
fr.reject_button(loader),
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
})
|
||||
}
|
||||
|
@ -56,24 +58,28 @@
|
|||
})
|
||||
@for c in view.comments() {
|
||||
@:card_body({
|
||||
@:link(&c.author_link(), {
|
||||
@Html(c.author_name())
|
||||
})
|
||||
@if let Some(l) = c.submission_link() {
|
||||
@fl!(loader, "notification-commented")
|
||||
@:link(&l, { @Html(c.submission_title()) })
|
||||
}
|
||||
@if let Some(l) = c.reply_to_link() {
|
||||
@fl!(loader, "notification-replied")
|
||||
@:link(&l, {
|
||||
@fl!(loader, "notification-comment-comment")
|
||||
})
|
||||
}
|
||||
<div class="button-section">
|
||||
@:button_group(&[
|
||||
c.view_button(loader),
|
||||
c.remove_button(loader),
|
||||
])
|
||||
<div class="notification">
|
||||
<div class="notification-line">
|
||||
@:link(&c.author_link(), {
|
||||
@Html(c.author_name())
|
||||
})
|
||||
@if let Some(l) = c.submission_link() {
|
||||
@fl!(loader, "notification-commented")
|
||||
@:link(&l, { @Html(c.submission_title()) })
|
||||
}
|
||||
@if let Some(l) = c.reply_to_link() {
|
||||
@fl!(loader, "notification-replied")
|
||||
@:link(&l, {
|
||||
@fl!(loader, "notification-comment-comment")
|
||||
})
|
||||
}
|
||||
</div>
|
||||
<div class="button-section">
|
||||
@:button_group(&[
|
||||
c.view_button(loader),
|
||||
c.remove_button(loader),
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
})
|
||||
}
|
||||
|
|
|
@ -234,7 +234,7 @@ post-date-years-small = {$years}y
|
|||
post-date-now = posted now
|
||||
post-date-seconds = {$seconds ->
|
||||
[one] posted one second ago
|
||||
*[other] posted ${seconds} seconds ago
|
||||
*[other] posted {$seconds} seconds ago
|
||||
}
|
||||
post-date-minutes = {$minutes ->
|
||||
[one] posted one minute ago
|
||||
|
|
Loading…
Reference in a new issue