diff --git a/src/components/widgets/linking/openShareLinkModal.vue b/src/components/widgets/linking/openShareLinkModal.vue new file mode 100644 index 0000000..4cdedff --- /dev/null +++ b/src/components/widgets/linking/openShareLinkModal.vue @@ -0,0 +1,78 @@ + + + + \ No newline at end of file diff --git a/src/components/widgets/modals/UploadModal.vue b/src/components/widgets/modals/UploadModal.vue index 984ec5e..0303ee2 100644 --- a/src/components/widgets/modals/UploadModal.vue +++ b/src/components/widgets/modals/UploadModal.vue @@ -30,7 +30,11 @@
-

{{ modalContent.title }}

+
+

{{ modalContent.title }}

+ +

{{ modalContent.imgId }}


@@ -58,7 +62,10 @@ +
Copied to Clipboard
+ + \ No newline at end of file diff --git a/src/components/widgets/myscape/MyScapeGrid.vue b/src/components/widgets/myscape/MyScapeGrid.vue index 81680da..2151c60 100644 --- a/src/components/widgets/myscape/MyScapeGrid.vue +++ b/src/components/widgets/myscape/MyScapeGrid.vue @@ -7,7 +7,8 @@
-
+
@@ -21,8 +22,12 @@
- +
@@ -67,58 +72,65 @@ export default { this.fetchNewestImages(); this.setupScrollListener(); }, - - methods: { + + methods: { async fetchNewestImages() { - if (!this.hasMore || this.loading) return; - - this.loading = true; - - try { - const response = await axiosService.getUploadsFromUser(this.imageType, this.page, this.userid); - const newImages = response.uploads.map(image => ({ - ...image, - url: `${baseURL}/image/view/${image.imgId}?lowRes=true`, - })); - - this.images = [...this.images, ...newImages]; - this.page++; - this.loading = false; - - this.hasMore = newImages.length > 0; - - this.checkScrollEnd(); - } catch (error) { - console.error('Error fetching images:', error); - this.showInfoBox = true; - this.loading = false; - } - }, - checkScrollEnd() { - if (window.innerHeight + window.scrollY >= document.body.offsetHeight) { - this.fetchNewestImages(); - } - }, - openModal(image) { - this.modalId = image.imgId; - }, - findImageById(id) { - return this.images.find(image => image.imgId === id); - }, - setupScrollListener() { - window.addEventListener('scroll', () => { - this.checkScrollEnd(); - }); - }, - setType(type) { - this.imageType = type; - this.images = []; - this.page = 1; - this.hasMore = true; + if (!this.hasMore || this.loading) return; + + this.loading = true; + + try { + const response = await axiosService.getUploadsFromUser(this.imageType, this.page, this.userid); + const newImages = response.uploads.map(image => ({ + ...image, + url: `${baseURL}/image/view/${image.imgId}?lowRes=true`, + })); + + this.images = [...this.images, ...newImages]; + this.page++; + this.loading = false; + + this.hasMore = newImages.length > 0; + + this.checkScrollEnd(); + } catch (error) { + console.error('Error fetching images:', error); + this.showInfoBox = true; + this.loading = false; + } + }, + checkScrollEnd() { + if (window.innerHeight + window.scrollY >= document.body.offsetHeight) { this.fetchNewestImages(); - }, + } + }, + openModal(image) { + this.modalId = image.imgId; + }, + findImageById(id) { + return this.images.find(image => image.imgId === id); + }, + setupScrollListener() { + window.addEventListener('scroll', () => { + this.checkScrollEnd(); + }); }, - }; + setType(type) { + this.imageType = type; + this.images = []; + this.page = 1; + this.hasMore = true; + this.fetchNewestImages(); + }, + handleDeleteSuccess() { + this.modalId = null; + this.page = 1; + this.images = []; + this.hasMore = true; + this.fetchNewestImages(); + }, + }, +};