forked from Archives/Athou_commafeed
show information about demo account if enabled
This commit is contained in:
@@ -160,6 +160,7 @@ export interface ServerInfo {
|
|||||||
allowRegistrations: boolean
|
allowRegistrations: boolean
|
||||||
googleAnalyticsCode?: string
|
googleAnalyticsCode?: string
|
||||||
smtpEnabled: boolean
|
smtpEnabled: boolean
|
||||||
|
demoAccountEnabled: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
|
|||||||
@@ -468,6 +468,10 @@ msgstr "The URL for the feed you want to subscribe to. You can also use the webs
|
|||||||
msgid "Theme"
|
msgid "Theme"
|
||||||
msgstr "Theme"
|
msgstr "Theme"
|
||||||
|
|
||||||
|
#: src/pages/auth/LoginPage.tsx
|
||||||
|
msgid "Try out CommaFeed with the demo account: demo/demo"
|
||||||
|
msgstr "Try out CommaFeed with the demo account: demo/demo"
|
||||||
|
|
||||||
#: src/components/header/Header.tsx
|
#: src/components/header/Header.tsx
|
||||||
msgid "Unread"
|
msgid "Unread"
|
||||||
msgstr "Unread"
|
msgstr "Unread"
|
||||||
|
|||||||
@@ -468,6 +468,10 @@ msgstr "L'URL du flux auquel vous souhaitez vous abonner. Vous pouvez aussi util
|
|||||||
msgid "Theme"
|
msgid "Theme"
|
||||||
msgstr "Thème"
|
msgstr "Thème"
|
||||||
|
|
||||||
|
#: src/pages/auth/LoginPage.tsx
|
||||||
|
msgid "Try out CommaFeed with the demo account: demo/demo"
|
||||||
|
msgstr "Essayez CommaFeed avec le compte de démonstration : demo/demo"
|
||||||
|
|
||||||
#: src/components/header/Header.tsx
|
#: src/components/header/Header.tsx
|
||||||
msgid "Unread"
|
msgid "Unread"
|
||||||
msgstr "Non lu"
|
msgstr "Non lu"
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ export function LoginPage() {
|
|||||||
label={t`User Name or E-mail`}
|
label={t`User Name or E-mail`}
|
||||||
placeholder={t`User Name or E-mail`}
|
placeholder={t`User Name or E-mail`}
|
||||||
{...form.getInputProps("name")}
|
{...form.getInputProps("name")}
|
||||||
|
description={serverInfos?.demoAccountEnabled ? t`Try out CommaFeed with the demo account: demo/demo` : ""}
|
||||||
size="md"
|
size="md"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ app:
|
|||||||
allowRegistrations: true
|
allowRegistrations: true
|
||||||
|
|
||||||
# create a demo account the first time the app starts
|
# create a demo account the first time the app starts
|
||||||
createDemoAccount: false
|
createDemoAccount: true
|
||||||
|
|
||||||
# put your google analytics tracking code here
|
# put your google analytics tracking code here
|
||||||
googleAnalyticsTrackingCode:
|
googleAnalyticsTrackingCode:
|
||||||
|
|||||||
@@ -29,4 +29,7 @@ public class ServerInfo implements Serializable {
|
|||||||
@ApiModelProperty(required = true)
|
@ApiModelProperty(required = true)
|
||||||
private boolean smtpEnabled;
|
private boolean smtpEnabled;
|
||||||
|
|
||||||
|
@ApiModelProperty(required = true)
|
||||||
|
private boolean demoAccountEnabled;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ public class ServerREST {
|
|||||||
infos.setAllowRegistrations(config.getApplicationSettings().getAllowRegistrations());
|
infos.setAllowRegistrations(config.getApplicationSettings().getAllowRegistrations());
|
||||||
infos.setGoogleAnalyticsCode(config.getApplicationSettings().getGoogleAnalyticsTrackingCode());
|
infos.setGoogleAnalyticsCode(config.getApplicationSettings().getGoogleAnalyticsTrackingCode());
|
||||||
infos.setSmtpEnabled(StringUtils.isNotBlank(config.getApplicationSettings().getSmtpHost()));
|
infos.setSmtpEnabled(StringUtils.isNotBlank(config.getApplicationSettings().getSmtpHost()));
|
||||||
|
infos.setDemoAccountEnabled(config.getApplicationSettings().getCreateDemoAccount());
|
||||||
return Response.ok(infos).build();
|
return Response.ok(infos).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user