diff --git a/js/src/graphql/admin.ts b/js/src/graphql/admin.ts index 0d47b0fa7..4c6bfaecc 100644 --- a/js/src/graphql/admin.ts +++ b/js/src/graphql/admin.ts @@ -184,6 +184,7 @@ export const ADMIN_SETTINGS_FRAGMENT = gql` instanceLongDescription instanceSlogan contact + InstanceHomepageSorting instanceTerms instanceTermsType instanceTermsUrl @@ -212,6 +213,7 @@ export const SAVE_ADMIN_SETTINGS = gql` $instanceLongDescription: String $instanceSlogan: String $contact: String + $InstanceHomepageSorting: InstanceHomepageSorting $instanceTerms: String $instanceTermsType: InstanceTermsType $instanceTermsUrl: String @@ -228,6 +230,7 @@ export const SAVE_ADMIN_SETTINGS = gql` instanceLongDescription: $instanceLongDescription instanceSlogan: $instanceSlogan contact: $contact + InstanceHomepageSorting: $InstanceHomepageSorting instanceTerms: $instanceTerms instanceTermsType: $instanceTermsType instanceTermsUrl: $instanceTermsUrl diff --git a/js/src/types/admin.model.ts b/js/src/types/admin.model.ts index 00d165428..ed74b1062 100644 --- a/js/src/types/admin.model.ts +++ b/js/src/types/admin.model.ts @@ -1,6 +1,6 @@ import type { IEvent } from "@/types/event.model"; import type { IGroup } from "./actor"; -import { InstanceTermsType } from "./enums"; +import { InstanceTermsType, InstanceHomepageSorting } from "./enums"; export interface IDashboard { lastPublicEventPublished: IEvent; @@ -25,6 +25,7 @@ export interface IAdminSettings { instanceSlogan: string; instanceLongDescription: string; contact: string; + InstanceHomepageSorting: InstanceHomepageSorting; instanceTerms: string; instanceTermsType: InstanceTermsType; instanceTermsUrl: string | null; diff --git a/js/src/types/config.model.ts b/js/src/types/config.model.ts index 97544c2e5..2ceeaa5a2 100644 --- a/js/src/types/config.model.ts +++ b/js/src/types/config.model.ts @@ -1,4 +1,9 @@ -import { InstancePrivacyType, InstanceTermsType, RoutingType } from "./enums"; +import { + InstancePrivacyType, + InstanceTermsType, + InstanceHomepageSorting, + RoutingType +} from "./enums"; import type { IProvider } from "./resource"; export interface IOAuthProvider { @@ -79,6 +84,7 @@ export interface IConfig { provider: string; autocomplete: boolean; }; + instanceHomepageSorting: InstanceHomepageSorting; terms: { bodyHtml: string; type: InstanceTermsType; diff --git a/js/src/types/enums.ts b/js/src/types/enums.ts index 1061d196b..2d6f76781 100644 --- a/js/src/types/enums.ts +++ b/js/src/types/enums.ts @@ -1,4 +1,9 @@ /* eslint-disable no-unused-vars */ +export enum InstanceHomepageSorting { + DEFAULT = "DEFAULT", + UPCOMING = "UPCOMING", +} + export enum InstanceTermsType { DEFAULT = "DEFAULT", URL = "URL", diff --git a/js/src/views/Admin/Settings.vue b/js/src/views/Admin/Settings.vue index 137e7907a..d938c89db 100644 --- a/js/src/views/Admin/Settings.vue +++ b/js/src/views/Admin/Settings.vue @@ -64,6 +64,24 @@
{{ $t("Registration is closed.") }}
+