From f131047f1af820ffbdfc9c585a219953856f920f Mon Sep 17 00:00:00 2001 From: Wilfred Asomani Date: Thu, 29 Jun 2023 13:12:00 +0000 Subject: [PATCH] web/satellite: match projects table with the designs This change updates the projects table on all projects dashboard to more closely match the designs. Change-Id: I547a83352fba8c3ad7958802db7b38b342b383e8 --- .../src/components/common/TableItem.vue | 35 +++- web/satellite/src/utils/objectIcon.ts | 1 + .../views/all-dashboard/AllDashboardArea.vue | 11 +- .../all-dashboard/components/MyProjects.vue | 15 +- .../components/ProjectTableInvitationItem.vue | 157 ++++++++++-------- .../components/ProjectTableItem.vue | 112 ++++++++++--- .../components/ProjectsTable.vue | 33 +++- 7 files changed, 252 insertions(+), 112 deletions(-) diff --git a/web/satellite/src/components/common/TableItem.vue b/web/satellite/src/components/common/TableItem.vue index eb4e65c44..e1f2449a2 100644 --- a/web/satellite/src/components/common/TableItem.vue +++ b/web/satellite/src/components/common/TableItem.vue @@ -14,8 +14,13 @@ v-for="(val, keyVal, index) in item" :key="index" class="align-left data" :class="{'overflow-visible': showBucketGuide(index)}" > -
-

{{ str }}

+
+
+ +
+
+

{{ str }}

+
@@ -83,17 +88,15 @@ const icon = computed((): string => ObjectType.findIcon(props.itemType)); const customIconClasses = computed(() => { const classes = {}; if (props.itemType === 'project') { - if (props.item['role'] === ProjectRole.Owner) { - classes['project-owner'] = true; - } else if (props.item['role'] === ProjectRole.Member) { - classes['project-member'] = true; - } + classes['project-owner'] = true; + } else if (props.itemType === 'shared-project') { + classes['project-member'] = true; } return classes; }); function isProjectRoleIconShown(role: ProjectRole) { - return props.itemType === 'project' || role === ProjectRole.Invited || role === ProjectRole.InviteExpired; + return props.itemType.includes('project') || role === ProjectRole.Invited || role === ProjectRole.InviteExpired; } function selectClicked(event: Event): void { @@ -204,11 +207,27 @@ function cellContentClicked(cellIndex: number, event: Event) { display: flex; flex-direction: column; + &__title { + text-overflow: ellipsis; + overflow: hidden; + } + &__subtitle { font-family: 'font_regular', sans-serif; font-size: 12px; line-height: 20px; color: var(--c-grey-6); + text-overflow: ellipsis; + overflow: hidden; + } + } + + .few-items-container { + display: flex; + align-items: center; + + @media screen and (width <= 370px) { + max-width: 9rem; } } diff --git a/web/satellite/src/utils/objectIcon.ts b/web/satellite/src/utils/objectIcon.ts index 1292e3bfc..23764c7be 100644 --- a/web/satellite/src/utils/objectIcon.ts +++ b/web/satellite/src/utils/objectIcon.ts @@ -33,6 +33,7 @@ export class ObjectType { ['text', TxtIcon], ['archive', ZipIcon], ['project', ProjectIcon], + ['shared-project', ProjectIcon], ]); static findIcon(type: string): string { diff --git a/web/satellite/src/views/all-dashboard/AllDashboardArea.vue b/web/satellite/src/views/all-dashboard/AllDashboardArea.vue index f902482a5..d3cb8e536 100644 --- a/web/satellite/src/views/all-dashboard/AllDashboardArea.vue +++ b/web/satellite/src/views/all-dashboard/AllDashboardArea.vue @@ -14,7 +14,7 @@ -
+
@@ -134,6 +134,10 @@ const sessionDuration = computed((): number => { return duration; }); +const isMyProjectsPage = computed((): boolean => { + return route.path === RouteConfig.AllProjectsDashboard.path; +}); + /** * Returns the session refresh interval from the store. */ @@ -565,6 +569,11 @@ onBeforeUnmount(() => { } } +.no-x-padding { + padding-left: 0 !important; + padding-right: 0 !important; +} + .all-dashboard { box-sizing: border-box; overflow-y: auto; diff --git a/web/satellite/src/views/all-dashboard/components/MyProjects.vue b/web/satellite/src/views/all-dashboard/components/MyProjects.vue index c17e2d451..ca2320e99 100644 --- a/web/satellite/src/views/all-dashboard/components/MyProjects.vue +++ b/web/satellite/src/views/all-dashboard/components/MyProjects.vue @@ -64,7 +64,10 @@ -
+
@@ -98,6 +101,7 @@ import { useProjectsStore } from '@/store/modules/projectsStore'; import { useConfigStore } from '@/store/modules/configStore'; import ProjectsTable from '@/views/all-dashboard/components/ProjectsTable.vue'; import AllProjectsDashboardBanners from '@/views/all-dashboard/components/AllProjectsDashboardBanners.vue'; +import { useResize } from '@/composables/resize'; import VButton from '@/components/common/VButton.vue'; import VChip from '@/components/common/VChip.vue'; @@ -113,6 +117,8 @@ const projectsStore = useProjectsStore(); const analytics = new AnalyticsHttpApi(); +const { isMobile } = useResize(); + const content = ref(null); const hasProjectTableViewConfigured = ref(appStore.hasProjectTableViewConfigured()); @@ -173,6 +179,7 @@ function onCreateProjectClicked(): void { display: flex; justify-content: space-between; align-items: center; + padding: 0 20px; @media screen and (width <= 500px) { margin-top: 20px; @@ -268,6 +275,10 @@ function onCreateProjectClicked(): void { } } + & :deep(.all-dashboard-banners) { + padding: 0 20px; + } + &__list { margin-top: 20px; @@ -276,7 +287,7 @@ function onCreateProjectClicked(): void { gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); - & :deep(.project-item) { + & :deep(.project-item), &:deep(.invite-item) { overflow: hidden; } diff --git a/web/satellite/src/views/all-dashboard/components/ProjectTableInvitationItem.vue b/web/satellite/src/views/all-dashboard/components/ProjectTableInvitationItem.vue index 19bf81d37..a86dfa57a 100644 --- a/web/satellite/src/views/all-dashboard/components/ProjectTableInvitationItem.vue +++ b/web/satellite/src/views/all-dashboard/components/ProjectTableInvitationItem.vue @@ -3,41 +3,43 @@