Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): release next to master #741

Merged
merged 4 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [2.34.0](https://github.com/dhis2/app-hub/compare/v2.33.1...v2.34.0) (2024-02-16)


### Features

* show version download count ([#739](https://github.com/dhis2/app-hub/issues/739)) ([1135152](https://github.com/dhis2/app-hub/commit/1135152227e31e83c0a65fdafaf2acbbafb3a272))

## [2.33.1](https://github.com/dhis2/app-hub/compare/v2.33.0...v2.33.1) (2024-02-14)


Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "2.33.1",
"version": "2.34.0",
"description": "The App Hub Client",
"repository": "https://github.com/dhis2/app-hub",
"author": "Birk Johansson <[email protected]>",
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/Versions/Versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { usePagination, useQuery } from 'src/api'

const { defaultAppChannel } = config.ui

const useChannels = appId => {
const useChannels = (appId) => {
const [availableChannels, setAvailableChannels] = useState([
defaultAppChannel,
])
Expand Down Expand Up @@ -38,7 +38,7 @@ const useChannels = appId => {
return { availableChannels, channelsFilter, setChannelsFilter }
}

const Versions = ({ appId, renderDeleteVersionButton }) => {
const Versions = ({ appId, renderDeleteVersionButton, showDownloadCount }) => {
const { availableChannels, channelsFilter, setChannelsFilter } =
useChannels(appId)

Expand Down Expand Up @@ -102,6 +102,7 @@ const Versions = ({ appId, renderDeleteVersionButton }) => {
<VersionsTable
versions={versions}
renderDeleteVersionButton={renderDeleteVersionButton}
showDownloadCount={showDownloadCount}
/>
) : (
<em className={styles.noVersions}>
Expand Down
20 changes: 16 additions & 4 deletions client/src/components/Versions/VersionsTable/VersionsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { renderDhisVersionsCompatibility } from 'src/lib/render-dhis-versions-co

const { appChannelToDisplayName } = config.ui

const useCreateGetDownloadUrl = url => {
const useCreateGetDownloadUrl = (url) => {
const [token, setToken] = useState()
const { getAccessTokenSilently } = useAuth0()

Expand All @@ -30,12 +30,16 @@ const useCreateGetDownloadUrl = url => {
}, [url, getAccessTokenSilently])

return useCallback(
url => (token ? url.concat(`?token=${token}`) : url),
(url) => (token ? url.concat(`?token=${token}`) : url),
[token]
)
}

const VersionsTable = ({ versions, renderDeleteVersionButton }) => {
const VersionsTable = ({
versions,
renderDeleteVersionButton,
showDownloadCount,
}) => {
const getDownloadUrl = useCreateGetDownloadUrl()

return (
Expand All @@ -46,11 +50,14 @@ const VersionsTable = ({ versions, renderDeleteVersionButton }) => {
<TableCellHead>Channel</TableCellHead>
<TableCellHead>DHIS2 version compatibility</TableCellHead>
<TableCellHead>Upload date</TableCellHead>
{showDownloadCount && (
<TableCellHead>Downloads</TableCellHead>
)}
<TableCellHead></TableCellHead>
</TableRowHead>
</TableHead>
<TableBody>
{versions.map(version => (
{versions.map((version) => (
<TableRow key={version.id}>
<TableCell>{version.version}</TableCell>
<TableCell className={styles.channelNameCell}>
Expand All @@ -69,6 +76,11 @@ const VersionsTable = ({ versions, renderDeleteVersionButton }) => {
).toLocaleDateString()}
</span>
</TableCell>
{showDownloadCount && (
<TableCell>
<span>{version.downloadCount}</span>
</TableCell>
)}
<TableCell>
<a
download
Expand Down
1 change: 1 addition & 0 deletions client/src/pages/UserApp/VersionsCard/VersionsCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const VersionsCard = ({ app, mutate }) => {
appId={app.id}
versions={versions}
renderDeleteVersionButton={renderDeleteVersionButton}
showDownloadCount={true}
/>
<Link
className={styles.newVersionButton}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true
},
"version": "2.33.1"
"version": "2.34.0"
}
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "server",
"version": "2.33.1",
"version": "2.34.0",
"description": "The App Hub Server",
"main": "src/main.js",
"repository": "https://github.com/dhis2/app-hub",
Expand Down
2 changes: 1 addition & 1 deletion tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tools",
"version": "2.33.1",
"version": "2.34.0",
"description": "",
"main": "clone.js",
"repository": "https://github.com/dhis2/app-hub",
Expand Down
Loading
Loading