aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings/settings/EditSettingsForm.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/settings/settings/EditSettingsForm.js')
-rw-r--r--src/components/settings/settings/EditSettingsForm.js42
1 files changed, 41 insertions, 1 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js
index b4e6e08a1..0152857a6 100644
--- a/src/components/settings/settings/EditSettingsForm.js
+++ b/src/components/settings/settings/EditSettingsForm.js
@@ -30,6 +30,14 @@ const messages = defineMessages({
30 id: 'settings.app.todoServerInfo', 30 id: 'settings.app.todoServerInfo',
31 defaultMessage: '!!!This server will be used for the "Franz Todo" feature. The default server will only work for premium users. (default: https://app.franztodos.com)', 31 defaultMessage: '!!!This server will be used for the "Franz Todo" feature. The default server will only work for premium users. (default: https://app.franztodos.com)',
32 }, 32 },
33 lockedPassword: {
34 id: 'settings.app.lockedPassword',
35 defaultMessage: '!!!Ferdi Lock Password',
36 },
37 lockedPasswordInfo: {
38 id: 'settings.app.lockedPasswordInfo',
39 defaultMessage: '!!!Please make sure to set a password you\'ll remember.\nIf you loose this password, you will have to reinstall Ferdi.',
40 },
33 headlineLanguage: { 41 headlineLanguage: {
34 id: 'settings.app.headlineLanguage', 42 id: 'settings.app.headlineLanguage',
35 defaultMessage: '!!!Language', 43 defaultMessage: '!!!Language',
@@ -159,6 +167,7 @@ export default @observer class EditSettingsForm extends Component {
159 } 167 }
160 168
161 const isLoggedIn = Boolean(localStorage.getItem('authToken')); 169 const isLoggedIn = Boolean(localStorage.getItem('authToken'));
170 const lockingFeatureEnabled = window.ferdi.stores.settings.all.app.lockingFeatureEnabled;
162 171
163 return ( 172 return (
164 <div className="settings__main"> 173 <div className="settings__main">
@@ -205,6 +214,7 @@ export default @observer class EditSettingsForm extends Component {
205 Please still consider 214 Please still consider
206 {' '} 215 {' '}
207 <a href="https://www.meetfranz.com/pricing" target="_blank">paying for a Franz account</a> 216 <a href="https://www.meetfranz.com/pricing" target="_blank">paying for a Franz account</a>
217 {' '}
208 or 218 or
209 {' '} 219 {' '}
210 <a href="https://github.com/vantezzen/ferdi-server" target="_blank">using a self-hosted ferdi-server</a> 220 <a href="https://github.com/vantezzen/ferdi-server" target="_blank">using a self-hosted ferdi-server</a>
@@ -225,12 +235,42 @@ export default @observer class EditSettingsForm extends Component {
225 placeholder="Todo Server" 235 placeholder="Todo Server"
226 onChange={e => this.submit(e)} 236 onChange={e => this.submit(e)}
227 field={form.$('todoServer')} 237 field={form.$('todoServer')}
228 autoFocus
229 /> 238 />
230 <p>{ intl.formatMessage(messages.todoServerInfo) }</p> 239 <p>{ intl.formatMessage(messages.todoServerInfo) }</p>
231 </> 240 </>
232 )} 241 )}
233 242
243 <Toggle field={form.$('lockingFeatureEnabled')} />
244 {lockingFeatureEnabled && (
245 <>
246 <Input
247 placeholder={intl.formatMessage(messages.lockedPassword)}
248 onChange={e => this.submit(e)}
249 field={form.$('lockedPassword')}
250 type="password"
251 />
252 <p>
253 { intl.formatMessage(messages.lockedPasswordInfo) }
254 </p>
255 </>
256 )}
257 <p
258 className="settings__message"
259 style={{
260 borderTop: 0, marginTop: 0, paddingTop: 0, marginBottom: '2rem',
261 }}
262 >
263 <span>
264 Ferdi password lock allows you to keep your messages protected.
265 <br />
266 Using Ferdi password lock, you will be prompted to enter your password everytime you
267 start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut
268 {' '}
269 <code>CMD/CTRL+Shift+L</code>
270 </span>
271 </p>
272
273
234 {/* Appearance */} 274 {/* Appearance */}
235 <h2 id="apperance">{intl.formatMessage(messages.headlineAppearance)}</h2> 275 <h2 id="apperance">{intl.formatMessage(messages.headlineAppearance)}</h2>
236 <Toggle field={form.$('showDisabledServices')} /> 276 <Toggle field={form.$('showDisabledServices')} />