diff --git a/.changeset/change_gcolor_gfont_gpronoun_to_scolor_sfont_spronoun_respectively.md b/.changeset/change_gcolor_gfont_gpronoun_to_scolor_sfont_spronoun_respectively.md new file mode 100644 index 00000000..5179ed1e --- /dev/null +++ b/.changeset/change_gcolor_gfont_gpronoun_to_scolor_sfont_spronoun_respectively.md @@ -0,0 +1,5 @@ +--- +sable: patch +--- + +Rename gcolor, gfont, and gpronoun commands to scolor, sfont, and spronoun respectively. diff --git a/src/app/features/common-settings/cosmetics/Cosmetics.tsx b/src/app/features/common-settings/cosmetics/Cosmetics.tsx index 46346854..70c4cacd 100644 --- a/src/app/features/common-settings/cosmetics/Cosmetics.tsx +++ b/src/app/features/common-settings/cosmetics/Cosmetics.tsx @@ -83,7 +83,7 @@ export function Cosmetics({ requestClose }: CosmeticsProps) { title={isSpace ? 'Space-Wide Colors' : 'Room Colors'} description={ isSpace - ? 'Allow everyone to use /gcolor in this space.' + ? 'Allow everyone to use /scolor in this space.' : 'Allow everyone to use /color in this room.' } after={ @@ -107,7 +107,7 @@ export function Cosmetics({ requestClose }: CosmeticsProps) { title={isSpace ? 'Space-Wide Fonts' : 'Room Fonts'} description={ isSpace - ? 'Allow everyone to use /gfont in this space.' + ? 'Allow everyone to use /sfont in this space.' : 'Allow everyone to use /font in this room.' } after={ @@ -131,7 +131,7 @@ export function Cosmetics({ requestClose }: CosmeticsProps) { title={isSpace ? 'Space-Wide Pronouns' : 'Room Pronouns'} description={ isSpace - ? 'Allow everyone to use /gpronoun in this space.' + ? 'Allow everyone to use /spronoun in this space.' : 'Allow everyone to use /pronoun in this room.' } after={ @@ -191,7 +191,7 @@ export function Cosmetics({ requestClose }: CosmeticsProps) { gap="400" > diff --git a/src/app/hooks/useCommands.ts b/src/app/hooks/useCommands.ts index ed2ad8cf..de830354 100644 --- a/src/app/hooks/useCommands.ts +++ b/src/app/hooks/useCommands.ts @@ -226,12 +226,12 @@ export enum Command { Acl = 'acl', // Sable commands Color = 'color', - GColor = 'gcolor', + SColor = 'scolor', Font = 'font', - GFont = 'gfont', + SFont = 'sfont', AddWidget = 'addwidget', Pronoun = 'pronoun', - GPronoun = 'gpronoun', + SPronoun = 'spronoun', Rainbow = 'rainbow', RawMsg = 'rawmsg', Raw = 'raw', @@ -665,10 +665,10 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => { } }, }, - [Command.GColor]: { - name: Command.GColor, + [Command.SColor]: { + name: Command.SColor, description: - 'Set your global color for the current Space. Example: /gcolor #ff00ff | /gcolor reset', + 'Set your color for the current Space. Example: /scolor #ff00ff | /scolor reset', exe: async (payload) => { const input = payload.trim().toLowerCase(); const userId = mx.getSafeUserId(); @@ -768,10 +768,9 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => { } }, }, - [Command.GFont]: { - name: Command.GFont, - description: - 'Set a global font for the current Space. Example: /gfont Courier New | /gfont reset', + [Command.SFont]: { + name: Command.SFont, + description: 'Set a font for the current Space. Example: /sfont Courier New | /sfont reset', exe: async (payload) => { const input = payload .trim() @@ -783,7 +782,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => { const localNotice = new MatrixEvent({ type: 'm.room.message', content: { msgtype: 'm.notice', body: msg }, - event_id: `~gfont-${Date.now()}`, + event_id: `~sfont-${Date.now()}`, room_id: room.roomId, sender: userId, }); @@ -939,10 +938,10 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => { } }, }, - [Command.GPronoun]: { - name: Command.GPronoun, + [Command.SPronoun]: { + name: Command.SPronoun, description: - 'Set your global pronouns for this space. Example: /gpronoun "en:they/them, de:sie/ihr" | /gpronoun reset', + 'Set your pronouns for this space. Example: /spronoun "en:they/them, de:sie/ihr" | /spronoun reset', exe: async (payload) => { const match = payload.trim().match(/^"(.*)"$/); const rawInput = match ? match[1].trim() : payload.trim();