Make abuse reports scrollable in small screen
This commit is contained in:
@@ -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>
|
||||
|
||||
|
@@ -139,7 +139,7 @@ const remove_report = (id = "") => {
|
||||
|
||||
// If a refresh is already scheduled we remove it and schedule a new one
|
||||
clearTimeout(refresh_timeout)
|
||||
refresh_timeout = setTimeout(get_reports, 5000)
|
||||
refresh_timeout = setTimeout(get_reports, 10000)
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
@@ -151,6 +151,8 @@ onMount(() => {
|
||||
endPicker.valueAsNumber = end.getTime()
|
||||
|
||||
get_reports()
|
||||
|
||||
return () => clearTimeout(refresh_timeout)
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user