Remove unused IP ban system
This commit is contained in:
1 parent
38766bbca9
commit
4b9434ce0a
9 files changed
+97
-435
No files matched your search
@@ -0,0 +1,89 @@
|
||||
<script lang="ts">
|
||||
import { get_endpoint } from "lib/NovaAPI";
|
||||
import { user } from "lib/UserStore";
|
||||
import { onMount } from "svelte";
|
||||
import Expandable from "util/Expandable.svelte";
|
||||
import { formatDate } from "util/Formatting";
|
||||
|
||||
let offences = $state([]);
|
||||
|
||||
onMount(async () => {
|
||||
try {
|
||||
const resp = await fetch(get_endpoint()+"/user/bans");
|
||||
if(resp.status >= 400) {
|
||||
throw new Error(await resp.text());
|
||||
}
|
||||
offences = await resp.json()
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if offences.length > 0}
|
||||
<section>
|
||||
<Expandable click_expand>
|
||||
{#snippet header()}
|
||||
<div class="header red">
|
||||
Your account has been banned, click for details
|
||||
</div>
|
||||
{/snippet}
|
||||
<p>
|
||||
Your user account has been banned from uploading to
|
||||
Nova due to violation of the
|
||||
<a href="/abuse">content policy</a>. Below is a list of
|
||||
files originating from your account which have been blocked:
|
||||
</p>
|
||||
|
||||
<div class="table_scroll">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>File</td>
|
||||
<td>Reason</td>
|
||||
<td>Ban date</td>
|
||||
<td>Expiry date</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each offences as offence (offence.ban_time)}
|
||||
<tr>
|
||||
<td>
|
||||
{#if offence.file_link}
|
||||
<a href={offence.file_link} target="_blank" rel="noreferrer">
|
||||
{offence.file_name}
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{offence.reason}</td>
|
||||
<td>{formatDate(offence.ban_time, false, false, false)}</td>
|
||||
<td>{formatDate(offence.expire_time, false, false, false)}</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>
|
||||
If you would like to dispute your account ban you can mail me at
|
||||
support@nova.storage. Please do not mail unless you have a
|
||||
good reason. If you do not provide a valid reason why the ban
|
||||
should be reversed your e-mail will be ignored. And do not
|
||||
forget to put your username ({$user === null ? "" : $user.username}) in the
|
||||
e-mail.
|
||||
</p>
|
||||
</Expandable>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.red {
|
||||
background-color: rgba(255, 0, 0, 0.2);
|
||||
}
|
||||
</style>
|
||||
@@ -7,7 +7,7 @@ import CardSubscription from "./CardSubscription.svelte";
|
||||
import CardUsage from "./CardUsage.svelte";
|
||||
import CardActivity from "./CardActivity.svelte";
|
||||
import CardPrepaidTransactions from "./CardPrepaidTransactions.svelte";
|
||||
import AddressReputation from "home_page/AddressReputation.svelte";
|
||||
import AccountBans from "./AccountBans.svelte";
|
||||
import { flip } from "svelte/animate";
|
||||
|
||||
let cards = $state([])
|
||||
@@ -74,7 +74,7 @@ onMount(() => {
|
||||
id: "prepaid_transactions",
|
||||
elem: CardPrepaidTransactions,
|
||||
title: "Prepaid transactions",
|
||||
link: "/user/prepaid/transactions",
|
||||
link: "/user/subscription/transactions",
|
||||
}, {
|
||||
id: "usage",
|
||||
elem: CardUsage,
|
||||
@@ -121,7 +121,7 @@ onMount(() => {
|
||||
|
||||
<div class="separator"></div>
|
||||
|
||||
<AddressReputation/>
|
||||
<AccountBans/>
|
||||
|
||||
<div class="cards">
|
||||
{#each cards as card, i (card.id)}
|
||||
|
||||
Reference in new issue
Block a user