From 0d3b4bc2256767330572bce860dfb32e8be061bd Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 13 May 2023 05:39:47 -0600 Subject: [PATCH] Update Notification components, add autospam notification support --- resources/assets/components/Notifications.vue | 585 ++++++++++++++++++ .../components/sections/Notifications.vue | 31 + 2 files changed, 616 insertions(+) create mode 100644 resources/assets/components/Notifications.vue diff --git a/resources/assets/components/Notifications.vue b/resources/assets/components/Notifications.vue new file mode 100644 index 000000000..e3af689a8 --- /dev/null +++ b/resources/assets/components/Notifications.vue @@ -0,0 +1,585 @@ + + + + + diff --git a/resources/assets/components/sections/Notifications.vue b/resources/assets/components/sections/Notifications.vue index 276bac037..c1dfc9999 100644 --- a/resources/assets/components/sections/Notifications.vue +++ b/resources/assets/components/sections/Notifications.vue @@ -37,6 +37,15 @@
+

+
+

+ Your recent post has been unlisted. +

+

+ Click here for more info. +

+

{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}} commented on your post. @@ -383,6 +400,20 @@ } }) }, + + showAutospamInfo(status) { + let el = document.createElement('p'); + el.classList.add('text-left'); + el.classList.add('mb-0'); + el.innerHTML = '

We use automated systems to help detect potential abuse and spam. Your recent post was flagged for review.

Don\'t worry! Your post will be reviewed by a human, and they will restore your post if they determine it appropriate.

Once a human approves your post, any posts you create after will not be marked as unlisted. If you delete this post and share more posts before a human can approve any of them, you will need to wait for at least one unlisted post to be reviewed by a human.'; + let wrapper = document.createElement('div'); + wrapper.appendChild(el); + swal({ + title: 'Why was my post unlisted?', + content: wrapper, + icon: 'warning' + }) + } } }