Skip to content

Commit 02f795f

Browse files
committed
Update AI requests wording
1 parent 6e64d85 commit 02f795f

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

newIDE/app/src/MainFrame/EditorContainers/AskAi/AiRequestChat.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,19 @@ export const AiRequestChat = React.forwardRef<Props, AiRequestChatInterface>(
188188
)
189189
}
190190
recommendedPlanIdIfNoSubscription="gdevelop_gold"
191+
canHide
191192
>
192193
<Line>
193194
<Column noMargin>
194195
<Text noMargin>
195196
{increaseQuotaOffering === 'subscribe' ? (
196197
<Trans>
197-
Get more free AI requests with a GDevelop premium plan.
198+
Unlock AI requests included with a GDevelop premium plan.
198199
</Trans>
199200
) : (
200201
<Trans>
201-
Upgrade to another premium plan to get more free AI
202-
requests.
202+
Get even more AI requests included with a higher premium
203+
plan.
203204
</Trans>
204205
)}
205206
</Text>

newIDE/app/src/Profile/Subscription/GetSubscriptionCard.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ import CrownShining from '../../UI/CustomSvgIcons/CrownShining';
1414
import { useResponsiveWindowSize } from '../../UI/Responsive/ResponsiveWindowMeasurer';
1515
import AuthenticatedUserContext from '../AuthenticatedUserContext';
1616
import { hasValidSubscriptionPlan } from '../../Utils/GDevelopServices/Usage';
17+
import IconButton from '../../UI/IconButton';
18+
import Cross from '../../UI/CustomSvgIcons/Cross';
1719

1820
const styles = {
21+
topRightHideButton: { position: 'absolute', right: 1, top: 1 },
1922
paper: {
2023
zIndex: 2, // Make sure the paper is above the background for the border effect.
2124
flex: 1,
@@ -49,6 +52,7 @@ type Props = {|
4952
| 'gdevelop_gold'
5053
| 'gdevelop_startup'
5154
| 'gdevelop_education',
55+
canHide?: boolean,
5256
|};
5357

5458
const GetSubscriptionCard = ({
@@ -61,7 +65,9 @@ const GetSubscriptionCard = ({
6165
forceColumnLayout,
6266
filter,
6367
recommendedPlanIdIfNoSubscription,
68+
canHide,
6469
}: Props) => {
70+
const [isHidden, setIsHidden] = React.useState(false);
6571
const { subscription } = React.useContext(AuthenticatedUserContext);
6672
const actualPlanIdToRecommend = hasValidSubscriptionPlan(subscription)
6773
? // If the user already has a subscription, show the original subscription dialog.
@@ -72,6 +78,9 @@ const GetSubscriptionCard = ({
7278
);
7379
const { isMobile } = useResponsiveWindowSize();
7480
const columnLayout = forceColumnLayout || isMobile;
81+
82+
if (isHidden) return null;
83+
7584
return (
7685
<div className={classes.premiumContainer}>
7786
<Paper style={styles.paper} background="medium">
@@ -117,6 +126,19 @@ const GetSubscriptionCard = ({
117126
</ResponsiveLineStackLayout>
118127
</Column>
119128
</Line>
129+
{canHide && (
130+
<div style={styles.topRightHideButton}>
131+
<IconButton
132+
aria-label="hide"
133+
onClick={() => {
134+
setIsHidden(true);
135+
}}
136+
size="small"
137+
>
138+
<Cross fontSize="small" />
139+
</IconButton>
140+
</div>
141+
)}
120142
</Paper>
121143
</div>
122144
);

0 commit comments

Comments
 (0)