This commit is contained in:
setop 2024-07-03 17:59:29 +02:00
commit 3f3f5ce7d9
3 changed files with 14 additions and 7 deletions

View File

@ -34,7 +34,7 @@
"@apollo/client": "^3.3.16",
"@framasoft/socket": "^1.0.0",
"@framasoft/socket-apollo-link": "^1.0.0",
"@oruga-ui/oruga-next": "^0.8.10",
"@oruga-ui/oruga-next": "0.8.12",
"@oruga-ui/theme-oruga": "^0.2.0",
"@fullcalendar/core": "^6.1.10",
"@fullcalendar/daygrid": "^6.1.10",

View File

@ -1,7 +1,7 @@
<template>
<o-taginput
:modelValue="modelValueWithDisplayName"
@update:modelValue="(val: IActor[]) => $emit('update:modelValue', val)"
@update:modelValue="updateTags"
:data="availableActors"
:allow-autocomplete="true"
:allow-new="false"
@ -25,12 +25,16 @@ import { computed, ref } from "vue";
import ActorInline from "./ActorInline.vue";
import { useI18n } from "vue-i18n";
const props = defineProps<{
modelValue: IActor[];
const emit = defineEmits<{
"update:modelValue": [value: IActor[]];
}>();
defineEmits<{
"update:modelValue": [value: IActor[]];
const updateTags = (val: IActor[]) => {
emit("update:modelValue", val);
};
const props = defineProps<{
modelValue: IActor[];
}>();
const modelValue = computed(() => props.modelValue);

View File

@ -16,12 +16,15 @@ export const ACTOR_FRAGMENT = gql`
}
`;
// Do not request mediaSize here because mediaSize can only be accessed
// by user_himself/moderator/administrator (can_get_actor_size? in media.ex)
// - FETCH_PERSON is used by <NewConversation> and can be used by simple users here
// - FETCH_PERSON is also used in <EditIdentity> but mediaSize is not used there
export const FETCH_PERSON = gql`
query FetchPerson($username: String!) {
fetchPerson(preferredUsername: $username) {
...ActorFragment
suspended
mediaSize
avatar {
id
name