Quick moderation fixes (#3556)

* Quick moderation fixes

* Fix Odyssey mods linking
* Add "Copy permanent link" button to orgs, users, projects
* Use permanent links for Slack webhooks

* Update apps/frontend/src/pages/organization/[id].vue

Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
Signed-off-by: Emma Alexia <wafflecoffee7@gmail.com>

* Run Prettier

---------

Signed-off-by: Emma Alexia <wafflecoffee7@gmail.com>
Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
Co-authored-by: Alejandro González <me@alegon.dev>
Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
Emma Alexia
2025-04-28 21:18:43 -04:00
committed by GitHub
parent 2f68c62b3a
commit 0508f13cb6
6 changed files with 44 additions and 12 deletions

View File

@@ -168,19 +168,19 @@ impl ModerationMessage {
for project in &projects {
let additional_text = if project.contains("ftb-quests") {
Some("Heracles")
Some(("Odyssey Quests", "lo90fZoB"))
} else if project.contains("ftb-ranks") || project.contains("ftb-essentials") {
Some("Prometheus")
Some(("Odyssey Roles", "iYcNKH7W"))
} else if project.contains("ftb-teams") {
Some("Argonauts")
Some(("Odyssey Guilds", "bb2EpKpx"))
} else if project.contains("ftb-chunks") {
Some("Cadmus")
Some(("Odyssey Claims", "fEWKxVzh"))
} else {
None
};
val.push_str(&if let Some(additional_text) = additional_text {
format!("- {project}(consider using [{additional_text}](https://modrinth.com/mod/{}) instead)\n", additional_text.to_lowercase())
format!("- {project} (consider using [{}](https://modrinth.com/project/{}) instead)\n", additional_text.0, additional_text.1)
} else {
format!("- {project}\n")
})

View File

@@ -71,7 +71,7 @@ async fn get_webhook_metadata(
url: format!(
"{}/organization/{}",
dotenvy::var("SITE_URL").unwrap_or_default(),
organization.slug
to_base62(organization.id.0 as u64)
),
icon_url: organization.icon_url,
});
@@ -97,7 +97,7 @@ async fn get_webhook_metadata(
url: format!(
"{}/user/{}",
dotenvy::var("SITE_URL").unwrap_or_default(),
user.username
to_base62(user.id.0 as u64)
),
name: user.username,
icon_url: user.avatar_url,
@@ -145,11 +145,7 @@ async fn get_webhook_metadata(
"{}/{}/{}",
dotenvy::var("SITE_URL").unwrap_or_default(),
project_type,
project
.inner
.slug
.clone()
.unwrap_or_else(|| to_base62(project.inner.id.0 as u64))
to_base62(project.inner.id.0 as u64)
),
project_title: project.inner.name,
project_summary: project.inner.summary,