From 6ceec34553ee263b554b13ee64a1dfe0bb083403 Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Sun, 13 Jan 2019 22:37:22 +0000
Subject: [PATCH] Demo mode...

---
 borgbutler-webapp/src/components/views/config/ConfigurationServerTab.jsx |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/borgbutler-webapp/src/components/views/config/ConfigurationServerTab.jsx b/borgbutler-webapp/src/components/views/config/ConfigurationServerTab.jsx
index 827a47c..84f0e2d 100644
--- a/borgbutler-webapp/src/components/views/config/ConfigurationServerTab.jsx
+++ b/borgbutler-webapp/src/components/views/config/ConfigurationServerTab.jsx
@@ -45,6 +45,7 @@
             failed: false,
             port: 9042,
             webdevelopmentMode: false,
+            showDemoRepos: true,
             maxArchiveContentCacheCapacityMb: 100,
             redirect: false,
             confirmModal: false
@@ -73,7 +74,8 @@
         var config = {
             port: this.state.port,
             maxArchiveContentCacheCapacityMb : this.state.maxArchiveContentCacheCapacityMb,
-            webDevelopmentMode: this.state.webDevelopmentMode
+            webDevelopmentMode: this.state.webDevelopmentMode,
+            showDemoRepos: this.state.showDemoRepos
         };
         return fetch(getRestServiceUrl("configuration/config"), {
             method: 'POST',
@@ -140,6 +142,12 @@
                                          onChange={this.handleTextChange}
                                          placeholder="Enter maximum Capacity"
                                          hint={`Limits the cache size of archive file lists in the local cache directory: ${this.state.cacheDir}`} />
+                    <FormLabelField label={'Show demo repositories'} fieldLength={2}>
+                        <FormCheckbox checked={this.state.showDemoRepos}
+                                      hint={'If true, some demo repositories are shown for testing the functionality of BorgButler without any further configuration and running borg backups.'}
+                                      name="showDemoRepos"
+                                      onChange={this.handleCheckboxChange} />
+                    </FormLabelField>
                     <FormLabelField label={<I18n name={'configuration.webDevelopmentMode'} />} fieldLength={2}>
                         <FormCheckbox checked={this.state.webDevelopmentMode}
                                       hintKey={'configuration.webDevelopmentMode.hint'}

--
Gitblit v1.10.0