diff --git a/src/main/java/io/papermc/hangar/db/model/ProjectsTable.java b/src/main/java/io/papermc/hangar/db/model/ProjectsTable.java index 2ef9ca1f5..569395a16 100644 --- a/src/main/java/io/papermc/hangar/db/model/ProjectsTable.java +++ b/src/main/java/io/papermc/hangar/db/model/ProjectsTable.java @@ -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 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; } diff --git a/src/main/java/io/papermc/hangar/model/viewhelpers/Author.java b/src/main/java/io/papermc/hangar/model/viewhelpers/Author.java index b70acd2b3..6f76167b7 100644 --- a/src/main/java/io/papermc/hangar/model/viewhelpers/Author.java +++ b/src/main/java/io/papermc/hangar/model/viewhelpers/Author.java @@ -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 - } } diff --git a/src/main/resources/templates/projects/userGrid.ftlh b/src/main/resources/templates/projects/userGrid.ftlh index 2ca92ce8e..848c1501f 100644 --- a/src/main/resources/templates/projects/userGrid.ftlh +++ b/src/main/resources/templates/projects/userGrid.ftlh @@ -31,23 +31,13 @@ <#list users?filter(u -> (users?seq_index_of(u) + 1) % columns == div) as gridUser>
- <@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" />
-<#-- @users.iterator.zipWithIndex.filter(_._2 % columns == div).map(_._1).map { user =>--> -<#--
--> -<#--
--> -<#-- <@userAvatar.userAvatar userName=user.name avatarUrl=user.avatarUrl clazz="user-avatar-sm media-object" />--> -<#--
--> -<#--
--> -<#-- ${user.name}--> -<#--
--> -<#--
--> -<#-- }--> diff --git a/src/main/resources/templates/users/authors.ftlh b/src/main/resources/templates/users/authors.ftlh index f51807a21..e0b672486 100644 --- a/src/main/resources/templates/users/authors.ftlh +++ b/src/main/resources/templates/users/authors.ftlh @@ -72,7 +72,7 @@ <#list authors as author> <#import "*/utils/userAvatar.ftlh" as userAvatar> - <@userAvatar.userAvatar userName=author.name avatarUrl=author.avatarUrl clazz="user-avatar-xs"> + <@userAvatar.userAvatar userName=author.name avatarUrl=utils.avatarUrl(author.name) clazz="user-avatar-xs"> ${author.name} diff --git a/src/main/resources/templates/users/notifications.ftlh b/src/main/resources/templates/users/notifications.ftlh index 6138f42ec..fae387144 100644 --- a/src/main/resources/templates/users/notifications.ftlh +++ b/src/main/resources/templates/users/notifications.ftlh @@ -75,7 +75,7 @@