ultra_settings 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/app/application.css +67 -29
- data/app/application_vars.css.erb +11 -5
- data/app/configuration.html.erb +35 -22
- data/app/index.html.erb +0 -14
- data/lib/ultra_settings/configuration_view.rb +84 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec11cc8661b191dbb102deec0798f47ef11495feb8675f2f5b83e3e5d752855f
|
4
|
+
data.tar.gz: e3f729687eaad31be948aa8f7b4818f25fb842cec8261058aa1a9f62616639c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 455632dc476fc7ed73a70d784d97de612db55c1c2650e31b0896727f9747c8e4ddc3a2bfcdf9c2b190180c4f3d157aca427b75abf68c6e5f312b1251d9f24fc5
|
7
|
+
data.tar.gz: 83e7686584d1ea62747d693c17f9f43908d70a5f5b45541d9f129b2e33e92521b0ce0c87d4c8ec10e3416afd186fefee93f281a6bfa0871c8b56e741d1fc44f6
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## 2.6.1
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- Show icons on the web UI that open a dialog with the current value for each data source.
|
12
|
+
|
7
13
|
## 2.6.0
|
8
14
|
|
9
15
|
### Added
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.1
|
data/app/application.css
CHANGED
@@ -6,7 +6,6 @@
|
|
6
6
|
margin: 0;
|
7
7
|
}
|
8
8
|
|
9
|
-
/* Configuration file header */
|
10
9
|
.ultra-settings-config-file {
|
11
10
|
margin-bottom: 1.5rem;
|
12
11
|
padding: 1rem;
|
@@ -23,7 +22,7 @@
|
|
23
22
|
|
24
23
|
.ultra-settings-config-file-path {
|
25
24
|
font-family: monospace;
|
26
|
-
font-size: 0.
|
25
|
+
font-size: 0.875rem;
|
27
26
|
color: var(--code-color);
|
28
27
|
font-weight: 600;
|
29
28
|
}
|
@@ -34,14 +33,16 @@
|
|
34
33
|
margin-left: 0.5rem;
|
35
34
|
}
|
36
35
|
|
37
|
-
/* Fields container */
|
38
36
|
.ultra-settings-fields {
|
39
37
|
display: flex;
|
40
38
|
flex-direction: column;
|
41
|
-
gap:
|
39
|
+
gap: 1.75rem;
|
40
|
+
}
|
41
|
+
|
42
|
+
.ultra-settings-fields svg {
|
43
|
+
vertical-align: middle;
|
42
44
|
}
|
43
45
|
|
44
|
-
/* Individual field card */
|
45
46
|
.ultra-settings-field {
|
46
47
|
border: 1px solid var(--field-border-color);
|
47
48
|
border-radius: 0.5rem;
|
@@ -49,7 +50,6 @@
|
|
49
50
|
overflow: hidden;
|
50
51
|
}
|
51
52
|
|
52
|
-
/* Field header */
|
53
53
|
.ultra-settings-field-header {
|
54
54
|
display: flex;
|
55
55
|
justify-content: space-between;
|
@@ -80,7 +80,6 @@
|
|
80
80
|
letter-spacing: 0.025em;
|
81
81
|
}
|
82
82
|
|
83
|
-
/* Field badges */
|
84
83
|
.ultra-settings-field-badge {
|
85
84
|
display: inline-block;
|
86
85
|
padding: 0.125rem 0.5rem;
|
@@ -101,16 +100,15 @@
|
|
101
100
|
color: var(--static-badge-text-color);
|
102
101
|
}
|
103
102
|
|
104
|
-
/* Field value */
|
105
103
|
.ultra-settings-field-value {
|
106
104
|
padding: 1rem;
|
107
105
|
background-color: var(--value-bg-color);
|
108
106
|
border-bottom: 1px solid var(--field-border-color);
|
109
107
|
}
|
110
108
|
|
111
|
-
.ultra-settings-field-value
|
109
|
+
code.ultra-settings-field-data-value {
|
112
110
|
font-family: monospace;
|
113
|
-
font-size: 0.
|
111
|
+
font-size: 0.875rem;
|
114
112
|
word-break: break-all;
|
115
113
|
color: var(--value-text-color);
|
116
114
|
background-color: var(--value-code-bg-color);
|
@@ -122,14 +120,11 @@
|
|
122
120
|
.ultra-settings-nil-value {
|
123
121
|
font-style: italic;
|
124
122
|
color: var(--nil-color);
|
125
|
-
font-size: 0.9rem;
|
126
123
|
}
|
127
124
|
|
128
|
-
/* Field description */
|
129
125
|
.ultra-settings-field-description {
|
130
126
|
padding: 0.75rem 1rem;
|
131
127
|
color: var(--description-color);
|
132
|
-
font-size: 0.9rem;
|
133
128
|
line-height: 1.5;
|
134
129
|
border-bottom: 1px solid var(--field-border-color);
|
135
130
|
display: flex;
|
@@ -141,15 +136,6 @@
|
|
141
136
|
flex: 1;
|
142
137
|
}
|
143
138
|
|
144
|
-
.ultra-settings-info-icon {
|
145
|
-
width: 16px;
|
146
|
-
height: 16px;
|
147
|
-
flex-shrink: 0;
|
148
|
-
margin-top: 0.125rem; /* Align with first line of text based on line-height */
|
149
|
-
color: var(--description-color);
|
150
|
-
}
|
151
|
-
|
152
|
-
/* Sources section */
|
153
139
|
.ultra-settings-field-sources {
|
154
140
|
padding: 0.5rem;
|
155
141
|
}
|
@@ -172,7 +158,7 @@
|
|
172
158
|
}
|
173
159
|
|
174
160
|
.ultra-settings-source-type {
|
175
|
-
font-size: 0.
|
161
|
+
font-size: 0.875rem;
|
176
162
|
font-weight: 500;
|
177
163
|
color: var(--source-type-color);
|
178
164
|
text-transform: uppercase;
|
@@ -182,8 +168,9 @@
|
|
182
168
|
|
183
169
|
.ultra-settings-source-value {
|
184
170
|
font-family: monospace;
|
185
|
-
font-size: 0.
|
171
|
+
font-size: 0.875rem;
|
186
172
|
color: var(--source-value-color);
|
173
|
+
font-weight: 550;
|
187
174
|
flex: 1;
|
188
175
|
margin: 0 0.75rem;
|
189
176
|
word-break: break-all;
|
@@ -197,6 +184,26 @@
|
|
197
184
|
letter-spacing: 0.025em;
|
198
185
|
}
|
199
186
|
|
187
|
+
.ultra-settings-source-value-dfn {
|
188
|
+
display: inline-block;
|
189
|
+
margin-left: 0.25rem;
|
190
|
+
}
|
191
|
+
|
192
|
+
.ultra-settings-icon-info {
|
193
|
+
color: var(--info-color);
|
194
|
+
cursor: pointer;
|
195
|
+
}
|
196
|
+
|
197
|
+
.ultra-settings-icon-not-set {
|
198
|
+
color: var(--warning-color);
|
199
|
+
cursor: pointer;
|
200
|
+
}
|
201
|
+
|
202
|
+
.ultra-settings-icon-secret {
|
203
|
+
color: var(--disabled-color);
|
204
|
+
cursor: pointer;
|
205
|
+
}
|
206
|
+
|
200
207
|
.ultra-settings-edit-link {
|
201
208
|
color: var(--edit-link-color);
|
202
209
|
text-decoration: none;
|
@@ -211,11 +218,6 @@
|
|
211
218
|
opacity: 1;
|
212
219
|
}
|
213
220
|
|
214
|
-
.ultra-settings-edit-icon {
|
215
|
-
width: 16px;
|
216
|
-
height: 16px;
|
217
|
-
}
|
218
|
-
|
219
221
|
.ultra-settings-select {
|
220
222
|
display: inline-block;
|
221
223
|
padding: .375rem 2.25rem .375rem .75rem;
|
@@ -236,3 +238,39 @@
|
|
236
238
|
-moz-appearance: none;
|
237
239
|
appearance: none;
|
238
240
|
}
|
241
|
+
|
242
|
+
.ultra-settings-dialog {
|
243
|
+
min-width: 20rem;
|
244
|
+
padding: 0;
|
245
|
+
border: 1px solid var(--field-border-color);
|
246
|
+
border-radius: 0.375rem;
|
247
|
+
}
|
248
|
+
|
249
|
+
.ultra-settings-dialog-header {
|
250
|
+
padding: 0.5rem;
|
251
|
+
background-color: var(--field-header-bg-color);
|
252
|
+
color: var(--field-header-text-color);
|
253
|
+
font-size: 1rem;
|
254
|
+
display: flex;
|
255
|
+
align-items: top;
|
256
|
+
}
|
257
|
+
|
258
|
+
.ultra-settings-dialog-title {
|
259
|
+
flex: 1;
|
260
|
+
text-align: center;
|
261
|
+
font-weight: 550;
|
262
|
+
}
|
263
|
+
|
264
|
+
.ultra-settings-dialog-close {
|
265
|
+
border: none;
|
266
|
+
background: none;
|
267
|
+
color: var(--field-header-text-color);
|
268
|
+
cursor: pointer;
|
269
|
+
padding: 0.25rem;
|
270
|
+
}
|
271
|
+
|
272
|
+
.ultra-settings-dialog-body {
|
273
|
+
padding: 1rem;
|
274
|
+
background-color: var(--background-color);
|
275
|
+
color: var(--text-color);
|
276
|
+
}
|
@@ -10,7 +10,8 @@
|
|
10
10
|
--config-file-border-color: #e8e8e8;
|
11
11
|
--field-bg-color: #ffffff;
|
12
12
|
--field-border-color: #b8b8b8;
|
13
|
-
--field-header-bg-color: #
|
13
|
+
--field-header-bg-color: #e8e8e8;
|
14
|
+
--field-header-text-color: #212529;
|
14
15
|
--value-bg-color: #fdfdfe;
|
15
16
|
--value-text-color: #212529;
|
16
17
|
--value-code-bg-color: #f8f8f8;
|
@@ -18,7 +19,9 @@
|
|
18
19
|
--type-color: #6c757d;
|
19
20
|
--description-color: #4a83b5;
|
20
21
|
--nil-color: #6c757d;
|
21
|
-
--warning-color: #
|
22
|
+
--warning-color: #b9202f;
|
23
|
+
--info-color: #6ea8fe;
|
24
|
+
--disabled-color: #adb5bd;
|
22
25
|
|
23
26
|
/* Source colors */
|
24
27
|
--source-bg-color: #f8f9fa;
|
@@ -26,7 +29,7 @@
|
|
26
29
|
--source-active-bg-color: #e7f3ff;
|
27
30
|
--source-active-border-color: #0d6efd;
|
28
31
|
--source-type-color: #666666;
|
29
|
-
--source-value-color: #
|
32
|
+
--source-value-color: #444444;
|
30
33
|
--source-indicator-color: #0d6efd;
|
31
34
|
|
32
35
|
/* Badge colors */
|
@@ -48,15 +51,16 @@
|
|
48
51
|
--form-control-color: #eee;
|
49
52
|
--form-control-bg-color: #666;
|
50
53
|
--form-control-border-color: #555;
|
51
|
-
--code-color: #
|
54
|
+
--code-color: #fd76a3;
|
52
55
|
--em-color: #adb5bd;
|
53
56
|
|
54
57
|
/* Card layout colors */
|
55
|
-
--config-file-bg-color: #
|
58
|
+
--config-file-bg-color: #4b4b4b;
|
56
59
|
--config-file-border-color: #444;
|
57
60
|
--field-bg-color: #1e1e1e;
|
58
61
|
--field-border-color: #444;
|
59
62
|
--field-header-bg-color: #2b2b2b;
|
63
|
+
--field-header-text-color: #ced4da;
|
60
64
|
--value-bg-color: #252525;
|
61
65
|
--value-text-color: #e9ecef;
|
62
66
|
--value-code-bg-color: #2b2b2b;
|
@@ -65,6 +69,8 @@
|
|
65
69
|
--description-color: #a9d9f8;
|
66
70
|
--nil-color: #cdcecfff;
|
67
71
|
--warning-color: #dc3545;
|
72
|
+
--info-color: #6ea8fe;
|
73
|
+
--disabled-color: #adb5bd;
|
68
74
|
|
69
75
|
/* Source colors */
|
70
76
|
--source-bg-color: #2b2b2b;
|
data/app/configuration.html.erb
CHANGED
@@ -32,17 +32,15 @@
|
|
32
32
|
<% if configuration[field.name].nil? %>
|
33
33
|
<span class="ultra-settings-nil-value">nil</span>
|
34
34
|
<% elsif field.secret? %>
|
35
|
-
<code><%= html_escape(secret_value(configuration[field.name])) %></code>
|
35
|
+
<code class="ultra-settings-field-data-value"><%= html_escape(secret_value(configuration[field.name])) %></code>
|
36
36
|
<% else %>
|
37
|
-
<code><%= html_escape(display_value(configuration[field.name])) %></code>
|
37
|
+
<code class="ultra-settings-field-data-value"><%= html_escape(display_value(configuration[field.name])) %></code>
|
38
38
|
<% end %>
|
39
39
|
</div>
|
40
40
|
|
41
41
|
<% unless field.description.to_s.empty? %>
|
42
42
|
<div class="ultra-settings-field-description">
|
43
|
-
|
44
|
-
<use href="#info-icon"/>
|
45
|
-
</svg>
|
43
|
+
<%= info_icon %>
|
46
44
|
<div class="ultra-settings-description-text">
|
47
45
|
<%= html_escape(field.description) %>
|
48
46
|
</div>
|
@@ -52,8 +50,13 @@
|
|
52
50
|
<div class="ultra-settings-field-sources">
|
53
51
|
<% if field.env_var && !configuration.class.environment_variables_disabled? %>
|
54
52
|
<div class="ultra-settings-source <%= 'ultra-settings-source-active' if source == :env %>">
|
55
|
-
<span class="ultra-settings-source-type">
|
56
|
-
|
53
|
+
<span class="ultra-settings-source-type">
|
54
|
+
Environment Variable
|
55
|
+
</span>
|
56
|
+
<code class="ultra-settings-source-value">
|
57
|
+
<%= field.env_var %>
|
58
|
+
<%= show_defined_value(field.env_var, configuration.__value_from_source__(field.name, :env), field.secret?) %>
|
59
|
+
</code>
|
57
60
|
<% if source == :env %>
|
58
61
|
<span class="ultra-settings-source-indicator">Currently active</span>
|
59
62
|
<% end %>
|
@@ -63,16 +66,17 @@
|
|
63
66
|
<% if field.runtime_setting && !configuration.class.runtime_settings_disabled? %>
|
64
67
|
<div class="ultra-settings-source <%= 'ultra-settings-source-active' if source == :settings %>">
|
65
68
|
<span class="ultra-settings-source-type">Runtime Setting</span>
|
66
|
-
<code class="ultra-settings-source-value"
|
69
|
+
<code class="ultra-settings-source-value">
|
70
|
+
<%= field.runtime_setting %>
|
71
|
+
<%= show_defined_value(field.runtime_setting, configuration.__value_from_source__(field.name, :settings), field.secret?) %>
|
72
|
+
</code>
|
67
73
|
<% if source == :settings %>
|
68
74
|
<span class="ultra-settings-source-indicator">Currently active</span>
|
69
75
|
<% end %>
|
70
76
|
<% edit_url = UltraSettings.runtime_settings_url(field.runtime_setting, field.type) %>
|
71
77
|
<% if edit_url %>
|
72
78
|
<a href="<%= html_escape(edit_url) %>" class="ultra-settings-edit-link" title="Edit <%= html_escape(field.runtime_setting) %>">
|
73
|
-
|
74
|
-
<use href="#edit-icon"/>
|
75
|
-
</svg>
|
79
|
+
<%= edit_icon %>
|
76
80
|
</a>
|
77
81
|
<% end %>
|
78
82
|
</div>
|
@@ -81,25 +85,22 @@
|
|
81
85
|
<% if field.yaml_key && !configuration.class.yaml_config_disabled? %>
|
82
86
|
<div class="ultra-settings-source <%= 'ultra-settings-source-active' if source == :yaml %>">
|
83
87
|
<span class="ultra-settings-source-type">Configuration File</span>
|
84
|
-
<code class="ultra-settings-source-value"
|
88
|
+
<code class="ultra-settings-source-value">
|
89
|
+
<%= field.yaml_key %>
|
90
|
+
<%= show_defined_value(field.yaml_key, configuration.__value_from_source__(field.name, :yaml), field.secret?) %>
|
91
|
+
</code>
|
85
92
|
<% if source == :yaml %>
|
86
93
|
<span class="ultra-settings-source-indicator">Currently active</span>
|
87
94
|
<% end %>
|
88
95
|
</div>
|
89
96
|
<% end %>
|
90
97
|
|
91
|
-
<% if field.default.nil? %>
|
92
|
-
<% if source == :default %>
|
93
|
-
<div class="ultra-settings-source ultra-settings-source-active">
|
94
|
-
<span class="ultra-settings-source-type">Default Value</span>
|
95
|
-
<span class="ultra-settings-source-value"><em>Not set</em></span>
|
96
|
-
<span class="ultra-settings-source-indicator">Currently active</span>
|
97
|
-
</div>
|
98
|
-
<% end %>
|
99
|
-
<% else %>
|
98
|
+
<% if !field.default.nil? || source == :default %>
|
100
99
|
<div class="ultra-settings-source <%= 'ultra-settings-source-active' if source == :default %>">
|
101
100
|
<span class="ultra-settings-source-type">Default Value</span>
|
102
|
-
<code class="ultra-settings-source-value"
|
101
|
+
<code class="ultra-settings-source-value">
|
102
|
+
<%= show_defined_value("Default Value", field.default, field.secret?) %>
|
103
|
+
</code>
|
103
104
|
<% if source == :default %>
|
104
105
|
<span class="ultra-settings-source-indicator">Currently active</span>
|
105
106
|
<% end %>
|
@@ -109,4 +110,16 @@
|
|
109
110
|
</div>
|
110
111
|
<% end %>
|
111
112
|
</div>
|
113
|
+
|
114
|
+
<dialog class="ultra-settings-dialog" closedby="any">
|
115
|
+
<div class="ultra-settings-dialog-header">
|
116
|
+
<div class="ultra-settings-dialog-title"></div>
|
117
|
+
<button class="ultra-settings-dialog-close" onclick="this.closest('.ultra-settings-dialog').close();">
|
118
|
+
<%= close_icon %>
|
119
|
+
</button>
|
120
|
+
</div>
|
121
|
+
<div class="ultra-settings-dialog-body">
|
122
|
+
<code class="ultra-settings-field-data-value ultra-settings-dialog-value"></code>
|
123
|
+
</div>
|
124
|
+
</dialog>
|
112
125
|
</div>
|
data/app/index.html.erb
CHANGED
@@ -1,19 +1,5 @@
|
|
1
1
|
<%= style_tag %>
|
2
2
|
|
3
|
-
<!-- SVG Icons -->
|
4
|
-
<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">
|
5
|
-
<defs>
|
6
|
-
<symbol id="edit-icon" viewBox="0 0 16 16">
|
7
|
-
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
|
8
|
-
<path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
|
9
|
-
</symbol>
|
10
|
-
<symbol id="info-icon" viewBox="0 0 16 16">
|
11
|
-
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/>
|
12
|
-
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/>
|
13
|
-
</symbol>
|
14
|
-
</defs>
|
15
|
-
</svg>
|
16
|
-
|
17
3
|
<div class="ultra-settings">
|
18
4
|
<div class="ultra-settings-nav">
|
19
5
|
<form onsubmit="return false" style="margin-bottom: 0.5rem;">
|
@@ -42,14 +42,29 @@ module UltraSettings
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def show_defined_value(label, value, secret)
|
45
|
-
|
46
|
-
|
45
|
+
val = nil
|
46
|
+
icon = nil
|
47
|
+
css_class = nil
|
48
|
+
|
49
|
+
if value.nil?
|
50
|
+
val = "Not set"
|
51
|
+
icon = not_set_icon
|
52
|
+
css_class = "ultra-settings-icon-not-set"
|
47
53
|
elsif secret
|
48
|
-
|
54
|
+
val = secret_value(value)
|
55
|
+
icon = lock_icon
|
56
|
+
css_class = "ultra-settings-icon-secret"
|
49
57
|
else
|
50
|
-
|
58
|
+
val = display_value(value)
|
59
|
+
icon = eye_icon
|
60
|
+
css_class = "ultra-settings-icon-info"
|
51
61
|
end
|
52
|
-
|
62
|
+
|
63
|
+
<<~HTML
|
64
|
+
<dfn class="#{css_class}" title="#{html_escape(val)}" onclick="#{html_escape(open_dialog_script)}" data-label="#{html_escape(label)}">
|
65
|
+
#{icon}
|
66
|
+
</dfn>
|
67
|
+
HTML
|
53
68
|
end
|
54
69
|
|
55
70
|
def secret_value(value)
|
@@ -68,5 +83,69 @@ module UltraSettings
|
|
68
83
|
end
|
69
84
|
path.relative_path_from(root_path)
|
70
85
|
end
|
86
|
+
|
87
|
+
def info_icon(size = 16)
|
88
|
+
<<~HTML
|
89
|
+
<svg width="#{size}" height="#{size}" fill="currentColor" viewBox="0 0 16 16">
|
90
|
+
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/>
|
91
|
+
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/>
|
92
|
+
</svg>
|
93
|
+
HTML
|
94
|
+
end
|
95
|
+
|
96
|
+
def not_set_icon(size = 16)
|
97
|
+
<<~HTML
|
98
|
+
<svg width="#{size}" height="#{size}" fill="currentColor" viewBox="0 0 16 16">
|
99
|
+
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/>
|
100
|
+
<path d="M11.354 4.646a.5.5 0 0 0-.708 0l-6 6a.5.5 0 0 0 .708.708l6-6a.5.5 0 0 0 0-.708"/>
|
101
|
+
</svg>
|
102
|
+
HTML
|
103
|
+
end
|
104
|
+
|
105
|
+
def lock_icon(size = 16)
|
106
|
+
<<~HTML
|
107
|
+
<svg width="#{size}" height="#{size}" fill="currentColor" viewBox="0 0 16 16">
|
108
|
+
<path fill-rule="evenodd" d="M8 0a4 4 0 0 1 4 4v2.05a2.5 2.5 0 0 1 2 2.45v5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 13.5v-5a2.5 2.5 0 0 1 2-2.45V4a4 4 0 0 1 4-4m0 1a3 3 0 0 0-3 3v2h6V4a3 3 0 0 0-3-3"/>
|
109
|
+
</svg>
|
110
|
+
HTML
|
111
|
+
end
|
112
|
+
|
113
|
+
def edit_icon(size = 16)
|
114
|
+
<<~HTML
|
115
|
+
<svg width="#{size}" height="#{size}" fill="currentColor" viewBox="0 0 16 16">
|
116
|
+
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
|
117
|
+
<path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
|
118
|
+
</svg>
|
119
|
+
HTML
|
120
|
+
end
|
121
|
+
|
122
|
+
def eye_icon(size = 16)
|
123
|
+
<<~HTML
|
124
|
+
<svg width="#{size}" height="#{size}" fill="currentColor" viewBox="0 0 16 16">
|
125
|
+
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
|
126
|
+
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>
|
127
|
+
</svg>
|
128
|
+
HTML
|
129
|
+
end
|
130
|
+
|
131
|
+
def close_icon(size = 16)
|
132
|
+
<<~HTML
|
133
|
+
<svg width="#{size}" height="#{size}" fill="currentColor" viewBox="0 0 16 16">
|
134
|
+
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/>
|
135
|
+
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>
|
136
|
+
</svg>
|
137
|
+
HTML
|
138
|
+
end
|
139
|
+
|
140
|
+
private
|
141
|
+
|
142
|
+
def open_dialog_script
|
143
|
+
<<~JAVASCRIPT.gsub(/\s+/, " ").tr('"', "'")
|
144
|
+
this.closest('.ultra-settings-configuration').querySelector('.ultra-settings-dialog-title').textContent = this.dataset.label;
|
145
|
+
this.closest('.ultra-settings-configuration').querySelector('.ultra-settings-dialog-value').textContent = this.title;
|
146
|
+
this.closest('.ultra-settings-configuration').querySelector('.ultra-settings-dialog').showModal();
|
147
|
+
this.closest('.ultra-settings-configuration').querySelector('.ultra-settings-dialog-close').blur();
|
148
|
+
JAVASCRIPT
|
149
|
+
end
|
71
150
|
end
|
72
151
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultra_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Durand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|