feat: add demo mode flag
Related to https://kolaente.dev/vikunja/frontend/issues/2453
This commit is contained in:
parent
b3a847e581
commit
97b5cd306f
@ -59,6 +59,9 @@ service:
|
|||||||
# The maximum size clients will be able to request for user avatars.
|
# The maximum size clients will be able to request for user avatars.
|
||||||
# If clients request a size bigger than this, it will be changed on the fly.
|
# If clients request a size bigger than this, it will be changed on the fly.
|
||||||
maxavatarsize: 1024
|
maxavatarsize: 1024
|
||||||
|
# If set to true, the frontend will show a big red warning not to use this instance for real data as it will be cleared out.
|
||||||
|
# You probably don't need to set this value, it was created specifically for usage on [try](https://try.vikunja.io).
|
||||||
|
demomode: false
|
||||||
|
|
||||||
database:
|
database:
|
||||||
# Database type to use. Supported types are mysql, postgres and sqlite.
|
# Database type to use. Supported types are mysql, postgres and sqlite.
|
||||||
|
@ -333,6 +333,18 @@ Full path: `service.maxavatarsize`
|
|||||||
Environment path: `VIKUNJA_SERVICE_MAXAVATARSIZE`
|
Environment path: `VIKUNJA_SERVICE_MAXAVATARSIZE`
|
||||||
|
|
||||||
|
|
||||||
|
### demomode
|
||||||
|
|
||||||
|
If set to true, the frontend will show a big red warning not to use this instance for real data as it will be cleared out.
|
||||||
|
You probably don't need to set this value, it was created specifically for usage on [try](https://try.vikunja.io).
|
||||||
|
|
||||||
|
Default: `false`
|
||||||
|
|
||||||
|
Full path: `service.demomode`
|
||||||
|
|
||||||
|
Environment path: `VIKUNJA_SERVICE_DEMOMODE`
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## database
|
## database
|
||||||
|
@ -49,6 +49,7 @@ const (
|
|||||||
ServiceRootpath Key = `service.rootpath`
|
ServiceRootpath Key = `service.rootpath`
|
||||||
ServiceStaticpath Key = `service.staticpath`
|
ServiceStaticpath Key = `service.staticpath`
|
||||||
ServiceMaxItemsPerPage Key = `service.maxitemsperpage`
|
ServiceMaxItemsPerPage Key = `service.maxitemsperpage`
|
||||||
|
ServiceDemoMode Key = `service.demomode`
|
||||||
// Deprecated: Use metrics.enabled
|
// Deprecated: Use metrics.enabled
|
||||||
ServiceEnableMetrics Key = `service.enablemetrics`
|
ServiceEnableMetrics Key = `service.enablemetrics`
|
||||||
ServiceMotd Key = `service.motd`
|
ServiceMotd Key = `service.motd`
|
||||||
@ -300,6 +301,7 @@ func InitDefaultConfig() {
|
|||||||
ServiceEnableEmailReminders.setDefault(true)
|
ServiceEnableEmailReminders.setDefault(true)
|
||||||
ServiceEnableUserDeletion.setDefault(true)
|
ServiceEnableUserDeletion.setDefault(true)
|
||||||
ServiceMaxAvatarSize.setDefault(1024)
|
ServiceMaxAvatarSize.setDefault(1024)
|
||||||
|
ServiceDemoMode.setDefault(false)
|
||||||
|
|
||||||
// Auth
|
// Auth
|
||||||
AuthLocalEnabled.setDefault(true)
|
AuthLocalEnabled.setDefault(true)
|
||||||
|
@ -49,6 +49,7 @@ type vikunjaInfos struct {
|
|||||||
EmailRemindersEnabled bool `json:"email_reminders_enabled"`
|
EmailRemindersEnabled bool `json:"email_reminders_enabled"`
|
||||||
UserDeletionEnabled bool `json:"user_deletion_enabled"`
|
UserDeletionEnabled bool `json:"user_deletion_enabled"`
|
||||||
TaskCommentsEnabled bool `json:"task_comments_enabled"`
|
TaskCommentsEnabled bool `json:"task_comments_enabled"`
|
||||||
|
DemoModeEnabled bool `json:"demo_mode_enabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type authInfo struct {
|
type authInfo struct {
|
||||||
@ -92,6 +93,7 @@ func Info(c echo.Context) error {
|
|||||||
EmailRemindersEnabled: config.ServiceEnableEmailReminders.GetBool(),
|
EmailRemindersEnabled: config.ServiceEnableEmailReminders.GetBool(),
|
||||||
UserDeletionEnabled: config.ServiceEnableUserDeletion.GetBool(),
|
UserDeletionEnabled: config.ServiceEnableUserDeletion.GetBool(),
|
||||||
TaskCommentsEnabled: config.ServiceEnableTaskComments.GetBool(),
|
TaskCommentsEnabled: config.ServiceEnableTaskComments.GetBool(),
|
||||||
|
DemoModeEnabled: config.ServiceDemoMode.GetBool(),
|
||||||
AvailableMigrators: []string{
|
AvailableMigrators: []string{
|
||||||
(&vikunja_file.FileMigrator{}).Name(),
|
(&vikunja_file.FileMigrator{}).Name(),
|
||||||
(&ticktick.Migrator{}).Name(),
|
(&ticktick.Migrator{}).Name(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user