Skip to content

Commit 65e9867

Browse files
authored
Merge branch 'develop' into dependabot/npm_and_yarn/next-14.2.23
2 parents dcca58c + 1348cf4 commit 65e9867

File tree

6 files changed

+30
-12
lines changed

6 files changed

+30
-12
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.2.3] – 2025-02-26
11+
12+
### Changed
13+
- Names of some widgets and workset sections. [#85](https://github.com/htrc/torchlite-app/issues/85)
14+
- Max public or user workset size dropped to 400 volumes. [#78](https://github.com/htrc/torchlite-app/issues/78)
15+
16+
### Fixed
17+
- Error handling for unauthorized or non-existent workset, should now throw meaningful error [#146](https://github.com/htrc/torchlite-backend/issues/146)
18+
19+
## [0.2.2] – 2025-02-12
20+
1021
### Fixed
1122
- Fix widgets not getting displayed after user refresh token expires by signing out user. [#98](https://github.com/htrc/torchlite-frontend/issues/98)
1223

@@ -37,7 +48,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3748
- This CHANGELOG file.
3849
- Share button and popup [#61](https://github.com/htrc/torchlite-app/issues/61)
3950

40-
[unreleased]: https://github.com/htrc/torchlite-frontend/compare/0.2.1...HEAD
51+
[unreleased]: https://github.com/htrc/torchlite-frontend/compare/0.2.3...HEAD
52+
[0.2.3]: https://github.com/htrc/torchlite-frontend/compare/0.2.2...0.2.3
53+
[0.2.2]: https://github.com/htrc/torchlite-frontend/compare/0.2.1...0.2.2
4154
[0.2.1]: https://github.com/htrc/torchlite-frontend/compare/0.2.0...0.2.1
4255
[0.2.0]: https://github.com/htrc/torchlite-frontend/compare/0.1.0...0.2.0
4356
[0.1.0]: https://github.com/htrc/torchlite-frontend/releases/tag/0.1.0

src/contexts/AppContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ function AppProvider({ children }: AppProviderProps) {
5656
// Get worksets
5757
let worksets: WorksetList = await getAvailableWorksets();
5858
if (worksets?.public) {
59-
worksets.public = worksets.public.filter((workset) => workset.numVolumes < 1000)
59+
worksets.public = worksets.public.filter((workset) => workset.numVolumes < 400)
6060
}
6161
if (worksets?.user) {
62-
worksets.user = worksets.user.filter((workset) => workset.numVolumes < 1000)
62+
worksets.user = worksets.user.filter((workset) => workset.numVolumes < 400)
6363
}
6464
setAvailableWorksets(worksets);
6565

src/data/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ export const WidgetInfoLinks: any = {
1919
};
2020

2121
export const WidgetTitles: any = {
22-
MappingContributorData: 'Mapping Contributor Data',
22+
MappingContributorData: 'Mapping Creator Birthplaces',
2323
PublicationDateTimeline: 'Publication Date Timeline',
24-
Summary: 'Summary',
25-
SimpleTagCloud: 'Simple Word Cloud'
24+
Summary: 'Workset Summary',
25+
SimpleTagCloud: 'Word Frequency Cloud'
2626
};
2727

2828
export const TableColumns: any = {

src/layout/MainLayout/SideBar/WorksetWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const WorksetWidget = () => {
8181
<Stack sx={{ margin: theme.spacing(1) }} spacing={2}>
8282
<FormControl sx={{ minWidth: 120 }}>
8383
<Select value={type} color="secondary" onChange={handleChange}>
84-
<MenuItem value={'featured'}>Recommended Worksets</MenuItem>
84+
<MenuItem value={'featured'}>Featured Worksets</MenuItem>
8585
<MenuItem value={'public'}>All Worksets</MenuItem>
8686
{availableWorksets?.user?.length ? <MenuItem value={'user'}>My Worksets</MenuItem> : <></>}
8787
</Select>

src/pages/api/dashboards/[id]/index.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,16 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
5151
if (isValidBody<DashboardStatePatch>(req.body, DashboardStatePatchSchema)) {
5252
await patchDashboard(dashboardId, req.body, headers);
5353
res.status(204).end();
54-
} else return res.status(400).end();
54+
}
5555
break;
5656
}
57-
} catch (err) {
58-
console.error(err);
59-
res.status(500).json({ message: 'Internal server error' });
57+
} catch (err: any) {
58+
console.log(err);
59+
if (err.status == 400) {
60+
res.status(400).end();
61+
}
62+
else {
63+
res.status(500).json({ message: 'Internal server error' });
64+
}
6065
}
6166
}

src/utils/axios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ axiosServices.interceptors.response.use(
2828
})
2929
);
3030
}
31-
return Promise.reject((error.response && error.response.data) || 'Wrong Services');
31+
return Promise.reject((error.response && {data: error.response.data, status: error.response.status}) || 'Wrong Services');
3232
}
3333
);
3434

0 commit comments

Comments
 (0)