mirror of
https://github.com/freedit-org/freedit.git
synced 2026-04-25 03:05:37 -04:00
add feeds nav
This commit is contained in:
@@ -39,7 +39,7 @@ struct PageUser<'a> {
|
||||
page_data: PageData<'a>,
|
||||
user_solos_count: usize,
|
||||
user_posts_count: usize,
|
||||
user_comments_count: usize,
|
||||
user_feeds_count: usize,
|
||||
user_following_count: usize,
|
||||
user_followers_count: usize,
|
||||
has_followed: Option<bool>,
|
||||
@@ -75,7 +75,7 @@ pub(crate) async fn user(
|
||||
let uid_ivec = u32_to_ivec(uid);
|
||||
let user_solos_count = get_count_by_prefix(&db, "user_solos", &uid_ivec)?;
|
||||
let user_posts_count = get_count_by_prefix(&db, "user_posts", &uid_ivec)?;
|
||||
let user_comments_count = get_count_by_prefix(&db, "user_comments", &uid_ivec)?;
|
||||
let user_feeds_count = get_count_by_prefix(&db, "user_folders", &uid_ivec)?;
|
||||
let user_following_count = get_count_by_prefix(&db, "user_following", &u32_to_ivec(uid))?;
|
||||
let user_followers_count = get_count_by_prefix(&db, "user_followers", &u32_to_ivec(uid))?;
|
||||
|
||||
@@ -97,7 +97,7 @@ pub(crate) async fn user(
|
||||
user: out_user,
|
||||
user_solos_count,
|
||||
user_posts_count,
|
||||
user_comments_count,
|
||||
user_feeds_count,
|
||||
user_following_count,
|
||||
user_followers_count,
|
||||
has_followed,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="field-body">
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<input class="input" type="text" name="url" required maxlength="500" placeholder="url" />
|
||||
<input class="input" type="text" name="url" required maxlength="500" placeholder="rss or atom link" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -43,6 +43,17 @@
|
||||
<div class="level is-mobile">
|
||||
{% block menu_right %}
|
||||
{% match page_data.claim %} {% when Some with (val) %}
|
||||
<a href="/feed/{{val.uid}}">
|
||||
<span class="icon is-large">
|
||||
<span class="icon">
|
||||
<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Feeds</title>
|
||||
<path d="M12 21V7a2 2 0 012-2h7.4a.6.6 0 01.6.6v13.114M12 21V7a2 2 0 00-2-2H2.6a.6.6 0 00-.6.6v13.114M14 19h8M10 19H2" stroke="#363636" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 21a2 2 0 012-2M12 21a2 2 0 00-2-2" stroke="#363636" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
<a href="/notification">
|
||||
<span class="icon is-large">
|
||||
<span class="icon-text icon-text-info">
|
||||
@@ -60,7 +71,7 @@
|
||||
</span>
|
||||
</a>
|
||||
<a href="/signout">
|
||||
<span class="icon is-large">
|
||||
<span class="icon is-large is-hidden-mobile">
|
||||
<span class="icon">
|
||||
<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Sign out</title>
|
||||
|
||||
@@ -37,6 +37,17 @@
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
<a href="/signout">
|
||||
<span class="icon is-large">
|
||||
<span class="icon">
|
||||
<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Sign out</title>
|
||||
<path d="M12 12H19M19 12L16 15M19 12L16 9" stroke="#363636" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M19 6V5C19 3.89543 18.1046 3 17 3H7C5.89543 3 5 3.89543 5 5V19C5 20.1046 5.89543 21 7 21H17C18.1046 21 19 20.1046 19 19V18" stroke="#363636" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}{% endmatch %}
|
||||
{% endmatch %}
|
||||
@@ -65,8 +76,8 @@
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Comments</p>
|
||||
<p class="title">{{user_comments_count}}</p>
|
||||
<p class="heading">Feeds</p>
|
||||
<p class="title"><a href="/feed/{{user.uid}}">{{user_feeds_count}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
|
||||
Reference in New Issue
Block a user