From 5729bb81f65a57f91c87ac47a83436175a958f4e Mon Sep 17 00:00:00 2001 From: Fornax Date: Sat, 24 Dec 2022 11:13:50 +0100 Subject: [PATCH] Add IP address reputation on home page --- svelte/src/admin_panel/IPBans.svelte | 2 +- svelte/src/home_page/AddressReputation.svelte | 77 +++++++++++++++++++ svelte/src/home_page/HomePage.svelte | 3 + 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 svelte/src/home_page/AddressReputation.svelte diff --git a/svelte/src/admin_panel/IPBans.svelte b/svelte/src/admin_panel/IPBans.svelte index 762bcae..ee7842a 100644 --- a/svelte/src/admin_panel/IPBans.svelte +++ b/svelte/src/admin_panel/IPBans.svelte @@ -162,7 +162,7 @@ onMount(get_bans); {formatDate(offence.expire_time, true, true, false)} {#if offence.file_public_id} - + {offence.file_name} {/if} diff --git a/svelte/src/home_page/AddressReputation.svelte b/svelte/src/home_page/AddressReputation.svelte new file mode 100644 index 0000000..3f1dbb0 --- /dev/null +++ b/svelte/src/home_page/AddressReputation.svelte @@ -0,0 +1,77 @@ + + +{#if result !== false && offences > 0} +
+ {#if result.banned === true} +

+ Your IP address ({result.address}) has been banned from + uploading to pixeldrain due to violation of the + content policy. Below is a + list of files originating from your IP address which have been + blocked: +

+ {:else if offences > 0} +

+ Your IP address ({result.address}) has received copyright + strikes. At 10 copyright strikes your IP address will be banned + and you will be unable to upload files to pixeldrain. Below is a + list of files originating from your IP address which have been + blocked: +

+ {/if} + +
+ + + + + + + + + {#each result.offences as offence (offence.ban_time)} + + + + + + + + {/each} +
ReasonReporterBan dateExpiry dateFile
{offence.reason}{offence.reporter}{formatDate(offence.ban_time, false, false, false)}{formatDate(offence.expire_time, false, false, false)} + {#if offence.file_public_id} + + {offence.file_name} + + {/if} +
+
+ +

+ If you would like to dispute your IP ban you can mail me at + support@pixeldrain.com. Please do not mail unless you have a good + reason. If you do not provide a valid reason why the IP ban should + be reversed your e-mail will be ignored. And do not forget to put + your IP address ({result.address}) in the e-mail. +

+
+{/if} diff --git a/svelte/src/home_page/HomePage.svelte b/svelte/src/home_page/HomePage.svelte index 9e267b7..462e152 100644 --- a/svelte/src/home_page/HomePage.svelte +++ b/svelte/src/home_page/HomePage.svelte @@ -1,5 +1,6 @@