From 750072b3b18393571df52a4e85973ef72502004d Mon Sep 17 00:00:00 2001 From: Gitea Date: Fri, 20 Aug 2021 19:23:21 +0200 Subject: [PATCH] Small changes to get it actually working (cherry picked from commit d16e9f5235652e1121ea5d1d3cde742290ee83f7) upstream PR is https://framagit.org/framasoft/mobilizon/-/merge_requests/1236 --- js/src/graphql/admin.ts | 6 ++--- js/src/graphql/config.ts | 1 + js/src/types/admin.model.ts | 2 +- js/src/views/Admin/Settings.vue | 36 ++++++++++++++------------- js/src/views/Home.vue | 27 ++++++++++++++------ lib/graphql/resolvers/config.ex | 1 + lib/graphql/schema/admin.ex | 2 +- lib/graphql/schema/config.ex | 4 +-- lib/mobilizon/config.ex | 2 +- schema.graphql | 12 ++++----- test/graphql/resolvers/admin_test.exs | 6 ++--- 11 files changed, 57 insertions(+), 42 deletions(-) diff --git a/js/src/graphql/admin.ts b/js/src/graphql/admin.ts index 4c6bfaecc..cb181f493 100644 --- a/js/src/graphql/admin.ts +++ b/js/src/graphql/admin.ts @@ -184,7 +184,7 @@ export const ADMIN_SETTINGS_FRAGMENT = gql` instanceLongDescription instanceSlogan contact - InstanceHomepageSorting + instanceHomepageSorting instanceTerms instanceTermsType instanceTermsUrl @@ -213,7 +213,7 @@ export const SAVE_ADMIN_SETTINGS = gql` $instanceLongDescription: String $instanceSlogan: String $contact: String - $InstanceHomepageSorting: InstanceHomepageSorting + $instanceHomepageSorting: InstanceHomepageSorting $instanceTerms: String $instanceTermsType: InstanceTermsType $instanceTermsUrl: String @@ -230,7 +230,7 @@ export const SAVE_ADMIN_SETTINGS = gql` instanceLongDescription: $instanceLongDescription instanceSlogan: $instanceSlogan contact: $contact - InstanceHomepageSorting: $InstanceHomepageSorting + instanceHomepageSorting: $instanceHomepageSorting instanceTerms: $instanceTerms instanceTermsType: $instanceTermsType instanceTermsUrl: $instanceTermsUrl diff --git a/js/src/graphql/config.ts b/js/src/graphql/config.ts index 490346061..f3bf1e7d7 100644 --- a/js/src/graphql/config.ts +++ b/js/src/graphql/config.ts @@ -8,6 +8,7 @@ export const CONFIG = gql` slogan registrationsOpen registrationsAllowlist + instanceHomepageSorting demoMode countryCode languages diff --git a/js/src/types/admin.model.ts b/js/src/types/admin.model.ts index ed74b1062..3c4079e09 100644 --- a/js/src/types/admin.model.ts +++ b/js/src/types/admin.model.ts @@ -25,7 +25,7 @@ export interface IAdminSettings { instanceSlogan: string; instanceLongDescription: string; contact: string; - InstanceHomepageSorting: InstanceHomepageSorting; + instanceHomepageSorting: InstanceHomepageSorting; instanceTerms: string; instanceTermsType: InstanceTermsType; instanceTermsUrl: string | null; diff --git a/js/src/views/Admin/Settings.vue b/js/src/views/Admin/Settings.vue index d938c89db..578a3142d 100644 --- a/js/src/views/Admin/Settings.vue +++ b/js/src/views/Admin/Settings.vue @@ -64,24 +64,26 @@

{{ $t("Registration is closed.") }}

- - - {{ $t("Recently Created") }} +
+ + + {{ $t("Recently Created") }} + + + {{ $t("Upcoming") }} + - - {{ $t("Upcoming") }} - - +