Discussions views improvements
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
afd164a449
commit
f3ac1f7ce1
@ -81,6 +81,7 @@
|
|||||||
newTitle = '';
|
newTitle = '';
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
outlined
|
||||||
icon-right="close"
|
icon-right="close"
|
||||||
:title="t('Cancel discussion title edition')"
|
:title="t('Cancel discussion title edition')"
|
||||||
/>
|
/>
|
||||||
@ -237,7 +238,7 @@ subscribeToMore({
|
|||||||
|
|
||||||
const discussion = computed(() => discussionResult.value?.discussion);
|
const discussion = computed(() => discussionResult.value?.discussion);
|
||||||
|
|
||||||
const { group } = useGroup(usernameWithDomain(discussion.value?.actor));
|
const group = computed(() => discussion.value?.actor);
|
||||||
|
|
||||||
const Editor = defineAsyncComponent(
|
const Editor = defineAsyncComponent(
|
||||||
() => import("@/components/TextEditor.vue")
|
() => import("@/components/TextEditor.vue")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
:links="[
|
:links="[
|
||||||
{
|
{
|
||||||
name: RouteName.MY_GROUPS,
|
name: RouteName.MY_GROUPS,
|
||||||
text: $t('My groups'),
|
text: t('My groups'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: RouteName.GROUP,
|
name: RouteName.GROUP,
|
||||||
@ -14,14 +14,15 @@
|
|||||||
{
|
{
|
||||||
name: RouteName.DISCUSSION_LIST,
|
name: RouteName.DISCUSSION_LIST,
|
||||||
params: { preferredUsername: usernameWithDomain(group) },
|
params: { preferredUsername: usernameWithDomain(group) },
|
||||||
text: $t('Discussions'),
|
text: t('Discussions'),
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
<section v-if="isCurrentActorAGroupMember">
|
<section v-if="isCurrentActorAGroupMember">
|
||||||
|
<h1>{{ t("Discussions") }}</h1>
|
||||||
<p>
|
<p>
|
||||||
{{
|
{{
|
||||||
$t(
|
t(
|
||||||
"Keep the entire conversation about a specific topic together on a single page."
|
"Keep the entire conversation about a specific topic together on a single page."
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
@ -32,7 +33,7 @@
|
|||||||
name: RouteName.CREATE_DISCUSSION,
|
name: RouteName.CREATE_DISCUSSION,
|
||||||
params: { preferredUsername },
|
params: { preferredUsername },
|
||||||
}"
|
}"
|
||||||
>{{ $t("New discussion") }}</o-button
|
>{{ t("New discussion") }}</o-button
|
||||||
>
|
>
|
||||||
<div v-if="group.discussions.elements.length > 0">
|
<div v-if="group.discussions.elements.length > 0">
|
||||||
<discussion-list-item
|
<discussion-list-item
|
||||||
@ -46,25 +47,25 @@
|
|||||||
:total="group.discussions.total"
|
:total="group.discussions.total"
|
||||||
v-model="page"
|
v-model="page"
|
||||||
:per-page="DISCUSSIONS_PER_PAGE"
|
:per-page="DISCUSSIONS_PER_PAGE"
|
||||||
:aria-next-label="$t('Next page')"
|
:aria-next-label="t('Next page')"
|
||||||
:aria-previous-label="$t('Previous page')"
|
:aria-previous-label="t('Previous page')"
|
||||||
:aria-page-label="$t('Page')"
|
:aria-page-label="t('Page')"
|
||||||
:aria-current-label="$t('Current page')"
|
:aria-current-label="t('Current page')"
|
||||||
>
|
>
|
||||||
</o-pagination>
|
</o-pagination>
|
||||||
</div>
|
</div>
|
||||||
<empty-content v-else icon="chat">
|
<empty-content v-else icon="chat">
|
||||||
{{ $t("There's no discussions yet") }}
|
{{ t("There's no discussions yet") }}
|
||||||
</empty-content>
|
</empty-content>
|
||||||
</section>
|
</section>
|
||||||
<section class="section" v-else-if="!groupLoading && !personLoading">
|
<section class="section" v-else-if="!groupLoading && !personLoading">
|
||||||
<empty-content icon="chat">
|
<empty-content icon="chat">
|
||||||
{{ $t("Only group members can access discussions") }}
|
{{ t("Only group members can access discussions") }}
|
||||||
<template #desc>
|
<template #desc>
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ name: RouteName.GROUP, params: { preferredUsername } }"
|
:to="{ name: RouteName.GROUP, params: { preferredUsername } }"
|
||||||
>
|
>
|
||||||
{{ $t("Return to the group page") }}
|
{{ t("Return to the group page") }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
</empty-content>
|
</empty-content>
|
||||||
|
Loading…
Reference in New Issue
Block a user