From 3da68f0a781ebd893521e2e6fa200280c92ae815 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 26 Jan 2021 01:53:13 +0100 Subject: add default trending page choice, revert comments count for hot strategy --- .../edit-custom-config.component.html | 23 +++++++++++++++++++--- .../edit-custom-config.component.ts | 10 ++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) (limited to 'client/src/app/+admin') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index 9e4691670..83b1c6a31 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html @@ -269,9 +269,13 @@
@@ -279,6 +283,19 @@
{{ formErrors.instance.defaultClientRoute }}
+
+ +
+ +
+
{{ formErrors.instance.defaultTrendingRoute }}
+
+ diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 330ab075a..e6fc4582b 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -186,6 +186,12 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A languages: null, defaultClientRoute: null, + defaultTrendingRoute: null, + pages: { + hot: { + enabled: null + } + }, customizations: { javascript: null, @@ -364,6 +370,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A return this.form.value['followings']['instance']['autoFollowIndex']['enabled'] === true } + isTrendingHotEnabled () { + return this.form.value['instance']['pages']['hot']['enabled'] === true + } + async formValidated () { const value: CustomConfig = this.form.getRawValue() -- cgit v1.2.3