creator points on account management
This commit is contained in:
parent
3da5deb34a
commit
a6419b2ea7
5 changed files with 10 additions and 4 deletions
BIN
public/assets/icons/gd/creator_points.png
Normal file
BIN
public/assets/icons/gd/creator_points.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
@ -42,4 +42,4 @@ i've run out of ideas.
|
|||
- authentication caching
|
||||
- use log instead of println
|
||||
- make a proper rank system (reuploading, uploading music, rating, etc.)
|
||||
- user icons in the account management + settings (gdicon.oat.zone? selfhost?)
|
||||
- user icons in the account management + settings (gdicon.oat.zone? selfhost?) ideally we find a legal way to do this (i cant distribute the plist+asset files directly) but doing this illegally is always an option
|
|
@ -15,7 +15,7 @@ pub fn account_management(cookies: &CookieJar<'_>) -> Result<Template, Redirect>
|
|||
let logged_in = crate::helpers::templates::authenticate(cookies);
|
||||
|
||||
match logged_in {
|
||||
Ok((username_val, account_id_val, user_id_val)) => {
|
||||
Ok((username_val, _account_id_val, user_id_val)) => {
|
||||
use crate::schema::users::dsl::*;
|
||||
use crate::models::User;
|
||||
|
||||
|
@ -30,7 +30,8 @@ pub fn account_management(cookies: &CookieJar<'_>) -> Result<Template, Redirect>
|
|||
diamonds: result.diamonds,
|
||||
coins: result.coins,
|
||||
user_coins: result.user_coins,
|
||||
demons: result.demons
|
||||
demons: result.demons,
|
||||
creator_points: result.creator_points,
|
||||
}));
|
||||
},
|
||||
Err(_) => {
|
||||
|
|
|
@ -23,7 +23,12 @@
|
|||
hai, <b>{{ username }}</b>!
|
||||
</div>
|
||||
<div class="greeting-stats">
|
||||
{{ stars }} <img src="/assets/icons/gd/star.png"> {{ diamonds }} <img src="/assets/icons/gd/diamond.png"> {{ coins }} <img src="/assets/icons/gd/coin.png"> {{ user_coins }} <img src="/assets/icons/gd/silvercoin.png"> {{ demons }} <img src="/assets/icons/gd/demon.png">
|
||||
{{ stars }} <img src="/assets/icons/gd/star.png">
|
||||
{{ diamonds }} <img src="/assets/icons/gd/diamond.png">
|
||||
{{ coins }} <img src="/assets/icons/gd/coin.png">
|
||||
{{ user_coins }} <img src="/assets/icons/gd/silver_coin.png">
|
||||
{{ demons }} <img src="/assets/icons/gd/demon.png">
|
||||
{{#unless (eq creator_points 0)}} {{ creator_points }} <img src="/assets/icons/gd/creator_points.png"> {{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="greeting-bottom">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue