Make abuse reports scrollable in small screen

This commit is contained in:
2023-11-04 16:57:04 +01:00
parent 611a905da7
commit aa1b24cd71
2 changed files with 38 additions and 34 deletions

View File

@@ -71,44 +71,46 @@ let set_status = async (action, report_type) => {
></iframe>
{/if}
</div>
<table>
<tr>
<td>Time</td>
<td>IP</td>
<td>Type</td>
<td>Status</td>
<td colspan="2">Reports from this IP</td>
</tr>
{#each report.reports as user_report}
<div class="table_scroll">
<table>
<tr>
<td>{formatDate(user_report.time, true, true, false)}</td>
<td>{user_report.ip_address}</td>
<td>{user_report.type}</td>
<td>{user_report.status}</td>
<td>{ip_report_count[user_report.ip_address]}</td>
<td>
{#if can_grant}
<button on:click={() => dispatch("resolve_by_ip", {ip: user_report.ip_address, action: "grant"})}>
Accept all
</button>
{/if}
{#if can_reject}
<button on:click={() => dispatch("resolve_by_ip", {ip: user_report.ip_address, action: "reject"})}>
Ignore all
</button>
{/if}
</td>
<td>Time</td>
<td>IP</td>
<td>Type</td>
<td>Status</td>
<td colspan="2">Reports from this IP</td>
</tr>
{#if user_report.description !== ""}
{#each report.reports as user_report}
<tr>
<td>Description</td>
<td colspan="4" style="white-space: pre;">
{user_report.description}
<td>{formatDate(user_report.time, true, true, false)}</td>
<td>{user_report.ip_address}</td>
<td>{user_report.type}</td>
<td>{user_report.status}</td>
<td>{ip_report_count[user_report.ip_address]}</td>
<td>
{#if can_grant}
<button on:click={() => dispatch("resolve_by_ip", {ip: user_report.ip_address, action: "grant"})}>
Accept all
</button>
{/if}
{#if can_reject}
<button on:click={() => dispatch("resolve_by_ip", {ip: user_report.ip_address, action: "reject"})}>
Ignore all
</button>
{/if}
</td>
</tr>
{/if}
{/each}
</table>
{#if user_report.description !== ""}
<tr>
<td>Description</td>
<td colspan="5" style="white-space: pre-wrap; word-wrap: break-word;">
{user_report.description}
</td>
</tr>
{/if}
{/each}
</table>
</div>
</div>
</Expandable>