Skip to content

Commit

Permalink
#2490: added support for multiple project cards per row instead of th…
Browse files Browse the repository at this point in the history
…e legacy table
  • Loading branch information
sudo-may committed Jun 11, 2024
1 parent dbd2702 commit 82b6ba9
Show file tree
Hide file tree
Showing 11 changed files with 286 additions and 798 deletions.
4 changes: 2 additions & 2 deletions dashboard-prime/src/common-components/stores/UseAppConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const useAppConfig = defineStore('dashboardAppConfig', () => {
const expireUnusedProjectsOlderThan = computed(() => config.value.expireUnusedProjectsOlderThan)
const minimumProjectPoints = computed(() => config.value.minimumProjectPoints)
const maxProjectsPerAdmin = computed(() => config.value.maxProjectsPerAdmin)
const numProjectsForTableView = computed(() => config.value.numProjectsForTableView)
const minimumSubjectPoints = computed(() => config.value.minimumSubjectPoints)
const maxSubjectsPerProject = computed(() => config.value.maxSubjectsPerProject)
const userCommunityBeforeLabel = computed(() => config.value.userCommunityBeforeLabel || '')
Expand Down Expand Up @@ -123,6 +122,7 @@ export const useAppConfig = defineStore('dashboardAppConfig', () => {
const minUsernameLength = computed(() => config.value.minUsernameLength)
const minPasswordLength = computed(() => config.value.minPasswordLength)
const maxPasswordLength = computed(() => config.value.maxPasswordLength)
const numProjectsToStartShowingAsCards = computed(() => config.value.numProjectsToStartShowingAsCards)
return {
loadConfigState,
refreshConfig,
Expand Down Expand Up @@ -166,7 +166,6 @@ export const useAppConfig = defineStore('dashboardAppConfig', () => {
expireUnusedProjectsOlderThan,
minimumProjectPoints,
maxProjectsPerAdmin,
numProjectsForTableView,
minimumSubjectPoints,
maxSubjectsPerProject,
userCommunityBeforeLabel,
Expand Down Expand Up @@ -204,5 +203,6 @@ export const useAppConfig = defineStore('dashboardAppConfig', () => {
minUsernameLength,
minPasswordLength,
maxPasswordLength,
numProjectsToStartShowingAsCards,
}
})
10 changes: 7 additions & 3 deletions dashboard-prime/src/components/projects/MyProject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ import { useAppConfig } from '@/common-components/stores/UseAppConfig.js'
import ReminderMessage from '@/components/utils/misc/ReminderMessage.vue'
import { useNumberFormat } from '@/common-components/filter/UseNumberFormat.js'
import ProjectExpirationWarning from '@/components/projects/ProjectExpirationWarning.vue'
import { useAdminProjectsState } from '@/stores/UseAdminProjectsState.js'
const props = defineProps(['project', 'disableSortControl'])
const appConfig = useAppConfig()
const accessState = useAccessState()
const emit = defineEmits(['project-deleted', 'copy-project', 'pin-removed', 'sort-changed-requested'])
const numberFormat = useNumberFormat()
const projectsState = useAdminProjectsState()
const announcer = useSkillsAnnouncer()
// data items
Expand Down Expand Up @@ -169,7 +171,11 @@ defineExpose({
<div data-cy="projectCard" class="h-100">
<Card :data-cy="`projectCard_${projectInternal.projectId}`" class="relative">
<template #content>
<div class="flex flex-wrap">
<div class="flex flex-wrap"
:class="{
'flex-column gap-1 justify-content-left': projectsState.shouldTileProjectsCards,
'': !projectsState.shouldTileProjectsCards
}">
<div class="text-truncate">
<router-link
:to="{ name:'Subjects', params: { projectId: projectInternal.projectId }}"
Expand Down Expand Up @@ -317,8 +323,6 @@ defineExpose({
}
.sort-control:hover, .sort-control i:hover {
cursor: grab !important;
color: $info !important;
font-size: 1.5rem;
}
</style>
Loading

0 comments on commit 82b6ba9

Please sign in to comment.