From b62211a5b4898b639bda80306d56a6548e9e0809 Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Wed, 6 Sep 2023 16:31:24 +0200 Subject: [PATCH 1/5] Fix content blocks, notes, and chapters. --- .../src/components/profile/ModuleActivity.vue | 39 ++++++++++--------- client/src/pages/activity.vue | 4 +- server/users/schema/queries.py | 2 +- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/client/src/components/profile/ModuleActivity.vue b/client/src/components/profile/ModuleActivity.vue index 07ab1655..58d38c44 100644 --- a/client/src/components/profile/ModuleActivity.vue +++ b/client/src/components/profile/ModuleActivity.vue @@ -3,10 +3,11 @@ class="module-activity" v-if="!empty" > -

+

{{ module.topic.title }}

-

{{ module.metaTitle }} - {{ module.title }}

+

{{ module.title }}

+

{{ module.metaTitle }}

@@ -47,11 +49,12 @@ - {{ note.text }} + {{ noteBookmark.note.text }}
@@ -73,11 +76,11 @@ export default { computed: { empty() { return !( - this.module.mySubmissions.length || - this.module.myAnswers.length || - this.module.myContentBookmarks.length || - this.module.myChapterBookmarks.length || - this.module.bookmark + this.notes.length || + this.answers.length || + this.submissions.length || + this.contentBookmarks.length || + this.chapterBookmarks.length ); }, notes() { @@ -86,7 +89,6 @@ export default { .concat(this.module.myContentBookmarks) .concat([this.module.bookmark ? this.module.bookmark : {}]) .filter((b) => b.note) - .map((b) => b.note) : []; }, submissions() { @@ -140,9 +142,7 @@ export default { max-width: 320px; } - margin-bottom: 2 * $large-spacing; - - &__module-name { + &__topic-name { @include regular-text; margin-bottom: $small-spacing; } @@ -150,7 +150,10 @@ export default { &__title { @include heading-2; } - + &__meta-title { + @include regular-text; + margin-bottom: $small-spacing; + } &__entry { &:first-of-type { border-top: 1px solid $color-silver; diff --git a/client/src/pages/activity.vue b/client/src/pages/activity.vue index e96bc9da..4700cf8b 100644 --- a/client/src/pages/activity.vue +++ b/client/src/pages/activity.vue @@ -42,14 +42,14 @@ export default { update(data) { return this.$getRidOfEdges(data).myActivity; }, - pollInterval: 5000, + pollInterval: 15000, }, instruments: { query: MY_ACTIVITY_QUERY, update(data) { return this.$getRidOfEdges(data).myInstrumentActivity; }, - pollInterval: 5000, + pollInterval: 15000, }, }, diff --git a/server/users/schema/queries.py b/server/users/schema/queries.py index cf0e44a0..8b33e18b 100644 --- a/server/users/schema/queries.py +++ b/server/users/schema/queries.py @@ -29,7 +29,7 @@ class UsersQuery(object): return Module.objects.all() def resolve_my_instrument_activity(self, info, **kwargs): - return BasicKnowledge.objects.all() + return BasicKnowledge.objects.filter(instrumentbookmark__user=info.context.user) class AllUsersQuery(object): From 896837ccf4b656f24dc82608e15beb8b993d3cb9 Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Thu, 7 Sep 2023 11:38:30 +0200 Subject: [PATCH 2/5] Make font smaller - otherwise code is displayed as SH-BU82 instead of SHBU82 --- client/src/components/profile/ShowCode.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/profile/ShowCode.vue b/client/src/components/profile/ShowCode.vue index 8a6d4a67..8ce9fcf4 100644 --- a/client/src/components/profile/ShowCode.vue +++ b/client/src/components/profile/ShowCode.vue @@ -42,7 +42,7 @@ export default { font-size: toRem(60px); letter-spacing: toRem(10px); @include desktop { - font-size: toRem(120px); + font-size: toRem(100px); letter-spacing: toRem(20px); } font-weight: 600; From 595332825a1f0ea3588497ae881071f4525c3cfd Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Fri, 8 Sep 2023 09:21:40 +0200 Subject: [PATCH 3/5] add loading spinner --- client/src/components/ui/loadingMessage.vue | 33 ++++++ client/src/components/ui/loadingSpinner.vue | 112 ++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 client/src/components/ui/loadingMessage.vue create mode 100644 client/src/components/ui/loadingSpinner.vue diff --git a/client/src/components/ui/loadingMessage.vue b/client/src/components/ui/loadingMessage.vue new file mode 100644 index 00000000..120d037a --- /dev/null +++ b/client/src/components/ui/loadingMessage.vue @@ -0,0 +1,33 @@ + + + + + + diff --git a/client/src/components/ui/loadingSpinner.vue b/client/src/components/ui/loadingSpinner.vue new file mode 100644 index 00000000..fc85b9d3 --- /dev/null +++ b/client/src/components/ui/loadingSpinner.vue @@ -0,0 +1,112 @@ + + + + From bc715a937fa880ea5331ed9e8b3fba07f52abc2d Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Fri, 8 Sep 2023 10:00:17 +0200 Subject: [PATCH 4/5] Add loading message to activities and refactor the module and intrument activities --- .../components/profile/ContentBookmark.vue | 4 +- .../components/profile/InstrumentActivity.vue | 15 ++-- .../src/components/profile/ModuleActivity.vue | 17 ++-- client/src/components/ui/InfoMessage.vue | 33 ++++++++ client/src/components/ui/loadingMessage.vue | 7 +- client/src/components/ui/loadingSpinner.vue | 84 ++++++++++++------- client/src/graphql/gql/queries/myActivity.gql | 2 + client/src/styles/_variables.scss | 1 + 8 files changed, 110 insertions(+), 53 deletions(-) create mode 100644 client/src/components/ui/InfoMessage.vue diff --git a/client/src/components/profile/ContentBookmark.vue b/client/src/components/profile/ContentBookmark.vue index 8a6017e3..e1ef8b2d 100644 --- a/client/src/components/profile/ContentBookmark.vue +++ b/client/src/components/profile/ContentBookmark.vue @@ -1,5 +1,5 @@