Merge branch 'fixes' into 'main'

Various front-end fixes

See merge request framasoft/mobilizon!1344
This commit is contained in:
Thomas Citharel 2022-11-29 07:56:27 +00:00
commit bce5d5a1c8
10 changed files with 22 additions and 13 deletions

View file

@ -53,7 +53,8 @@
v-html="comment.text"
dir="auto"
:lang="comment.language"
class="prose dark:prose-invert xl:prose-lg !max-w-full" :class="{ 'text-black dark:text-white': comment.isAnnouncement}"
class="prose dark:prose-invert xl:prose-lg !max-w-full"
:class="{ 'text-black dark:text-white': comment.isAnnouncement }"
/>
<div v-else>{{ t("[This comment has been deleted]") }}</div>
<nav class="flex gap-1 mt-1" v-if="!comment.deletedAt">

View file

@ -258,7 +258,7 @@ const asyncData = async (query: string): Promise<void> => {
searchAddress(undefined, {
query: searchQuery.value,
locale: locale.value,
locale: locale,
type: props.resultType,
});
};
@ -322,7 +322,7 @@ const reverseGeoCode = (e: LatLng, zoom: number) => {
latitude: e.lat,
longitude: e.lng,
zoom,
locale: locale.value as string,
locale: locale as unknown as string,
});
};

View file

@ -270,7 +270,7 @@ const joinEvent = async (): Promise<void> => {
actorId: anonymousActorId.value,
email: anonymousParticipation.email,
message: anonymousParticipation.message,
locale: locale.value,
locale: locale,
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
});
};

View file

@ -71,7 +71,7 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
const { loggedUser } = useUserSettings();
onMounted(() => {
updateLocale(locale.value as string);
updateLocale(locale as unknown as string);
doUpdateSetting({ timezone });
});

View file

@ -22,10 +22,10 @@ const { locale } = useI18n({ useScope: "global" });
const { result: configResult } = useQuery<{ config: IConfig }>(
PRIVACY,
() => ({
locale: locale.value,
locale: locale,
}),
() => ({
enabled: locale.value !== undefined,
enabled: locale !== undefined,
})
);

View file

@ -26,10 +26,10 @@ const { result: termsResult, loading: termsLoading } = useQuery<{
}>(
TERMS,
() => ({
locale: locale.value,
locale: locale,
}),
() => ({
enabled: locale.value !== undefined,
enabled: locale !== undefined,
})
);

View file

@ -36,7 +36,9 @@
v-if="type === 'ip'"
class="py-4 px-2 whitespace-nowrap"
>
<code>{{ value }}</code>
<code class="truncate block max-w-[15rem]">{{
value
}}</code>
</td>
<td
v-else-if="type === 'role'"

View file

@ -344,10 +344,12 @@ const participations = computed(
() => participationsResult.value?.person.participations?.elements ?? []
);
const { person } = usePersonStatusGroup(
const groupFederatedUsername = computed(() =>
usernameWithDomain(event.value?.attributedTo)
);
const { person } = usePersonStatusGroup(groupFederatedUsername);
const { eventCategories } = useEventCategories();
// metaInfo() {

View file

@ -662,7 +662,11 @@ import EmptyContent from "../../components/Utils/EmptyContent.vue";
import { Paginate } from "@/types/paginate";
import { IEvent } from "@/types/event.model";
import { IPost } from "@/types/post.model";
import { FOLLOW_GROUP, UNFOLLOW_GROUP, UPDATE_GROUP_FOLLOW } from "@/graphql/followers";
import {
FOLLOW_GROUP,
UNFOLLOW_GROUP,
UPDATE_GROUP_FOLLOW,
} from "@/graphql/followers";
import { useAnonymousReportsConfig } from "../../composition/apollo/config";
import { computed, defineAsyncComponent, inject, ref, watch } from "vue";
import { useCurrentActorClient } from "@/composition/apollo/actor";

View file

@ -295,7 +295,7 @@ onError((error) => {
const submit = async (): Promise<void> => {
sendingForm.value = true;
credentials.locale = locale.value as string;
credentials.locale = locale as unknown as string;
try {
emailErrors.value = [];
passwordErrors.value = [];