diff --git a/src/components/specific/models/model-action-bar/ModelActionBar.scss b/src/components/specific/models/model-action-bar/ModelActionBar.scss new file mode 100644 index 000000000..f6735dc62 --- /dev/null +++ b/src/components/specific/models/model-action-bar/ModelActionBar.scss @@ -0,0 +1,6 @@ +.model-action-bar { + display: inline-flex; + gap: $spacing-unit; + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1); + background-color: $color-white; +} diff --git a/src/components/specific/models/model-action-bar/ModelActionBar.vue b/src/components/specific/models/model-action-bar/ModelActionBar.vue new file mode 100644 index 000000000..463db9dd2 --- /dev/null +++ b/src/components/specific/models/model-action-bar/ModelActionBar.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/src/components/specific/models/model-action-menu/ModelActionMenu.scss b/src/components/specific/models/model-action-menu/ModelActionMenu.scss index d34e45d8a..a03bf87e8 100644 --- a/src/components/specific/models/model-action-menu/ModelActionMenu.scss +++ b/src/components/specific/models/model-action-menu/ModelActionMenu.scss @@ -7,16 +7,29 @@ &__btn { color: $color-tertiary-dark; + + &--viewer { + color: $color-primary; + &:disabled { + opacity: 0.6; + } + } } &__container { position: absolute; - right: 32px + $spacing-unit; + z-index: 1; + top: 0; + right: 0; + display: flex; + flex-direction: column; width: 180px; padding: $spacing-unit/2 0; - border-radius: 4px; box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1); background-color: $color-white; - text-align: center; + + &__btn { + justify-content: flex-start; + } } } diff --git a/src/components/specific/models/model-action-menu/ModelActionMenu.vue b/src/components/specific/models/model-action-menu/ModelActionMenu.vue index c44b58d74..e89d64165 100644 --- a/src/components/specific/models/model-action-menu/ModelActionMenu.vue +++ b/src/components/specific/models/model-action-menu/ModelActionMenu.vue @@ -1,5 +1,27 @@ @@ -57,6 +59,7 @@ import { useI18n } from "vue-i18n"; import BIMDataCard from "@bimdata/design-system/dist/js/BIMDataComponents/vue3/BIMDataCard.js"; import BIMDataTabs from "@bimdata/design-system/dist/js/BIMDataComponents/vue3/BIMDataTabs.js"; import GenericTable from "@/components/generic/generic-table/GenericTable"; +import ModelActionBar from "@/components/specific/models/model-action-bar/ModelActionBar"; import ModelActionMenu from "@/components/specific/models/model-action-menu/ModelActionMenu"; import ModelStatusBadge from "@/components/specific/models/model-status-badge/ModelStatusBadge"; @@ -65,6 +68,7 @@ export default { BIMDataCard, BIMDataTabs, GenericTable, + ModelActionBar, ModelActionMenu, ModelStatusBadge }, @@ -179,13 +183,20 @@ export default { rows.value = models[currentTab.value]; }); + const selection = ref([]); + const setSelection = models => { + selection.value = models; + }; + return { // References columns, rows, + selection, tabs, // Methods - selectTab + selectTab, + setSelection }; } }; diff --git a/src/i18n/lang/en.js b/src/i18n/lang/en.js index 9d8093bd3..2ad7bc444 100644 --- a/src/i18n/lang/en.js +++ b/src/i18n/lang/en.js @@ -189,5 +189,17 @@ export default { }, GenericTable: { pagination: "{start} - {end} of {total}" + }, + ModelActionBar: { + delete: "Delete", + archive: "Archive", + download: "Download", + merge: "Merge" + }, + ModelActionMenu: { + buttonAddTags: "Add tags", + buttonRename: "Rename", + buttonArchive: "Archive", + buttonDelete: "Delete" } }; diff --git a/src/i18n/lang/fr.js b/src/i18n/lang/fr.js index e28169e92..3acff430d 100644 --- a/src/i18n/lang/fr.js +++ b/src/i18n/lang/fr.js @@ -192,5 +192,17 @@ export default { }, GenericTable: { pagination: "{start} - {end} sur {total}" + }, + ModelActionBar: { + delete: "Supprimer", + archive: "Archiver", + download: "Télécharger", + merge: "Fusionner" + }, + ModelActionMenu: { + buttonAddTags: "Ajouter des tags", + buttonRename: "Renommer", + buttonArchive: "Archiver", + buttonDelete: "Supprimer" } };