diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-23 11:08:42 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-23 14:49:29 +0100 |
commit | ff71e06ad1ede135b8929c46c4b55a7dd3b65dc8 (patch) | |
tree | 1d43c3bc8ae6e40aee03ee05b1d087bae9ca1449 /client/src/app/shared | |
parent | 4115f20084f302f497be9cb12237564679ca54ec (diff) | |
download | PeerTube-ff71e06ad1ede135b8929c46c4b55a7dd3b65dc8.tar.gz PeerTube-ff71e06ad1ede135b8929c46c4b55a7dd3b65dc8.tar.zst PeerTube-ff71e06ad1ede135b8929c46c4b55a7dd3b65dc8.zip |
Add user registration policy info
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/shared-instance/instance-features-table.component.html | 7 | ||||
-rw-r--r-- | client/src/app/shared/shared-instance/instance-features-table.component.ts | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.html b/client/src/app/shared/shared-instance/instance-features-table.component.html index 6c05764df..205f2bc97 100644 --- a/client/src/app/shared/shared-instance/instance-features-table.component.html +++ b/client/src/app/shared/shared-instance/instance-features-table.component.html | |||
@@ -18,10 +18,9 @@ | |||
18 | </tr> | 18 | </tr> |
19 | 19 | ||
20 | <tr> | 20 | <tr> |
21 | <th i18n class="label" scope="row">User registration allowed</th> | 21 | <th i18n class="label" scope="row">User registration</th> |
22 | <td> | 22 | |
23 | <my-feature-boolean [value]="serverConfig.signup.allowed"></my-feature-boolean> | 23 | <td class="value">{{ buildRegistrationLabel() }}</td> |
24 | </td> | ||
25 | </tr> | 24 | </tr> |
26 | 25 | ||
27 | <tr> | 26 | <tr> |
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts index e405c5790..c3df7c594 100644 --- a/client/src/app/shared/shared-instance/instance-features-table.component.ts +++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts | |||
@@ -56,6 +56,15 @@ export class InstanceFeaturesTableComponent implements OnInit { | |||
56 | if (policy === 'display') return $localize`Displayed` | 56 | if (policy === 'display') return $localize`Displayed` |
57 | } | 57 | } |
58 | 58 | ||
59 | buildRegistrationLabel () { | ||
60 | const config = this.serverConfig.signup | ||
61 | |||
62 | if (config.allowed !== true) return $localize`Disabled` | ||
63 | if (config.requiresApproval === true) return $localize`Requires approval by moderators` | ||
64 | |||
65 | return $localize`Enabled` | ||
66 | } | ||
67 | |||
59 | getServerVersionAndCommit () { | 68 | getServerVersionAndCommit () { |
60 | return this.serverService.getServerVersionAndCommit() | 69 | return this.serverService.getServerVersionAndCommit() |
61 | } | 70 | } |