Skip to content

Commit a2d72c9

Browse files
authored
Release 2025-10-24 (#3606)
2 parents 4929ead + a1a8791 commit a2d72c9

4 files changed

Lines changed: 66 additions & 24 deletions

File tree

.github/workflows/cd-packages.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
11
name: Publish packages
22

33
permissions:
4+
id-token: write # required for OIDC on npm
45
contents: write # needed to push tags
56

67
on:
78
push:
89
branches:
910
- main
11+
paths:
12+
- "packages/core/**"
13+
- "packages/libs/**"
14+
- "packages/sdk/typescript/human-protocol-sdk/**"
1015

1116
jobs:
1217
publish:
1318
name: Publish packages to NPM
1419
runs-on: ubuntu-latest
1520
steps:
1621
- uses: actions/checkout@v5
22+
with:
23+
token: ${{ secrets.GH_GITBOOK_TOKEN }}
1724
- uses: actions/setup-node@v4
1825
with:
1926
node-version-file: .nvmrc
2027
cache: yarn
28+
registry-url: "https://registry.npmjs.org"
29+
# Ensure npm 11.5.1 or later is installed to support OIDC
30+
- name: Update npm
31+
run: npm install -g npm@latest
2132
- name: Install dependencies
2233
run: yarn install --immutable
2334
# If there is no new version for dependency package (e.g. core)
@@ -31,7 +42,6 @@ jobs:
3142
run: yarn workspaces foreach --all --no-private -pt npm publish --tolerate-republish --json | tee publish.log
3243
env:
3344
SKIP_PREPACK: true
34-
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3545
- name: Tag published packages
3646
run: node scripts/tag-published-packages.mjs publish.log
3747
- name: Push created tags

packages/apps/human-app/frontend/src/modules/worker/jobs/components/report-abuse-modal.tsx

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import {
44
Box,
55
Button,
66
CircularProgress,
7+
FormControl,
8+
MenuItem,
9+
Select as MuiSelect,
710
Stack,
811
Typography,
9-
TextField,
1012
} from '@mui/material';
1113
import ErrorIcon from '@mui/icons-material/Error';
1214
import SuccessIcon from '@mui/icons-material/CheckCircle';
@@ -23,6 +25,20 @@ interface ReportAbuseModalProps {
2325

2426
const ABUSE_ERROR = 'Abuse has already been reported';
2527

28+
const REASON_OPTIONS = [
29+
'sexual_content',
30+
'nudity',
31+
'violence',
32+
'gore',
33+
'hate_or_racism',
34+
'drugs',
35+
'terrorism',
36+
'child_abuse',
37+
'self_harm',
38+
'weapons',
39+
'criminal_activity',
40+
] as const;
41+
2642
function ErrorState({ error }: { error: string }) {
2743
const { t } = useTranslation();
2844

@@ -101,11 +117,11 @@ export function ReportAbuseModal({
101117
const isIdleOrLoading = isIdle || isPending;
102118

103119
const handleReportAbuse = () => {
104-
reason.trim().length > 0 &&
120+
reason.length > 0 &&
105121
reportAbuseMutation({
106122
escrow_address: escrowAddress,
107123
chain_id: chainId,
108-
reason: reason.trim(),
124+
reason,
109125
});
110126
};
111127

@@ -120,27 +136,30 @@ export function ReportAbuseModal({
120136
{t('worker.reportAbuse.modalHeader')}
121137
</Typography>
122138
{isIdleOrLoading && (
123-
<Typography variant={isMobile ? 'body2' : 'body1'} textAlign="center">
124-
{t('worker.reportAbuse.modalParagraph')}
125-
</Typography>
139+
<>
140+
<Typography variant={isMobile ? 'body2' : 'body1'} textAlign="center">
141+
{t('worker.reportAbuse.modalParagraph')}
142+
</Typography>
143+
<FormControl fullWidth sx={{ my: { xs: 2, md: 3 } }}>
144+
<MuiSelect
145+
value={reason}
146+
displayEmpty
147+
onChange={(e) => {
148+
setReason(e.target.value);
149+
}}
150+
>
151+
{REASON_OPTIONS.map((value) => (
152+
<MenuItem key={value} value={value}>
153+
{t(`worker.reportAbuse.reasons.${value}`)}
154+
</MenuItem>
155+
))}
156+
</MuiSelect>
157+
</FormControl>
158+
</>
126159
)}
127160
{isPending && <CircularProgress size={40} sx={{ mx: 'auto', my: 7 }} />}
128161
{isError && <ErrorState error={error} />}
129162
{isSuccess && <SuccessState />}
130-
<TextField
131-
fullWidth
132-
multiline
133-
rows={3}
134-
label={t('worker.reportAbuse.modalReason')}
135-
value={reason}
136-
sx={{
137-
display: isIdle ? 'flex' : 'none',
138-
my: { xs: 4, md: 5 },
139-
}}
140-
onChange={(e) => {
141-
setReason(e.target.value);
142-
}}
143-
/>
144163
<Box display="flex" gap={2} width="100%">
145164
<Button
146165
fullWidth
@@ -156,7 +175,7 @@ export function ReportAbuseModal({
156175
fullWidth
157176
onClick={handleReportAbuse}
158177
variant="contained"
159-
disabled={!reason.trim() || isPending}
178+
disabled={!reason || isPending}
160179
sx={{ display: isIdleOrLoading ? 'flex' : 'none' }}
161180
>
162181
{isMobile

packages/apps/human-app/frontend/src/shared/i18n/en.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,20 @@
317317
"modalSuccessParagraph": "Your issue has been successfully reported. Our team has received the details and will review them shortly.",
318318
"modalHeaderAlreadyReportedError": "Report Already Submitted",
319319
"modalParagraphAlreadyReportedError": "This case of abuse has already been reported. Our team is currently reviewing it.",
320-
"modalUnknownError": "Something went wrong."
320+
"modalUnknownError": "Something went wrong.",
321+
"reasons": {
322+
"sexual_content": "Sexual content",
323+
"nudity": "Nudity",
324+
"violence": "Violence",
325+
"gore": "Gore",
326+
"hate_or_racism": "Hate or racism",
327+
"drugs": "Drugs",
328+
"terrorism": "Terrorism",
329+
"child_abuse": "Child abuse",
330+
"self_harm": "Self harm",
331+
"weapons": "Weapons",
332+
"criminal_activity": "Criminal activity"
333+
}
321334
}
322335
},
323336
"operator": {

packages/libs/logger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@human-protocol/logger",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Unified logging package for HUMAN Protocol",
55
"type": "commonjs",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)