Added a demo mode to show or hide instance warnings that data is deleted
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -21,6 +21,9 @@ defmodule Mobilizon.Config do
|
||||
@spec instance_registrations_open? :: boolean
|
||||
def instance_registrations_open?, do: to_boolean(instance_config()[:registrations_open])
|
||||
|
||||
@spec instance_demo_mode? :: boolean
|
||||
def instance_demo_mode?, do: to_boolean(instance_config()[:demo])
|
||||
|
||||
@spec instance_repository :: String.t()
|
||||
def instance_repository, do: instance_config()[:repository]
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ defmodule MobilizonWeb.Resolvers.Config do
|
||||
%{
|
||||
name: Config.instance_name(),
|
||||
registrations_open: Config.instance_registrations_open?(),
|
||||
demo_mode: Config.instance_demo_mode?(),
|
||||
description: Config.instance_description(),
|
||||
location: location,
|
||||
country_code: country_code,
|
||||
|
||||
@@ -13,6 +13,7 @@ defmodule MobilizonWeb.Schema.ConfigType do
|
||||
field(:description, :string)
|
||||
|
||||
field(:registrations_open, :boolean)
|
||||
field(:demo_mode, :boolean)
|
||||
field(:country_code, :string)
|
||||
field(:location, :lonlat)
|
||||
field(:geocoding, :geocoding)
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<%= render @view_module, @view_template, assigns %>
|
||||
<% if Mobilizon.Config.instance_demo_mode?() do %>
|
||||
<!-- BETA WARNING -->
|
||||
<tr>
|
||||
<td bgcolor="#f4f4f4" align="center" style="padding: 30px 10px 0px 10px;">
|
||||
@@ -103,6 +104,7 @@
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<!-- SUPPORT CALLOUT -->
|
||||
<tr>
|
||||
<td bgcolor="#f4f4f4" align="center" style="padding: 30px 10px 0px 10px;">
|
||||
|
||||
Reference in New Issue
Block a user