From b458d8d3a83b30089137c85bbe1f8aa4cde4afb2 Mon Sep 17 00:00:00 2001
From: Sheldan <5037282+Sheldan@users.noreply.github.com>
Date: Sun, 20 Jul 2025 11:33:49 +0200
Subject: [PATCH] [SIS-xxx] adding starboard customization to change color
based on disk (semi hardcoded) upgrading abstracto version adding avatar to
quote response
---
.env | 2 +-
deployment/helm/sissi/values.yaml | 4 +--
deployment/image-packaging/pom.xml | 10 ++++++
.../config/artifact_versions.json | 2 +-
pom.xml | 4 +--
.../commands/quote/quote_response_embed.ftl | 25 ++++++++++---
.../template-overrides/pom.xml | 1 +
.../starboard-template-overrides/pom.xml | 35 +++++++++++++++++++
.../src/main/assembly/assembly.xml | 15 ++++++++
.../config/starboard_post_container_color.ftl | 23 ++++++++++++
10 files changed, 111 insertions(+), 10 deletions(-)
create mode 100644 templates/sissi-templates/template-overrides/starboard-template-overrides/pom.xml
create mode 100644 templates/sissi-templates/template-overrides/starboard-template-overrides/src/main/assembly/assembly.xml
create mode 100644 templates/sissi-templates/template-overrides/starboard-template-overrides/src/main/resources/default/config/starboard_post_container_color.ftl
diff --git a/.env b/.env
index 49283e38..581c8215 100644
--- a/.env
+++ b/.env
@@ -1,4 +1,4 @@
REGISTRY_PREFIX=harbor.sheldan.dev/sissi/
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
VERSION=1.5.7
-ABSTRACTO_VERSION=1.6.10
\ No newline at end of file
+ABSTRACTO_VERSION=1.6.11
\ No newline at end of file
diff --git a/deployment/helm/sissi/values.yaml b/deployment/helm/sissi/values.yaml
index 18fb80f9..16ca9943 100644
--- a/deployment/helm/sissi/values.yaml
+++ b/deployment/helm/sissi/values.yaml
@@ -93,7 +93,7 @@ templateDeployment:
repository: harbor.sheldan.dev/abstracto
pullPolicy: Always
image: abstracto-template-deployment
- tag: 1.6.10
+ tag: 1.6.11
templateDeploymentData:
repository: harbor.sheldan.dev/sissi
pullPolicy: Always
@@ -104,7 +104,7 @@ dbConfigDeployment:
repository: harbor.sheldan.dev/abstracto
pullPolicy: Always
image: abstracto-db-deployment
- tag: 1.6.10
+ tag: 1.6.11
dbConfigDeploymentData:
repository: harbor.sheldan.dev/sissi
pullPolicy: Always
diff --git a/deployment/image-packaging/pom.xml b/deployment/image-packaging/pom.xml
index 37daccd6..c2193612 100644
--- a/deployment/image-packaging/pom.xml
+++ b/deployment/image-packaging/pom.xml
@@ -885,6 +885,16 @@
logging-template-overrides.zip
+
+ dev.sheldan.sissi.templates
+ starboard-template-overrides
+ ${project.version}
+ zip
+ true
+ ${file.basedir}/template-data/template-artifacts/
+ starboard-template-overrides.zip
+
+
diff --git a/deployment/image-packaging/src/main/docker/template-data/config/artifact_versions.json b/deployment/image-packaging/src/main/docker/template-data/config/artifact_versions.json
index db928bd2..9b55505c 100644
--- a/deployment/image-packaging/src/main/docker/template-data/config/artifact_versions.json
+++ b/deployment/image-packaging/src/main/docker/template-data/config/artifact_versions.json
@@ -5,7 +5,7 @@
"image-generation",
"quotes", "meetup", "debra", "rss-news", "miepscord",
"moderation-custom", "image-generation-custom",
- "moderation-template-overrides", "experience-template-overrides", "logging-template-overrides"
+ "moderation-template-overrides", "experience-template-overrides", "logging-template-overrides", "starboard-template-overrides"
],
"translation_artifacts": [
"core",
diff --git a/pom.xml b/pom.xml
index 808ccca6..511ade1b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,8 +18,8 @@
17
17
- 1.6.10
- 1.4.58
+ 1.6.11
+ 1.4.59
4.9.0
3.5.0
diff --git a/templates/sissi-templates/module-templates/quotes-templates/src/main/resources/default/commands/quote/quote_response_embed.ftl b/templates/sissi-templates/module-templates/quotes-templates/src/main/resources/default/commands/quote/quote_response_embed.ftl
index 9ab87ecc..8e6cf797 100644
--- a/templates/sissi-templates/module-templates/quotes-templates/src/main/resources/default/commands/quote/quote_response_embed.ftl
+++ b/templates/sissi-templates/module-templates/quotes-templates/src/main/resources/default/commands/quote/quote_response_embed.ftl
@@ -2,12 +2,29 @@
{
"components": [
{
+ <#assign userFound=authorUserDisplay?has_content>
<#assign authorName><#if authorMemberDisplay?has_content>${authorMemberDisplay.name}<#elseif authorUserDisplay?has_content>${authorUserDisplay.name}<#else><@safe_include "quote_response_default_author_name"/>#if>#assign>
- <#assign adderUserName><#if adderMemberDisplay?has_content>${adderMemberDisplay.name}<#elseif adderUserDisplay?has_content>${adderMemberDisplay.name}<#else><@safe_include "quote_response_default_adder_name"/>#if>#assign>
+ <#assign adderUserName><#if adderMemberDisplay?has_content>${adderMemberDisplay.name}<#elseif adderUserDisplay?has_content>${adderUserDisplay.name}<#else><@safe_include "quote_response_default_adder_name"/>#if>#assign>
<#assign channelName><@default_template_if_null sourceChannelName "quote_response_default_channel_name"/>#assign>
<#assign creationDate><@format_instant_date_time instant=creationDate/>#assign>
- "type": "textDisplay",
- "content": "<@safe_include "quote_response_header_author_name"/>"
+ <#if userFound>
+ <#assign authorAvatar><#if userFound>${authorUserDisplay.avatarUrl}#if>#assign>
+ "type": "section",
+ "components": [
+ {
+ "type": "textDisplay",
+ "content": "<@safe_include "quote_response_header_author_name"/>"
+ }
+ ],
+ "accessory": {
+ "type": "thumbnail",
+ "url": "${authorAvatar}"
+ }
+ <#else>
+ "type": "textDisplay",
+ "content": "<@safe_include "quote_response_header_author_name"/>"
+ #if>
+
},
{
"type": "section",
@@ -34,7 +51,7 @@
<#assign hasContent=true>
{
"type": "textDisplay",
- <#assign quoteDescription=quoteContent>
+ <#assign quoteDescription=quoteContent?json_string>
"content": "${quoteDescription}"
}
#if>
diff --git a/templates/sissi-templates/template-overrides/pom.xml b/templates/sissi-templates/template-overrides/pom.xml
index 87ac277d..c0c4c633 100644
--- a/templates/sissi-templates/template-overrides/pom.xml
+++ b/templates/sissi-templates/template-overrides/pom.xml
@@ -13,6 +13,7 @@
moderation-template-overrides
experience-template-overrides
logging-template-overrides
+ starboard-template-overrides
\ No newline at end of file
diff --git a/templates/sissi-templates/template-overrides/starboard-template-overrides/pom.xml b/templates/sissi-templates/template-overrides/starboard-template-overrides/pom.xml
new file mode 100644
index 00000000..802fadb0
--- /dev/null
+++ b/templates/sissi-templates/template-overrides/starboard-template-overrides/pom.xml
@@ -0,0 +1,35 @@
+
+
+
+ dev.sheldan.sissi.templates
+ template-overrides
+ 1.5.7-SNAPSHOT
+
+ 4.0.0
+
+ starboard-template-overrides
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+ package
+
+ single
+
+
+ moderation-template-overrides-${project.version}
+ false
+
+ src/main/assembly/assembly.xml
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/sissi-templates/template-overrides/starboard-template-overrides/src/main/assembly/assembly.xml b/templates/sissi-templates/template-overrides/starboard-template-overrides/src/main/assembly/assembly.xml
new file mode 100644
index 00000000..aca1e510
--- /dev/null
+++ b/templates/sissi-templates/template-overrides/starboard-template-overrides/src/main/assembly/assembly.xml
@@ -0,0 +1,15 @@
+
+ zip
+ false
+
+ zip
+
+
+
+ .
+ ${project.basedir}/src/main/resources
+
+
+
\ No newline at end of file
diff --git a/templates/sissi-templates/template-overrides/starboard-template-overrides/src/main/resources/default/config/starboard_post_container_color.ftl b/templates/sissi-templates/template-overrides/starboard-template-overrides/src/main/resources/default/config/starboard_post_container_color.ftl
new file mode 100644
index 00000000..cadbaf61
--- /dev/null
+++ b/templates/sissi-templates/template-overrides/starboard-template-overrides/src/main/resources/default/config/starboard_post_container_color.ftl
@@ -0,0 +1,23 @@
+"color" : {
+<#if starCount gte 15>
+ "r": 192,
+ "g": 31,
+ "b": 1
+<#elseif starCount gte 10>
+ "r": 67,
+ "g": 150,
+ "b": 154
+<#elseif starCount gte 5>
+ "r": 212,
+ "g": 175,
+ "b": 55
+<#elseif starCount gte 3>
+ "r": 49,
+ "g": 55,
+ "b": 61
+<#else>
+ "r": 0,
+ "g": 0,
+ "b": 0
+#if>
+},