aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/menu.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/menu/menu.component.ts')
-rw-r--r--client/src/app/menu/menu.component.ts42
1 files changed, 23 insertions, 19 deletions
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index f9a0a9f57..48ed91973 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -61,6 +61,29 @@ export class MenuComponent implements OnInit {
61 } 61 }
62 } 62 }
63 63
64 get language () {
65 return this.languageChooserModal.getCurrentLanguage()
66 }
67
68 get nsfwPolicy () {
69 if (!this.user) return
70
71 switch (this.user.nsfwPolicy) {
72 case 'do_not_list':
73 return $localize`hide`
74
75 case 'blur':
76 return $localize`blur`
77
78 case 'display':
79 return $localize`display`
80 }
81 }
82
83 get instanceName () {
84 return this.serverConfig.instance.name
85 }
86
64 ngOnInit () { 87 ngOnInit () {
65 this.serverConfig = this.serverService.getTmpConfig() 88 this.serverConfig = this.serverService.getTmpConfig()
66 this.serverService.getConfig() 89 this.serverService.getConfig()
@@ -109,25 +132,6 @@ export class MenuComponent implements OnInit {
109 }) 132 })
110 } 133 }
111 134
112 get language () {
113 return this.languageChooserModal.getCurrentLanguage()
114 }
115
116 get nsfwPolicy () {
117 if (!this.user) return
118
119 switch (this.user.nsfwPolicy) {
120 case 'do_not_list':
121 return $localize`hide`
122
123 case 'blur':
124 return $localize`blur`
125
126 case 'display':
127 return $localize`display`
128 }
129 }
130
131 isRegistrationAllowed () { 135 isRegistrationAllowed () {
132 return this.serverConfig.signup.allowed && 136 return this.serverConfig.signup.allowed &&
133 this.serverConfig.signup.allowedForCurrentIP 137 this.serverConfig.signup.allowedForCurrentIP