Using actors avatars table for secondary profile photos.

This commit is contained in:
2024-10-26 01:03:30 +02:00
parent 6b5aa9505e
commit a6af10ee20
5 changed files with 40 additions and 19 deletions

View File

@@ -748,14 +748,12 @@ const bustSizes = {
bustSizes.uk = bustSizes.us;
bustSizes.jp = bustSizes.eu;
const avatars = Object.values(Object.fromEntries(actor.value.profiles.filter((profile) => !!profile.avatar).map((profile) => [profile.avatar.id, profile.avatar])));
const fields = computed(() => [
...(avatars.length > 0 ? [{
...(actor.value.photos.length > 0 ? [{
key: 'avatar',
type: 'avatar',
value: actor.value.avatar?.id,
options: avatars,
options: actor.value.photos,
}] : []),
...(user.role === 'admin'
? [{
@@ -1010,6 +1008,7 @@ async function submit() {
align-items: center;
padding: .25rem 1rem;
margin-bottom: .25rem;
overflow: hidden;
&.inline {
display: inline-flex;
@@ -1049,6 +1048,7 @@ async function submit() {
display: flex;
align-items: center;
flex-grow: 1;
overflow: hidden;
.input {
flex-grow: 1;
@@ -1140,6 +1140,7 @@ async function submit() {
}
.avatars {
width: 100%;
display: flex;
gap: .25rem;
padding-bottom: .5rem;