Skip to content

Commit

Permalink
chore: Add danger variant to apps action button menus (#30214)
Browse files Browse the repository at this point in the history
  • Loading branch information
csuadev committed Sep 4, 2023
1 parent 9cd1649 commit 7dffec2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-glasses-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

chore: Add danger variant to apps action button menus
1 change: 1 addition & 0 deletions apps/meteor/client/hooks/useAppActionButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export const useMessageActionAppsActionButtons = (context?: MessageActionContext
label: Utilities.getI18nKeyForApp(action.labelI18n, action.appId),
order: 7,
type: 'apps',
variant: action.variant,
action: (_, params) => {
void actionManager.triggerActionButtonAction({
rid: params.message.rid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type RoomToolboxActionConfig = {
onClickBack?: () => void;
}>;
type?: 'organization' | 'communication' | 'customization' | 'apps';
variant?: 'danger';
};

export type RoomToolboxContextValue = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const useAppsRoomActions = () => {
(action): RoomToolboxActionConfig => ({
id: action.actionId,
icon: undefined,
variant: action.variant,
order: 300,
title: Utilities.getI18nKeyForApp(action.labelI18n, action.appId),
groups: ['group', 'channel', 'live', 'team', 'direct', 'direct_multiple'],
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"@rocket.chat/account-utils": "workspace:^",
"@rocket.chat/agenda": "workspace:^",
"@rocket.chat/api-client": "workspace:^",
"@rocket.chat/apps-engine": "1.41.0-alpha.305",
"@rocket.chat/apps-engine": "1.41.0-alpha.312",
"@rocket.chat/base64": "workspace:^",
"@rocket.chat/cas-validate": "workspace:^",
"@rocket.chat/core-services": "workspace:^",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7763,9 +7763,9 @@ __metadata:
languageName: node
linkType: hard

"@rocket.chat/apps-engine@npm:1.41.0-alpha.305":
version: 1.41.0-alpha.305
resolution: "@rocket.chat/apps-engine@npm:1.41.0-alpha.305"
"@rocket.chat/apps-engine@npm:1.41.0-alpha.312":
version: 1.41.0-alpha.312
resolution: "@rocket.chat/apps-engine@npm:1.41.0-alpha.312"
dependencies:
adm-zip: ^0.5.9
cryptiles: ^4.1.3
Expand All @@ -7777,7 +7777,7 @@ __metadata:
vm2: ^3.9.19
peerDependencies:
"@rocket.chat/ui-kit": "*"
checksum: 83ec73dac6e1f25722080cf32143ada914c4adb9aef8ebf770af13a5456cef1c81d1a9eedc4063549b8105277f2254d6c307c3c0c5f6ed7f99233a2d464bf6da
checksum: 003853d3c4d4374ab984474026e4ae657daf4591fe4c375b914aa57c27f576af0fcba66e70c539e056b5d80a1ef655775f6f3a07bf81a36ab6fd438ce464e70f
languageName: node
linkType: hard

Expand Down Expand Up @@ -8564,7 +8564,7 @@ __metadata:
"@rocket.chat/account-utils": "workspace:^"
"@rocket.chat/agenda": "workspace:^"
"@rocket.chat/api-client": "workspace:^"
"@rocket.chat/apps-engine": 1.41.0-alpha.305
"@rocket.chat/apps-engine": 1.41.0-alpha.312
"@rocket.chat/base64": "workspace:^"
"@rocket.chat/cas-validate": "workspace:^"
"@rocket.chat/core-services": "workspace:^"
Expand Down

0 comments on commit 7dffec2

Please sign in to comment.