-
Notifications
You must be signed in to change notification settings - Fork 32
/
nova-settings-tool.php
97 lines (80 loc) · 2.49 KB
/
nova-settings-tool.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
return [
/*
|--------------------------------------------------------------------------
| Settings Path
|--------------------------------------------------------------------------
|
| Path to the JSON file where settings are stored.
|
*/
'path' => storage_path('app/settings.json'),
/*
|--------------------------------------------------------------------------
| Sidebar Label
|--------------------------------------------------------------------------
|
| The text that Nova displays for this tool in the navigation sidebar.
|
*/
'sidebar-label' => 'Settings',
/*
|--------------------------------------------------------------------------
| Title
|--------------------------------------------------------------------------
|
| The browser/meta page title for the tool.
|
*/
'title' => 'Settings',
/*
|--------------------------------------------------------------------------
| Settings
|--------------------------------------------------------------------------
|
| The good stuff :). Each setting defined here will render a field in the
| tool. The only required key is `key`, other available keys include `type`,
| `label`, `help`, `placeholder`, `language`, and `panel`.
|
*/
'settings' => [
[
'key' => 'twitter_url',
'label' => 'Twitter Profile',
'panel' => 'Social',
],
[
'key' => 'feature_42',
'label' => 'Feature 42',
'type' => 'toggle',
'help' => 'For the upcoming release. <a href="/docs#feature_42">Read more here.</a>',
],
[
'key' => 'welcome',
'label' => 'Welcome Message',
'type' => 'textarea',
'help' => 'Greeting for new users on their first login.',
],
[
'key' => 'snippet',
'label' => 'Tracking Snippet',
'type' => 'code',
'language' => 'htmlmixed',
'help' => 'Analytics snippet to add to all marketing pages.',
],
[
'key' => 'theme',
'label' => 'Default App Theme',
'type' => 'select',
'options' => [
'dark' => 'Dark theme',
'light' => 'Light theme',
],
],
[
'key' => 'timeout',
'type' => 'Number',
'label' => 'Timeout (min.)',
],
],
];