Added profile pictures
This commit is contained in:
parent
908055a85b
commit
06fedb4387
6 changed files with 108 additions and 36 deletions
|
@ -30,6 +30,7 @@
|
|||
#header {
|
||||
border-bottom: var(--dark-2) solid 2px;
|
||||
width: calc(100% - 30px);
|
||||
|
||||
}
|
||||
|
||||
#main {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import Button from '$lib/components/Button.svelte';
|
||||
|
||||
export let form;
|
||||
export let form, apiUrl, type;
|
||||
|
||||
let fileInput;
|
||||
let files;
|
||||
|
@ -41,7 +41,7 @@
|
|||
fData.append('last',i == (images.length - 1));
|
||||
fData.append('id',rId);
|
||||
|
||||
form = await fetch(`/api/fileCreate`, {
|
||||
form = await fetch(apiUrl || `/api/fileCreate`, {
|
||||
method: 'POST',
|
||||
body: fData,
|
||||
}).then(x => x.json());
|
||||
|
@ -62,9 +62,13 @@
|
|||
img {
|
||||
max-width: 250px;
|
||||
}
|
||||
|
||||
.small img {
|
||||
max-width: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<form action='#' method='GET' >
|
||||
<form action='#' method='GET' class='{type || ''}' >
|
||||
{#if preview}
|
||||
<img src={preview} alt="Image preview"/>
|
||||
{:else}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue