Skip to content

Commit

Permalink
Fix: show unrestricted as total quota if applies (#9577)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan authored Aug 15, 2023
1 parent 8898f68 commit 98887c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ export default defineComponent({
return formatRelativeDateFromJSDate(new Date(date), currentLanguage)
}
const getTotalQuota = (space: SpaceResource) => {
if (space.spaceQuota.total === 0) {
return $gettext('Unrestricted')
}
return formatFileSize(space.spaceQuota.total, currentLanguage)
}
const getUsedQuota = (space: SpaceResource) => {
Expand Down
6 changes: 5 additions & 1 deletion packages/web-app-files/src/views/spaces/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default defineComponent({
const clientService = useClientService()
const { selectedResourcesIds } = useSelectedResources({ store })
const { can } = useAbility()
const { current: currentLanguage } = useGettext()
const { current: currentLanguage, $gettext } = useGettext()
const runtimeSpaces = computed((): SpaceResource[] => {
return store.getters['runtime/spaces/spaces'].filter((s) => isProjectSpaceResource(s)) || []
Expand Down Expand Up @@ -244,6 +244,10 @@ export default defineComponent({
}
const getTotalQuota = (space: SpaceResource) => {
if (space.spaceQuota.total === 0) {
return $gettext('Unrestricted')
}
return formatFileSize(space.spaceQuota.total, currentLanguage)
}
const getUsedQuota = (space: SpaceResource) => {
Expand Down

0 comments on commit 98887c7

Please sign in to comment.