mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-12-21 06:51:19 +08:00
replace last view avatarUrls
This commit is contained in:
parent
66eb9fcf92
commit
e1a47a2842
@ -1,6 +1,7 @@
|
||||
package io.papermc.hangar.db.model;
|
||||
|
||||
|
||||
import io.papermc.hangar.db.customtypes.JSONB;
|
||||
import io.papermc.hangar.model.Category;
|
||||
import io.papermc.hangar.model.Visibility;
|
||||
import org.jdbi.v3.core.annotation.Unmappable;
|
||||
@ -24,7 +25,7 @@ public class ProjectsTable implements Visitable {
|
||||
private Category category;
|
||||
private String description;
|
||||
private Visibility visibility;
|
||||
private Object notes; // TODO jsonb
|
||||
private JSONB notes;
|
||||
private Collection<String> keywords;
|
||||
private String homepage;
|
||||
private String issues;
|
||||
@ -169,11 +170,11 @@ public class ProjectsTable implements Visitable {
|
||||
}
|
||||
|
||||
|
||||
public Object getNotes() { //TODO jsonb
|
||||
public JSONB getNotes() {
|
||||
return notes;
|
||||
}
|
||||
|
||||
public void setNotes(Object notes) {
|
||||
public void setNotes(JSONB notes) {
|
||||
this.notes = notes;
|
||||
}
|
||||
|
||||
|
@ -73,8 +73,4 @@ public class Author {
|
||||
public void setCount(long count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public String getAvatarUrl() {
|
||||
return "https://paper.readthedocs.io/en/latest/_images/papermc_logomark_500.png"; // TODO figure out what to do with avatar url
|
||||
}
|
||||
}
|
||||
|
@ -31,23 +31,13 @@
|
||||
<#list users?filter(u -> (users?seq_index_of(u) + 1) % columns == div) as gridUser>
|
||||
<div class="media">
|
||||
<div class="media-left">
|
||||
<@userAvatar.userAvatar userName=gridUser.name avatarUrl=gridUser.avatarUrl clazz="user-avatar-sm media-object" />
|
||||
<@userAvatar.userAvatar userName=gridUser.name avatarUrl=utils.avatarUrl(gridUser.name) clazz="user-avatar-sm media-object" />
|
||||
</div>
|
||||
<div class="media-body center-vertically">
|
||||
<a class="media-heading mb-0" href="${routes.getRouteUrl("users.showProjects", gridUser.name)}">${gridUser.name}</a>
|
||||
</div>
|
||||
</div>
|
||||
</#list>
|
||||
<#-- @users.iterator.zipWithIndex.filter(_._2 % columns == div).map(_._1).map { user =>-->
|
||||
<#-- <div class="media">-->
|
||||
<#-- <div class="media-left">-->
|
||||
<#-- <@userAvatar.userAvatar userName=user.name avatarUrl=user.avatarUrl clazz="user-avatar-sm media-object" />-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="media-body center-vertically">-->
|
||||
<#-- <a class="media-heading mb-0" href="${routes.getRouteUrl("users.showProjects", user.name)}">${user.name}</a>-->
|
||||
<#-- </div>-->
|
||||
<#-- </div>-->
|
||||
<#-- }-->
|
||||
</div>
|
||||
</#list>
|
||||
|
||||
|
@ -72,7 +72,7 @@
|
||||
<#list authors as author>
|
||||
<tr>
|
||||
<#import "*/utils/userAvatar.ftlh" as userAvatar>
|
||||
<td><@userAvatar.userAvatar userName=author.name avatarUrl=author.avatarUrl clazz="user-avatar-xs"></@userAvatar.userAvatar></td>
|
||||
<td><@userAvatar.userAvatar userName=author.name avatarUrl=utils.avatarUrl(author.name) clazz="user-avatar-xs"></@userAvatar.userAvatar></td>
|
||||
<td>
|
||||
<a href="${routes.getRouteUrl("users.showProjects", author.name)}">${author.name}</a>
|
||||
</td>
|
||||
|
@ -75,7 +75,7 @@
|
||||
<ul class="list-group">
|
||||
<#list notifications as notification, origin>
|
||||
<li class="list-group-item notification" data-action="${notification.action!"none"}" data-id="${notification.id}">
|
||||
<#if origin??><@userAvatar.userAvatar userName=origin.user.name avatarUrl=origin.user.avatarUrl clazz="user-avatar-s" /></#if>
|
||||
<#if origin??><@userAvatar.userAvatar userName=origin.user.name avatarUrl=utils.avatarUrl(origin.user.name) clazz="user-avatar-s" /></#if>
|
||||
<@formatNotification notification />
|
||||
<#if !notification.read>
|
||||
<span class="btn-mark-read">
|
||||
|
@ -75,7 +75,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<#import "*/utils/userAvatar.ftlh" as userAvatar>
|
||||
<@userAvatar.userAvatar userName=organization.name avatarUrl=user.avatarUrl clazz="user-avatar-xxs"></@userAvatar.userAvatar>
|
||||
<@userAvatar.userAvatar userName=organization.name avatarUrl=utils.avatarUrl(organization.name) clazz="user-avatar-xxs"></@userAvatar.userAvatar>
|
||||
<a href="${routes.getRouteUrl("users.showProjects", organization.name)}">
|
||||
${organization.name}
|
||||
</a>
|
||||
|
@ -49,7 +49,7 @@
|
||||
<#list staff as staffUser>
|
||||
<tr>
|
||||
<#import "*/utils/userAvatar.ftlh" as userAvatar>
|
||||
<td><@userAvatar.userAvatar userName=staffUser.name avatarUrl=staffUser.avatarUrl clazz="user-avatar-xs"></@userAvatar.userAvatar></td>
|
||||
<td><@userAvatar.userAvatar userName=staffUser.name avatarUrl=utils.avatarUrl(staffUser.name) clazz="user-avatar-xs"></@userAvatar.userAvatar></td>
|
||||
<td>
|
||||
<a href="${routes.getRouteUrl("showActivities", staffUser.name)}">${staffUser.name}</a>
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user