@@ -915,36 +915,42 @@ const toggleFollowNotify = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const reportGroup = async (content: string, forward: boolean) => {
|
||||
isReportModalActive.value = false;
|
||||
reportModalRef.value.close();
|
||||
const {
|
||||
mutate: createReportMutation,
|
||||
onError: onCreateReportError,
|
||||
onDone: onCreateReportDone,
|
||||
} = useCreateReport();
|
||||
|
||||
const {
|
||||
mutate: createReportMutation,
|
||||
onError: onCreateReportError,
|
||||
onDone: oneCreateReportDone,
|
||||
} = useCreateReport();
|
||||
const reportGroup = (content: string, forward: boolean) => {
|
||||
isReportModalActive.value = false;
|
||||
console.debug("report group", {
|
||||
reportedId: group.value?.id ?? "",
|
||||
content,
|
||||
forward,
|
||||
});
|
||||
|
||||
createReportMutation({
|
||||
reportedId: group.value?.id ?? "",
|
||||
content,
|
||||
forward,
|
||||
});
|
||||
|
||||
oneCreateReportDone(() => {
|
||||
notifier?.success(t("Group {groupTitle} reported", { groupTitle }));
|
||||
});
|
||||
|
||||
onCreateReportError((error: any) => {
|
||||
console.error(error);
|
||||
notifier?.error(
|
||||
t("Error while reporting group {groupTitle}", {
|
||||
groupTitle,
|
||||
})
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
onCreateReportDone(() => {
|
||||
notifier?.success(
|
||||
t("Group {groupTitle} reported", { groupTitle: groupTitle.value })
|
||||
);
|
||||
});
|
||||
|
||||
onCreateReportError((error: any) => {
|
||||
console.error(error);
|
||||
notifier?.error(
|
||||
t("Error while reporting group {groupTitle}", {
|
||||
groupTitle: groupTitle.value,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
const triggerShare = (): void => {
|
||||
if (navigator.share) {
|
||||
navigator
|
||||
@@ -1032,8 +1038,8 @@ const physicalAddress = computed((): Address | null => {
|
||||
return new Address(group.value?.physicalAddress);
|
||||
});
|
||||
|
||||
const ableToReport = computed((): boolean | undefined => {
|
||||
return anonymousReportsConfig.value?.allowed;
|
||||
const ableToReport = computed((): boolean => {
|
||||
return anonymousReportsConfig.value?.allowed === true;
|
||||
});
|
||||
|
||||
const organizedEvents = computed((): Paginate<IEvent> => {
|
||||
|
||||
Reference in New Issue
Block a user