5 Commits

Author SHA1 Message Date
hikari a074449d0f style: align client with NHCarrigan style guide
- Remove shared stylesheet stripping; let headers/index.js apply the
  witch palette, Griffy/Kalam fonts, and mystical backgrounds
- Replace custom CSS vars and Vampyr font with style guide tokens
- Update all component CSS to use witch palette variables
- Fix sanctions sort to descending by case number
- Update Hikari image URLs to cdn.nhcarrigan.com/hikari.png
2026-03-31 17:42:23 -07:00
hikari ee796b6e57 chore: commit naomiId entitlement config
Node.js CI / CI (pull_request) Successful in 43s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m6s
2026-03-23 15:25:12 -07:00
hikari b5d29025b3 refactor: replace entitledUsers owner gate with naomiId
Node.js CI / CI (pull_request) Failing after 1m5s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m48s
2026-03-23 15:08:37 -07:00
hikari 1c4bc9ca03 feat: add three optional content fields to announcement modal
Node.js CI / CI (pull_request) Successful in 1m41s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 2m0s
2026-03-23 15:06:08 -07:00
hikari 0db0d220cc fix: correct announcement API endpoint URL 2026-03-23 15:03:36 -07:00
8 changed files with 47 additions and 54 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ import {
TextInputBuilder,
TextInputStyle,
} from "discord.js";
import { adminUsers } from "../config/entitlements.js";
import { naomiId } from "../config/entitlements.js";
import { errorHandler } from "../utils/errorHandler.js";
import type { Command } from "../interfaces/command.js";
@@ -24,9 +24,9 @@ import type { Command } from "../interfaces/command.js";
// eslint-disable-next-line max-lines-per-function -- Modal requires many input components
export const announcement: Command = async(_hikari, interaction) => {
try {
if (!adminUsers.includes(interaction.user.id)) {
if (interaction.user.id !== naomiId) {
await interaction.reply({
content: "This command is restricted to administrators.",
content: "This command is restricted to the owner.",
ephemeral: true,
});
return;
+1 -7
View File
@@ -4,7 +4,6 @@
* @author Naomi Carrigan
*/
const naomiId = "465650873650118659";
const rhiaId = "1086567250145841252";
const entitledGuilds = [
"1354624415861833870",
@@ -12,9 +11,4 @@ const entitledGuilds = [
const entitledUsers = [ naomiId ];
/**
* User IDs allowed to run administrative commands.
*/
const adminUsers = [ naomiId, rhiaId ];
export { adminUsers, entitledGuilds, entitledUsers, naomiId };
export { entitledGuilds, entitledUsers, naomiId };
+1 -3
View File
@@ -15,9 +15,7 @@
<hr />
<a routerLink="/settings" class="nav-link">Settings</a>
<hr />
<a href="https://chat.nhcarrigan.com" target="_blank" class="nav-link">Chat</a>
<hr />
<a href="https://support.nhcarrigan.com" target="_blank" class="nav-link">Support</a>
<a routerLink="/chat" class="nav-link">Chat</a>
<hr />
</div>
<i class="fa-solid fa-bars" *ngIf="!navOpen" (click)="toggleNav()"></i>
+1 -3
View File
@@ -31,8 +31,6 @@ export class Sanctions {
private async loadSanctions(): Promise<void> {
const sanctions = await this.sanctionsService.getSanctions();
this.sanctions = sanctions.sort((a, b) => {
return b.number - a.number;
});
this.sanctions = sanctions.sort((a, b) => b.number - a.number);
}
}
+1 -1
View File
@@ -18,7 +18,7 @@
"@nhcarrigan/eslint-config": "5.2.0",
"@nhcarrigan/typescript-config": "4.0.0",
"eslint": "9.30.1",
"turbo": "2.8.12",
"turbo": "2.8.11",
"typescript": "5.8.3"
}
}
+29 -29
View File
@@ -18,8 +18,8 @@ importers:
specifier: 9.30.1
version: 9.30.1(jiti@2.4.2)
turbo:
specifier: 2.8.12
version: 2.8.12
specifier: 2.8.11
version: 2.8.11
typescript:
specifier: 5.8.3
version: 5.8.3
@@ -4618,38 +4618,38 @@ packages:
resolution: {integrity: sha512-3T3T04WzowbwV2FDiGXBbr81t64g1MUGGJRgT4x5o97N+8ArdhVCAF9IxFrxuSJmM3E5Asn7nKHkao0ibcZXAg==}
engines: {node: ^18.17.0 || >=20.5.0}
turbo-darwin-64@2.8.12:
resolution: {integrity: sha512-EiHJmW2MeQQx+21x8hjMHw/uPhXt9PIxvDrxzOtyVwrXzL0tQmsxtO4qHf2l7uA+K6PUJ4+TjY1MHZDuCvWXrw==}
turbo-darwin-64@2.8.11:
resolution: {integrity: sha512-XKaCWaz4OCt77oYYvGCIRpvYD4c/aNaKjRkUpv+e8rN3RZb+5Xsyew4yRO+gaHdMIUhQznXNXfHlhs+/p7lIhA==}
cpu: [x64]
os: [darwin]
turbo-darwin-arm64@2.8.12:
resolution: {integrity: sha512-cbqqGN0vd7ly2TeuaM8k9AK9u1CABO4kBA5KPSqovTiLL3sORccn/mZzJSbvQf0EsYRfU34MgW5FotfwW3kx8Q==}
turbo-darwin-arm64@2.8.11:
resolution: {integrity: sha512-VvynLHGUNvQ9k7GZjRPSsRcK4VkioTfFb7O7liAk4nHKjEcMdls7GqxzjVWgJiKz3hWmQGaP9hRa9UUnhVWCxA==}
cpu: [arm64]
os: [darwin]
turbo-linux-64@2.8.12:
resolution: {integrity: sha512-jXKw9j4r4q6s0goSXuKI3aKbQK2qiNeP25lGGEnq018TM6SWRW1CCpPMxyG91aCKrub7wDm/K45sGNT4ZFBcFQ==}
turbo-linux-64@2.8.11:
resolution: {integrity: sha512-cbSn37dcm+EmkQ7DD0euy7xV7o2el4GAOr1XujvkAyKjjNvQ+6QIUeDgQcwAx3D17zPpDvfDMJY2dLQadWnkmQ==}
cpu: [x64]
os: [linux]
turbo-linux-arm64@2.8.12:
resolution: {integrity: sha512-BRJCMdyXjyBoL0GYpvj9d2WNfMHwc3tKmJG5ATn2Efvil9LsiOsd/93/NxDqW0jACtHFNVOPnd/CBwXRPiRbwA==}
turbo-linux-arm64@2.8.11:
resolution: {integrity: sha512-+trymp2s2aBrhS04l6qFxcExzZ8ffndevuUB9c5RCeqsVpZeiWuGQlWNm5XjOmzoMayxRARZ5ma7yiWbGMiLqQ==}
cpu: [arm64]
os: [linux]
turbo-windows-64@2.8.12:
resolution: {integrity: sha512-vyFOlpFFzQFkikvSVhVkESEfzIopgs2J7J1rYvtSwSHQ4zmHxkC95Q8Kjkus8gg+8X2mZyP1GS5jirmaypGiPw==}
turbo-windows-64@2.8.11:
resolution: {integrity: sha512-3kJjFSM4yw1n9Uzmi+XkAUgCae19l/bH6RJ442xo7mnZm0tpOjo33F+FYHoSVpIWVMd0HG0LDccyafPSdylQbA==}
cpu: [x64]
os: [win32]
turbo-windows-arm64@2.8.12:
resolution: {integrity: sha512-9nRnlw5DF0LkJClkIws1evaIF36dmmMEO84J5Uj4oQ8C0QTHwlH7DNe5Kq2Jdmu8GXESCNDNuUYG8Cx6W/vm3g==}
turbo-windows-arm64@2.8.11:
resolution: {integrity: sha512-JOM4uF2vuLsJUvibdR6X9QqdZr6BhC6Nhlrw4LKFPsXZZI/9HHLoqAiYRpE4MuzIwldCH/jVySnWXrI1SKto0g==}
cpu: [arm64]
os: [win32]
turbo@2.8.12:
resolution: {integrity: sha512-auUAMLmi0eJhxDhQrxzvuhfEbICnVt0CTiYQYY8WyRJ5nwCDZxD0JG8bCSxT4nusI2CwJzmZAay5BfF6LmK7Hw==}
turbo@2.8.11:
resolution: {integrity: sha512-H+rwSHHPLoyPOSoHdmI1zY0zy0GGj1Dmr7SeJW+nZiWLz2nex8EJ+fkdVabxXFMNEux+aywI4Sae8EqhmnOv4A==}
hasBin: true
twitter-api-v2@1.28.0:
@@ -10192,32 +10192,32 @@ snapshots:
transitivePeerDependencies:
- supports-color
turbo-darwin-64@2.8.12:
turbo-darwin-64@2.8.11:
optional: true
turbo-darwin-arm64@2.8.12:
turbo-darwin-arm64@2.8.11:
optional: true
turbo-linux-64@2.8.12:
turbo-linux-64@2.8.11:
optional: true
turbo-linux-arm64@2.8.12:
turbo-linux-arm64@2.8.11:
optional: true
turbo-windows-64@2.8.12:
turbo-windows-64@2.8.11:
optional: true
turbo-windows-arm64@2.8.12:
turbo-windows-arm64@2.8.11:
optional: true
turbo@2.8.12:
turbo@2.8.11:
optionalDependencies:
turbo-darwin-64: 2.8.12
turbo-darwin-arm64: 2.8.12
turbo-linux-64: 2.8.12
turbo-linux-arm64: 2.8.12
turbo-windows-64: 2.8.12
turbo-windows-arm64: 2.8.12
turbo-darwin-64: 2.8.11
turbo-darwin-arm64: 2.8.11
turbo-linux-64: 2.8.11
turbo-linux-arm64: 2.8.11
turbo-windows-64: 2.8.11
turbo-windows-arm64: 2.8.11
twitter-api-v2@1.28.0: {}
+6 -6
View File
@@ -24,7 +24,7 @@ Platform-specific requirements:
- Include clear calls to action
- The same content will be used for Discord, Reddit, Ko-fi, and Patreon, so make it work well for all these platforms
**Threaded (for Twitter, Bluesky, and Mastodon):**
**Threaded (for Threads, Twitter, Bluesky, and Mastodon):**
- Break content into a thread of individual posts
- Each post should be under 280 characters (to work for Twitter's limit, which is the most restrictive)
- Posts should flow naturally from one to the next
@@ -32,14 +32,14 @@ Platform-specific requirements:
- Make the first post compelling to encourage thread reading
- Do NOT include post numbers or thread indicators (e.g., "1/5" or "đź§µ")
- Plain text format (no markdown)
- The same thread will be used for Twitter, Bluesky, and Mastodon
- The same thread will be used for Threads, Twitter, Bluesky, and Mastodon
**Plaintext (for LinkedIn and Facebook):**
**Plaintext (for LinkedIn, Facebook, and Peerlist):**
- Plain text format (no markdown)
- Professional yet friendly tone, conversational style suitable for a broader audience
- Include 3-5 relevant hashtags
- Keep it concise but informative
- The same content will be used for LinkedIn and Facebook
- The same content will be used for LinkedIn, Facebook, and Peerlist
**Universal requirements:**
- All announcements must include a call to action to donate (https://donate.nhcarrigan.com)
@@ -71,13 +71,13 @@ const announcementJsonSchema = {
type: "object",
},
plaintext: {
description: "Plain text announcement for LinkedIn and Facebook (shared content). Should be professional yet friendly, conversational style suitable for a broader audience. Include 3-5 relevant hashtags and calls to action for donating and joining Discord.",
description: "Plain text announcement for LinkedIn, Facebook, and Peerlist (shared content). Should be professional yet friendly, conversational style suitable for a broader audience. Include 3-5 relevant hashtags and calls to action for donating and joining Discord.",
maxLength: 1900,
minLength: 100,
type: "string",
},
threaded: {
description: "Array of individual posts that form a thread. Will be used for Twitter, Bluesky, and Mastodon. Each post should be under 280 characters (Twitter's limit) and flow naturally from one to the next.",
description: "Array of individual posts that form a thread. Will be used for Threads, Twitter, Bluesky, and Mastodon. Each post should be under 280 characters (Twitter's limit) and flow naturally from one to the next.",
items: {
description: "A single post in the thread (max 280 characters, no post numbers or thread indicators)",
maxLength: 280,
+5 -2
View File
@@ -12,6 +12,7 @@ import { announceOnDiscourse } from "../modules/announceOnDiscourse.js";
import { announceOnFacebook } from "../modules/announceOnFacebook.js";
import { announceOnMastodon } from "../modules/announceOnMastodon.js";
import { announceOnReddit } from "../modules/announceOnReddit.js";
import { announceOnThreads } from "../modules/announceOnThreads.js";
import { announceOnTwitter } from "../modules/announceOnTwitter.js";
import { generateAnnouncements } from "../modules/generateAnnouncements.js";
import { getIpFromRequest } from "../modules/getIpFromRequest.js";
@@ -115,6 +116,7 @@ export const announcementRoutes: FastifyPluginAsync = async(server) => {
blueskyResult,
twitterResult,
facebookResult,
threadsResult,
mastodonResult,
discourseResult,
] = await Promise.allSettled([
@@ -123,14 +125,15 @@ export const announcementRoutes: FastifyPluginAsync = async(server) => {
announceOnBluesky(threaded),
announceOnTwitter(threaded),
announceOnFacebook(plaintext),
announceOnThreads(threaded),
announceOnMastodon(threaded),
announceOnDiscourse(markdownTitle, markdownContent, type),
]);
return await reply.status(201).send({
alert: `Please remember to manually post to: LinkedIn, Ko-fi, and Patreon.`,
alert: `Please remember to manually post to: LinkedIn, Peerlist, Ko-fi, and Patreon.`,
cost: announcement.cost,
message: `Announcement processed. Discord: ${getPlatformResult(discordResult)}, Reddit: ${getPlatformResult(redditResult)}, Bluesky: ${getPlatformResult(blueskyResult)}, Twitter: ${getPlatformResult(twitterResult)}, Facebook: ${getPlatformResult(facebookResult)}, Mastodon: ${getPlatformResult(mastodonResult)}, Discourse: ${getPlatformResult(discourseResult)}`,
message: `Announcement processed. Discord: ${getPlatformResult(discordResult)}, Reddit: ${getPlatformResult(redditResult)}, Bluesky: ${getPlatformResult(blueskyResult)}, Twitter: ${getPlatformResult(twitterResult)}, Facebook: ${getPlatformResult(facebookResult)}, Threads: ${getPlatformResult(threadsResult)}, Mastodon: ${getPlatformResult(mastodonResult)}, Discourse: ${getPlatformResult(discourseResult)}`,
rawPost: announcement.response,
});
},