frontend: changed thumbnail to profile picture
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
/** @type {any} */
|
||||
const res = result;
|
||||
if (result.type === "success" || result.type === "redirect") {
|
||||
user.thumbnail = res.data.thumbnail;
|
||||
user.profile_picture = res.data.profile_picture;
|
||||
}
|
||||
await applyAction(result);
|
||||
};
|
||||
@@ -118,7 +118,7 @@
|
||||
<div class="hero-container">
|
||||
<div class="hero-logo">
|
||||
<img
|
||||
src={user.thumbnail ? user.thumbnail : Avatar}
|
||||
src={user.profile_picture ? user.profile_picture : Avatar}
|
||||
alt={`${user.first_name} ${user.last_name}`}
|
||||
width="200"
|
||||
/>
|
||||
@@ -195,13 +195,13 @@
|
||||
>
|
||||
<div class="current-avatar">
|
||||
<ImageInput
|
||||
avatar={user.thumbnail}
|
||||
fieldName="thumbnail"
|
||||
avatar={user.profile_picture}
|
||||
fieldName="profile_picture"
|
||||
title="Nutzerbild auswählen"
|
||||
/>
|
||||
</div>
|
||||
<div class="avatar-buttons">
|
||||
{#if !user.thumbnail}
|
||||
{#if !user.profile_picture}
|
||||
{#if isUploading}
|
||||
<SmallLoader width={30} message={"Uploading..."} />
|
||||
{:else}
|
||||
@@ -211,8 +211,8 @@
|
||||
<input
|
||||
type="hidden"
|
||||
hidden
|
||||
name="thumbnail_url"
|
||||
value={user.thumbnail}
|
||||
name="profile_picture_url"
|
||||
bind:value={user.profile_picture}
|
||||
required
|
||||
/>
|
||||
{#if isUploading}
|
||||
@@ -240,7 +240,7 @@
|
||||
<button
|
||||
class="avatar-option"
|
||||
on:click={() => {
|
||||
user.thumbnail = avatar.src;
|
||||
user.profile_picture = avatar.src;
|
||||
showAvatars = false;
|
||||
}}
|
||||
>
|
||||
@@ -279,7 +279,12 @@
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
<input type="hidden" hidden name="thumbnail" value={user.thumbnail} />
|
||||
<input
|
||||
type="hidden"
|
||||
hidden
|
||||
name="profile_picture"
|
||||
bind:value={user.profile_picture}
|
||||
/>
|
||||
|
||||
<div class="button-container">
|
||||
{#each TABS as tab}
|
||||
|
||||
Reference in New Issue
Block a user