]> _ Git - cubist_cms-back.git/commitdiff
wip #2965 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Aug 2019 16:33:39 +0000 (18:33 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Aug 2019 16:33:39 +0000 (18:33 +0200)
src/app/Magic/Fields/Color.php [new file with mode: 0644]
src/app/Magic/Fields/Country.php
src/app/Magic/Models/Settings.php

diff --git a/src/app/Magic/Fields/Color.php b/src/app/Magic/Fields/Color.php
new file mode 100644 (file)
index 0000000..4baf7c8
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+
+namespace Cubist\Backpack\app\Magic\Fields;
+
+
+class Color
+{
+    protected $_adminType = 'color';
+}
index 1aede72b0b6e14260752554f0429b6e0a96f4bf4..44d80f814cd626511ba896d5273f4265a15df11c 100644 (file)
@@ -2,8 +2,6 @@
 
 
 namespace Cubist\Backpack\app\Magic\Fields;
-
-
 use Illuminate\Support\Facades\App;
 
 class Country extends Locale
index a2378a00eab1c600a3497bcf7a7a61aa11a20165..50f2bb80c6b835b13eb8bf79c86d68893b6b7907 100644 (file)
@@ -16,7 +16,35 @@ class Settings extends CubistMagicModel
     public function setFields()
     {
         parent::setFields();
+        $this->_seo();
+        $this->_pwa();
+        $this->_favicon();
+    }
+
+    protected function _pwa()
+    {
+        $tab = 'Progressive Web App';
+
+        $this->addField(['name' => 'pwa_theme_color',
+            'label' => 'Couleur du thème',
+            'type' => 'Color',
+            'hint' => 'Couleur utilisée pour personnaliser le navigateur',
+            'tab' => $tab]);
+
+        $this->addField(['name' => 'pwa_name',
+            'label' => 'Nom de l\'application',
+            'type' => 'Text',
+            'tab' => $tab]);
 
+        $this->addField(['name' => 'pwa_short_name',
+            'label' => 'Nom court',
+            'type' => 'Text',
+            'hint' => 'Titre affiché sur l\'écran d\'accueil',
+            'tab' => $tab]);
+    }
+
+    protected function _seo()
+    {
         $this->addField(['name' => 'meta_title',
             'label' => 'Titre long par défaut',
             'type' => 'Text',