diff --git a/js/src/common.scss b/js/src/common.scss index db448b2f5..f739115fc 100644 --- a/js/src/common.scss +++ b/js/src/common.scss @@ -1,24 +1,14 @@ +@import "variables.scss"; + a { + color: $violet-2; +} + +a.out, +.content a { text-decoration: underline; text-decoration-color: #ed8d07; text-decoration-thickness: 2px; - - &.navbar-item, - &.dropdown-item, - &.card, - &.button, - &[href="#comments"], - &.router-link-active, - &.comment-link, - &.pagination-link, - &.datepicker-cell, - &.list-item { - text-decoration: none; - } -} - -nav.breadcrumb ul li a { - text-decoration: none; } input.input { diff --git a/js/src/components/Discussion/DiscussionListItem.vue b/js/src/components/Discussion/DiscussionListItem.vue index 280704893..ab6bc2938 100644 --- a/js/src/components/Discussion/DiscussionListItem.vue +++ b/js/src/components/Discussion/DiscussionListItem.vue @@ -15,8 +15,8 @@

{{ discussion.title }}

- - {{ $timeAgo.format(new Date(discussion.updatedAt), "twitter") || $t("Right now") }} + {{ $timeAgo.format(new Date(actualDate), "twitter") || $t("Right now") }}
@@ -46,6 +46,13 @@ export default class DiscussionListItem extends Vue { } return element.innerText; } + + get actualDate() { + if (this.discussion.updatedAt === this.discussion.insertedAt && this.discussion.lastComment) { + return this.discussion.lastComment.publishedAt; + } + return this.discussion.updatedAt; + } } diff --git a/js/src/views/Admin/AdminProfile.vue b/js/src/views/Admin/AdminProfile.vue index 41be242c1..4f04b25fe 100644 --- a/js/src/views/Admin/AdminProfile.vue +++ b/js/src/views/Admin/AdminProfile.vue @@ -139,6 +139,7 @@ const EVENTS_PER_PAGE = 10; apollo: { person: { query: GET_PERSON, + fetchPolicy: "cache-and-network", variables() { return { actorId: this.id, diff --git a/js/src/views/Admin/AdminUserProfile.vue b/js/src/views/Admin/AdminUserProfile.vue index 179af473d..846751cb1 100644 --- a/js/src/views/Admin/AdminUserProfile.vue +++ b/js/src/views/Admin/AdminUserProfile.vue @@ -69,6 +69,7 @@ import { IPerson } from "../../types/actor"; apollo: { user: { query: GET_USER, + fetchPolicy: "cache-and-network", variables() { return { id: this.id, diff --git a/js/src/views/Admin/Dashboard.vue b/js/src/views/Admin/Dashboard.vue index 2d9a4cd2d..18b55838b 100644 --- a/js/src/views/Admin/Dashboard.vue +++ b/js/src/views/Admin/Dashboard.vue @@ -71,6 +71,7 @@ import RouteName from "../../router/name"; apollo: { dashboard: { query: DASHBOARD, + fetchPolicy: "cache-and-network", }, }, metaInfo() { diff --git a/js/src/views/Admin/GroupProfiles.vue b/js/src/views/Admin/GroupProfiles.vue new file mode 100644 index 000000000..da2872422 --- /dev/null +++ b/js/src/views/Admin/GroupProfiles.vue @@ -0,0 +1,168 @@ + + + diff --git a/js/src/views/Admin/Profiles.vue b/js/src/views/Admin/Profiles.vue index 47eb44985..eb96a0536 100644 --- a/js/src/views/Admin/Profiles.vue +++ b/js/src/views/Admin/Profiles.vue @@ -91,6 +91,7 @@ const PROFILES_PER_PAGE = 10; apollo: { persons: { query: LIST_PROFILES, + fetchPolicy: "cache-and-network", variables() { return { preferredUsername: this.preferredUsername, diff --git a/js/src/views/Admin/Users.vue b/js/src/views/Admin/Users.vue index 6d1d06381..89a51af90 100644 --- a/js/src/views/Admin/Users.vue +++ b/js/src/views/Admin/Users.vue @@ -103,6 +103,7 @@ const USERS_PER_PAGE = 10; apollo: { users: { query: LIST_USERS, + fetchPolicy: "cache-and-network", variables() { return { email: this.email, diff --git a/js/src/views/Discussions/Discussion.vue b/js/src/views/Discussions/Discussion.vue index b5ddf54eb..68baaa109 100644 --- a/js/src/views/Discussions/Discussion.vue +++ b/js/src/views/Discussions/Discussion.vue @@ -120,6 +120,7 @@ import { DELETE_COMMENT, UPDATE_COMMENT } from "@/graphql/comment"; apollo: { discussion: { query: GET_DISCUSSION, + fetchPolicy: "cache-and-network", variables() { return { slug: this.slug, diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue index f42a7190e..6c09af669 100644 --- a/js/src/views/Event/Event.vue +++ b/js/src/views/Event/Event.vue @@ -578,6 +578,7 @@ import PopoverActorCard from "../../components/Account/PopoverActorCard.vue"; apollo: { event: { query: FETCH_EVENT, + fetchPolicy: "cache-and-network", variables() { return { uuid: this.uuid, @@ -592,6 +593,7 @@ import PopoverActorCard from "../../components/Account/PopoverActorCard.vue"; }, participations: { query: EVENT_PERSON_PARTICIPATION, + fetchPolicy: "cache-and-network", variables() { return { eventId: this.event.id, diff --git a/js/src/views/Group/Create.vue b/js/src/views/Group/Create.vue index a2b7e05c4..f6d1a0e27 100644 --- a/js/src/views/Group/Create.vue +++ b/js/src/views/Group/Create.vue @@ -2,41 +2,64 @@

{{ $t("Create a new group") }}

-
- - - + + {{ value }} + - +
+ +
+ +
+ + +

+ @{{ host }} +

+
+
+

+

+ - +
- Avatar - + {{ $t("Avatar") }} +
- Banner - + {{ $t("Banner") }} +
- -
+ +
diff --git a/js/src/views/Group/Group.vue b/js/src/views/Group/Group.vue index d8a3b912c..bf09a7410 100644 --- a/js/src/views/Group/Group.vue +++ b/js/src/views/Group/Group.vue @@ -304,6 +304,7 @@ import addMinutes from "date-fns/addMinutes"; apollo: { group: { query: FETCH_GROUP, + fetchPolicy: "cache-and-network", variables() { return { name: this.preferredUsername, @@ -312,6 +313,7 @@ import addMinutes from "date-fns/addMinutes"; }, person: { query: PERSON_MEMBERSHIPS, + fetchPolicy: "cache-and-network", variables() { return { id: this.currentActor.id, diff --git a/js/src/views/Group/GroupList.vue b/js/src/views/Group/GroupList.vue index 0e97d1d5d..86b3fadf6 100644 --- a/js/src/views/Group/GroupList.vue +++ b/js/src/views/Group/GroupList.vue @@ -22,11 +22,15 @@ import { LIST_GROUPS } from "@/graphql/group"; import { Group, IGroup } from "@/types/actor"; import GroupMemberCard from "@/components/Group/GroupMemberCard.vue"; import RouteName from "../../router/name"; +import { Paginate } from "@/types/paginate"; @Component({ apollo: { groups: { - query: LIST_GROUPS, + query: { + query: LIST_GROUPS, + fetchPolicy: "network-only", + }, }, }, components: { @@ -34,7 +38,7 @@ import RouteName from "../../router/name"; }, }) export default class GroupList extends Vue { - groups: { elements: IGroup[]; total: number } = { elements: [], total: 0 }; + groups!: Paginate; loading = true; diff --git a/js/src/views/Group/GroupMembers.vue b/js/src/views/Group/GroupMembers.vue index e6fa34c04..2788c4638 100644 --- a/js/src/views/Group/GroupMembers.vue +++ b/js/src/views/Group/GroupMembers.vue @@ -176,7 +176,7 @@ import { IMember, MemberRole } from "../../types/actor/group.model"; apollo: { group: { query: GROUP_MEMBERS, - // fetchPolicy: "network-only", + fetchPolicy: "network-only", variables() { return { name: this.$route.params.preferredUsername, diff --git a/js/src/views/Group/GroupSettings.vue b/js/src/views/Group/GroupSettings.vue index 7e75f6234..deae0d90d 100644 --- a/js/src/views/Group/GroupSettings.vue +++ b/js/src/views/Group/GroupSettings.vue @@ -91,7 +91,10 @@ :value="currentAddress" /> - {{ $t("Update group") }} +
+ {{ $t("Update group") }} + {{ $t("Delete group") }} +
@@ -100,7 +103,7 @@