From ffa50f075846cba68dc75cce5f4429631a0aee33 Mon Sep 17 00:00:00 2001 From: Jeremy Wharton Date: Wed, 16 Aug 2023 03:34:46 -0500 Subject: [PATCH] web/satellite/vuetify-poc: add bucket sharing option to buckets table This change allows buckets to be shared from the Buckets page through a dropdown menu in the buckets table. Resolves #6116 Change-Id: I92055a3ea174d786f2ef960124aafcbd3b2139c4 --- .../browser/galleryView/GalleryView.vue | 3 +- .../components/common/share/ShareButton.vue | 26 ++- .../common/share/ShareContainer.vue | 87 +------ .../components/modals/ObjectDetailsModal.vue | 8 +- .../src/components/modals/ShareModal.vue | 11 +- .../src/composables/useLinksharing.ts | 12 +- web/satellite/src/types/browser.ts | 87 +++++-- web/satellite/static/images/objects/email.svg | 3 - .../static/images/objects/facebook.svg | 3 - .../static/images/objects/hackerNews.svg | 3 - .../static/images/objects/linkedIn.svg | 3 - .../static/images/objects/reddit.svg | 3 - .../static/images/objects/telegram.svg | 3 - .../static/images/objects/twitter.svg | 3 - .../static/images/objects/whatsApp.svg | 3 - web/satellite/vite.config.js | 4 +- .../vuetify-poc/src/assets/icon-share.svg | 3 - .../src/components/BrowserTableComponent.vue | 4 +- .../src/components/BucketsDataTable.vue | 38 ++- .../src/components/dialogs/ShareDialog.vue | 217 ++++++++++++++++++ .../src/components/icons/IconShare.vue | 16 ++ .../src/components/icons/share/IconEmail.vue | 17 ++ .../components/icons/share/IconFacebook.vue | 16 ++ .../components/icons/share/IconHackerNews.vue | 16 ++ .../components/icons/share/IconLinkedIn.vue | 16 ++ .../src/components/icons/share/IconReddit.vue | 16 ++ .../components/icons/share/IconTelegram.vue | 16 ++ .../components/icons/share/IconTwitter.vue | 16 ++ .../components/icons/share/IconWhatsApp.vue | 16 ++ 29 files changed, 514 insertions(+), 155 deletions(-) delete mode 100644 web/satellite/static/images/objects/email.svg delete mode 100644 web/satellite/static/images/objects/facebook.svg delete mode 100644 web/satellite/static/images/objects/hackerNews.svg delete mode 100644 web/satellite/static/images/objects/linkedIn.svg delete mode 100644 web/satellite/static/images/objects/reddit.svg delete mode 100644 web/satellite/static/images/objects/telegram.svg delete mode 100644 web/satellite/static/images/objects/twitter.svg delete mode 100644 web/satellite/static/images/objects/whatsApp.svg delete mode 100644 web/satellite/vuetify-poc/src/assets/icon-share.svg create mode 100644 web/satellite/vuetify-poc/src/components/dialogs/ShareDialog.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/IconShare.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/share/IconEmail.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/share/IconFacebook.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/share/IconHackerNews.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/share/IconLinkedIn.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/share/IconReddit.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/share/IconTelegram.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/share/IconTwitter.vue create mode 100644 web/satellite/vuetify-poc/src/components/icons/share/IconWhatsApp.vue diff --git a/web/satellite/src/components/browser/galleryView/GalleryView.vue b/web/satellite/src/components/browser/galleryView/GalleryView.vue index 41e2f4e7d..39629818f 100644 --- a/web/satellite/src/components/browser/galleryView/GalleryView.vue +++ b/web/satellite/src/components/browser/galleryView/GalleryView.vue @@ -269,7 +269,8 @@ async function fetchPreviewAndMapUrl(): Promise { let url = ''; try { - url = await generateObjectPreviewAndMapURL(filePath.value); + url = await generateObjectPreviewAndMapURL( + bucketsStore.state.fileComponentBucketName, filePath.value); } catch (error) { error.message = `Unable to get file preview and map URL. ${error.message}`; notify.notifyError(error, AnalyticsErrorEventSource.GALLERY_VIEW); diff --git a/web/satellite/src/components/common/share/ShareButton.vue b/web/satellite/src/components/common/share/ShareButton.vue index 527b1e3ac..7a442434b 100644 --- a/web/satellite/src/components/common/share/ShareButton.vue +++ b/web/satellite/src/components/common/share/ShareButton.vue @@ -4,29 +4,39 @@ @@ -45,8 +55,6 @@ const style = computed((): Record => { font-family: 'font_regular', sans-serif; svg { - width: 12px; - height: 12px; margin-right: 5px; } } diff --git a/web/satellite/src/components/common/share/ShareContainer.vue b/web/satellite/src/components/common/share/ShareContainer.vue index 40e126b80..aaa67a466 100644 --- a/web/satellite/src/components/common/share/ShareContainer.vue +++ b/web/satellite/src/components/common/share/ShareContainer.vue @@ -4,97 +4,20 @@ diff --git a/web/satellite/vuetify-poc/src/components/icons/IconShare.vue b/web/satellite/vuetify-poc/src/components/icons/IconShare.vue new file mode 100644 index 000000000..3ab48ff38 --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/IconShare.vue @@ -0,0 +1,16 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + diff --git a/web/satellite/vuetify-poc/src/components/icons/share/IconEmail.vue b/web/satellite/vuetify-poc/src/components/icons/share/IconEmail.vue new file mode 100644 index 000000000..4fe26ded3 --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/share/IconEmail.vue @@ -0,0 +1,17 @@ + +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + diff --git a/web/satellite/vuetify-poc/src/components/icons/share/IconFacebook.vue b/web/satellite/vuetify-poc/src/components/icons/share/IconFacebook.vue new file mode 100644 index 000000000..c75ba8c5d --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/share/IconFacebook.vue @@ -0,0 +1,16 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + diff --git a/web/satellite/vuetify-poc/src/components/icons/share/IconHackerNews.vue b/web/satellite/vuetify-poc/src/components/icons/share/IconHackerNews.vue new file mode 100644 index 000000000..18a8bcb50 --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/share/IconHackerNews.vue @@ -0,0 +1,16 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + diff --git a/web/satellite/vuetify-poc/src/components/icons/share/IconLinkedIn.vue b/web/satellite/vuetify-poc/src/components/icons/share/IconLinkedIn.vue new file mode 100644 index 000000000..5d2ad09e3 --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/share/IconLinkedIn.vue @@ -0,0 +1,16 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + diff --git a/web/satellite/vuetify-poc/src/components/icons/share/IconReddit.vue b/web/satellite/vuetify-poc/src/components/icons/share/IconReddit.vue new file mode 100644 index 000000000..78af7d32f --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/share/IconReddit.vue @@ -0,0 +1,16 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + diff --git a/web/satellite/vuetify-poc/src/components/icons/share/IconTelegram.vue b/web/satellite/vuetify-poc/src/components/icons/share/IconTelegram.vue new file mode 100644 index 000000000..9abac1db8 --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/share/IconTelegram.vue @@ -0,0 +1,16 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + diff --git a/web/satellite/vuetify-poc/src/components/icons/share/IconTwitter.vue b/web/satellite/vuetify-poc/src/components/icons/share/IconTwitter.vue new file mode 100644 index 000000000..1b775f8dc --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/share/IconTwitter.vue @@ -0,0 +1,16 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + diff --git a/web/satellite/vuetify-poc/src/components/icons/share/IconWhatsApp.vue b/web/satellite/vuetify-poc/src/components/icons/share/IconWhatsApp.vue new file mode 100644 index 000000000..7e6f9b128 --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/icons/share/IconWhatsApp.vue @@ -0,0 +1,16 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + +