diff options
author | Chocobozzz <me@florianbigard.com> | 2019-09-04 14:30:34 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-09-04 16:24:58 +0200 |
commit | e1b49ee534108ba8ac98dcb209d2efcbf1ecd678 (patch) | |
tree | 85dd88966e105df5e06140b4aaca39c58c3f32d9 /client/src/app/+admin | |
parent | 10a105f0c8620b2742eb357b69dd516a9ddf5798 (diff) | |
download | PeerTube-e1b49ee534108ba8ac98dcb209d2efcbf1ecd678.tar.gz PeerTube-e1b49ee534108ba8ac98dcb209d2efcbf1ecd678.tar.zst PeerTube-e1b49ee534108ba8ac98dcb209d2efcbf1ecd678.zip |
Implement auto follow in client
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html | 35 | ||||
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | 11 |
2 files changed, 46 insertions, 0 deletions
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 fe9d856d0..ec6f879d7 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 | |||
@@ -221,6 +221,41 @@ | |||
221 | </ng-container> | 221 | </ng-container> |
222 | </ng-container> | 222 | </ng-container> |
223 | 223 | ||
224 | <div i18n class="inner-form-title">Instance followings</div> | ||
225 | |||
226 | <ng-container formGroupName="followings"> | ||
227 | <ng-container formGroupName="instance"> | ||
228 | |||
229 | <ng-container formGroupName="autoFollowBack"> | ||
230 | <div class="form-group"> | ||
231 | <my-peertube-checkbox | ||
232 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" | ||
233 | i18n-labelText labelText="Automatically follow other instances that follow you" | ||
234 | ></my-peertube-checkbox> | ||
235 | </div> | ||
236 | </ng-container> | ||
237 | |||
238 | <ng-container formGroupName="autoFollowIndex"> | ||
239 | <div class="form-group"> | ||
240 | <my-peertube-checkbox | ||
241 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" | ||
242 | i18n-labelText labelText="Automatically follow instance of the public index (below)" | ||
243 | ></my-peertube-checkbox> | ||
244 | </div> | ||
245 | |||
246 | <div class="form-group"> | ||
247 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | ||
248 | <input | ||
249 | type="text" id="followingsInstanceAutoFollowIndexUrl" | ||
250 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | ||
251 | > | ||
252 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | ||
253 | </div> | ||
254 | |||
255 | </ng-container> | ||
256 | </ng-container> | ||
257 | </ng-container> | ||
258 | |||
224 | 259 | ||
225 | <div i18n class="inner-form-title">Administrator</div> | 260 | <div i18n class="inner-form-title">Administrator</div> |
226 | 261 | ||
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 8bd7f7cf6..d51104569 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 | |||
@@ -158,6 +158,17 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
158 | enabled: null, | 158 | enabled: null, |
159 | manualApproval: null | 159 | manualApproval: null |
160 | } | 160 | } |
161 | }, | ||
162 | followings: { | ||
163 | instance: { | ||
164 | autoFollowBack: { | ||
165 | enabled: null | ||
166 | }, | ||
167 | autoFollowIndex: { | ||
168 | enabled: null, | ||
169 | indexUrl: this.customConfigValidatorsService.INDEX_URL | ||
170 | } | ||
171 | } | ||
161 | } | 172 | } |
162 | } | 173 | } |
163 | 174 | ||