Expandable fixes
This commit is contained in:
@@ -5,7 +5,6 @@ import { createEventDispatcher } from "svelte";
|
||||
let dispatch = createEventDispatcher()
|
||||
|
||||
export let report
|
||||
let expandable
|
||||
let preview = false
|
||||
|
||||
let set_status = async (action, report_type) => {
|
||||
@@ -31,8 +30,8 @@ let set_status = async (action, report_type) => {
|
||||
}
|
||||
</script>
|
||||
|
||||
<Expandable bind:this={expandable} expanded={report.status === "pending" && report.reports.length > 2}>
|
||||
<div slot="header" class="header" on:click={expandable.toggle}>
|
||||
<Expandable expanded={report.status === "pending" && report.reports.length > 2} click_expand>
|
||||
<div slot="header" class="header">
|
||||
<div class="icon_cell">
|
||||
<img class="file_icon" src={"/api/file/"+report.file.id+"/thumbnail"} alt="File thumbnail"/>
|
||||
</div>
|
||||
@@ -118,7 +117,7 @@ let set_status = async (action, report_type) => {
|
||||
}
|
||||
.stats {
|
||||
flex: 0 0 auto;
|
||||
padding: 3px 4px;
|
||||
padding: 0 4px;
|
||||
border-left: 1px solid var(--layer_3_color_border);
|
||||
text-align: center;
|
||||
}
|
||||
|
@@ -142,7 +142,7 @@ onMount(get_bans);
|
||||
{/if}
|
||||
|
||||
{#each rows as row (row.address)}
|
||||
<Expandable expanded={expanded}>
|
||||
<Expandable expanded={expanded} click_expand>
|
||||
<div slot="header" class="header">
|
||||
<div class="title">{row.address}</div>
|
||||
<div class="stats">
|
||||
@@ -153,7 +153,7 @@ onMount(get_bans);
|
||||
Date<br/>
|
||||
{formatDate(row.offences[0].ban_time, false, false, false)}
|
||||
</div>
|
||||
<button on:click|preventDefault={() => {delete_ban(row.address)}} class="button button_red" style="align-self: center;">
|
||||
<button on:click|stopPropagation={() => {delete_ban(row.address)}} class="button button_red" style="align-self: center;">
|
||||
<i class="icon">delete</i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -218,7 +218,7 @@ onMount(get_bans);
|
||||
}
|
||||
.stats {
|
||||
flex: 0 0 auto;
|
||||
padding: 3px 4px;
|
||||
padding: 0 4px;
|
||||
border-left: 1px solid var(--layer_3_color_border);
|
||||
text-align: center;
|
||||
}
|
||||
|
Reference in New Issue
Block a user