solara 0.3.0 → 0.5.0
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/solara/lib/.DS_Store +0 -0
- data/solara/lib/core/.DS_Store +0 -0
- data/solara/lib/core/brands/brand_switcher.rb +58 -1
- data/solara/lib/core/dashboard/.DS_Store +0 -0
- data/solara/lib/core/dashboard/brand/BrandDetail.js +34 -2
- data/solara/lib/core/dashboard/brand/BrandDetailController.js +23 -206
- data/solara/lib/core/dashboard/brand/BrandDetailModel.js +13 -5
- data/solara/lib/core/dashboard/brand/BrandDetailView.js +16 -178
- data/solara/lib/core/dashboard/brand/SectionsFormManager.js +232 -0
- data/solara/lib/core/dashboard/brand/brand.html +199 -199
- data/solara/lib/core/dashboard/brand/source/BrandLocalSource.js +2 -5
- data/solara/lib/core/dashboard/brand/source/BrandRemoteSource.js +36 -133
- data/solara/lib/core/dashboard/brands/Brands.js +31 -0
- data/solara/lib/core/dashboard/brands/BrandsController.js +0 -5
- data/solara/lib/core/dashboard/brands/BrandsView.js +2 -2
- data/solara/lib/core/dashboard/brands/brands.html +71 -52
- data/solara/lib/core/dashboard/component/AliasesBottomSheet.js +6 -6
- data/solara/lib/core/dashboard/component/BrandOptionsBottomSheet.js +4 -4
- data/solara/lib/core/dashboard/component/ConfirmationDialog.js +15 -10
- data/solara/lib/core/dashboard/component/EditJsonSheet.js +160 -0
- data/solara/lib/core/dashboard/component/MessageBottomSheet.js +5 -5
- data/solara/lib/core/dashboard/component/OnboardBrandBottomSheet.js +5 -3
- data/solara/lib/core/dashboard/handler/base_handler.rb +1 -0
- data/solara/lib/core/dashboard/handler/edit_section_handler.rb +1 -5
- data/solara/lib/core/doctor/schema/brand_configurations.json +0 -8
- data/solara/lib/core/doctor/schema/platform/global/resources_manifest.json +30 -0
- data/solara/lib/core/doctor/schema/platform/json_manifest.json +57 -0
- data/solara/lib/core/doctor/validator/template/android_template_validation_config.yml +35 -1
- data/solara/lib/core/doctor/validator/template/flutter_template_validation_config.yml +30 -1
- data/solara/lib/core/doctor/validator/template/ios_template_validation_config.yml +35 -1
- data/solara/lib/core/doctor/validator/template/template_validator.rb +9 -9
- data/solara/lib/core/scripts/brand_config_manager.rb +1 -1
- data/solara/lib/core/scripts/brand_configurations_manager.rb +41 -0
- data/solara/lib/core/scripts/code_generator.rb +342 -118
- data/solara/lib/core/scripts/file_path.rb +21 -1
- data/solara/lib/core/scripts/gitignore_manager.rb +11 -3
- data/solara/lib/core/scripts/json_manifest_processor.rb +95 -0
- data/solara/lib/core/scripts/platform/ios/infoplist_string_catalog_manager.rb +11 -1
- data/solara/lib/core/scripts/resource_manifest_processor.rb +151 -0
- data/solara/lib/core/scripts/solara_status_manager.rb +1 -1
- data/solara/lib/core/scripts/theme_generator.rb +21 -242
- data/solara/lib/core/solara_configurator.rb +1 -1
- data/solara/lib/core/template/brands/global/resources_manifest.json +10 -0
- data/solara/lib/core/template/brands/json/Json-Manifest.md +61 -0
- data/solara/lib/core/template/brands/json/json_manifest.json +18 -0
- data/solara/lib/core/template/brands/shared/theme.json +213 -29
- data/solara/lib/core/template/config/android_template_config.json +50 -0
- data/solara/lib/core/template/config/flutter_template_config.json +35 -0
- data/solara/lib/core/template/config/ios_template_config.json +50 -0
- data/solara/lib/core/template/configurations.json +46 -0
- data/solara/lib/core/template/project_template_generator.rb +2 -0
- data/solara/lib/solara/version.rb +1 -1
- data/solara/lib/solara.rb +19 -0
- metadata +13 -4
- data/solara/lib/core/dashboard/component/AddFieldSheet.js +0 -175
- data/solara/lib/core/dashboard/handler/brand_configurations_manager.rb +0 -73
@@ -15,7 +15,34 @@
|
|
15
15
|
--border-color: #E1E4E8;
|
16
16
|
--delete-color: #dc3545;
|
17
17
|
--field-shadow: 0 1.4px 3.5px rgba(0, 0, 0, 0.1);
|
18
|
+
|
19
|
+
--card-item-bg: rgba(255, 255, 255, 0.05);
|
20
|
+
--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
21
|
+
--section-shadow: 0 1.4px 7px rgba(0, 0, 0, 0.1);
|
22
|
+
--delete-btn-color: #ff6b6b;
|
23
|
+
--delete-btn-hover: #ff4757;
|
24
|
+
--add-property-btn-color: #5ecd73;
|
25
|
+
--logo-shadow-color: rgba(255, 255, 255, 0.2);
|
26
|
+
--hover: rgba(0, 123, 255, 0.5);
|
27
|
+
}
|
28
|
+
|
29
|
+
body.dark-mode {
|
30
|
+
--primary-color: #2C3E50;
|
31
|
+
--secondary-color: #34495E;
|
32
|
+
--background-color: #1A1A1A;
|
33
|
+
--text-color: #F5F5F5;
|
34
|
+
--border-color: #4A4A4A;
|
35
|
+
--delete-color: #E74C3C;
|
36
|
+
--field-shadow: 0 1.4px 3.5px rgba(255, 255, 255, 0.1);
|
37
|
+
--card-item-bg: rgba(255, 255, 255, 0.1);
|
38
|
+
--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
39
|
+
--section-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
|
40
|
+
--delete-btn-color: #ff8f8f;
|
41
|
+
--delete-btn-hover: #ff6b6b;
|
42
|
+
--add-property-btn-color: #7eed8e;
|
43
|
+
--hover: rgba(255, 255, 255, 0.2);
|
18
44
|
}
|
45
|
+
|
19
46
|
body {
|
20
47
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
21
48
|
background-color: var(--background-color);
|
@@ -24,7 +51,23 @@
|
|
24
51
|
margin: 0;
|
25
52
|
padding-top: 77px;
|
26
53
|
font-size: 12.6px;
|
54
|
+
transition: background-color 0.3s, color 0.3s;
|
55
|
+
}
|
56
|
+
|
57
|
+
.mode-toggle {
|
58
|
+
background: none;
|
59
|
+
border: none;
|
60
|
+
color: white;
|
61
|
+
font-size: 1.5em;
|
62
|
+
cursor: pointer;
|
63
|
+
margin-left: 15px;
|
64
|
+
transition: color 0.3s;
|
27
65
|
}
|
66
|
+
|
67
|
+
.mode-toggle:hover {
|
68
|
+
color: var(--hover);
|
69
|
+
}
|
70
|
+
|
28
71
|
.container {
|
29
72
|
display: table;
|
30
73
|
width: 100%;
|
@@ -66,17 +109,15 @@
|
|
66
109
|
}
|
67
110
|
.index li {
|
68
111
|
padding: 5.6px;
|
69
|
-
border-bottom: 1px solid #eee;
|
70
112
|
margin-bottom: 7px;
|
71
113
|
text-align: left;
|
72
114
|
}
|
73
115
|
|
74
|
-
|
75
116
|
.index li:last-child {
|
76
117
|
border-bottom: none;
|
77
118
|
}
|
78
119
|
.index a {
|
79
|
-
color:
|
120
|
+
color: var(--text-color);
|
80
121
|
text-decoration: none;
|
81
122
|
}
|
82
123
|
.index a:hover {
|
@@ -85,80 +126,43 @@
|
|
85
126
|
.index-item {
|
86
127
|
list-style: none;
|
87
128
|
padding: 7px;
|
88
|
-
|
89
|
-
border-radius: 3.5px;
|
90
|
-
box-shadow: 0 1.4px 3.5px rgba(0, 0, 0, 0.2);
|
91
|
-
transition: box-shadow 0.3s;
|
129
|
+
font-size: 14px;
|
92
130
|
}
|
93
131
|
|
94
132
|
.index-item:hover {
|
95
|
-
|
96
|
-
}
|
97
|
-
.sections {
|
98
|
-
width: 90%;
|
99
|
-
padding: 14px;
|
133
|
+
background-color: var(--hover);
|
100
134
|
}
|
101
135
|
|
102
136
|
h1 {
|
103
137
|
margin: 0;
|
104
138
|
font-size: 1.75em;
|
105
139
|
}
|
106
|
-
|
107
|
-
background-color: white;
|
108
|
-
border-radius: 5.6px;
|
109
|
-
box-shadow: 0 1.4px 7px rgba(0, 0, 0, 0.1);
|
110
|
-
margin-bottom: 21px;
|
111
|
-
padding: 14px;
|
112
|
-
}
|
140
|
+
|
113
141
|
h2 {
|
114
|
-
color: var(--
|
142
|
+
color: var(--text-color);
|
115
143
|
border-bottom: 1.4px solid var(--border-color);
|
116
144
|
padding-bottom: 7px;
|
117
145
|
margin-top: 0;
|
118
146
|
font-size: 1.4em;
|
119
147
|
}
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
align-items: center;
|
124
|
-
background-color: white;
|
125
|
-
border-radius: 5.6px;
|
126
|
-
box-shadow: var(--field-shadow);
|
127
|
-
padding: 7px;
|
128
|
-
transition: box-shadow 0.3s ease;
|
129
|
-
}
|
130
|
-
.input-group:hover {
|
131
|
-
box-shadow: 0 2.8px 5.6px rgba(0, 0, 0, 0.15);
|
132
|
-
}
|
133
|
-
.input-wrapper {
|
134
|
-
display: flex;
|
135
|
-
align-items: center;
|
136
|
-
flex-grow: 1;
|
137
|
-
}
|
138
|
-
.input-wrapper input[type="checkbox"] {
|
139
|
-
margin-right: 7px;
|
140
|
-
flex-grow: 0;
|
141
|
-
}
|
142
|
-
.checkbox-label {
|
143
|
-
flex-grow: 1;
|
144
|
-
}
|
145
|
-
.input-wrapper label[for] {
|
146
|
-
margin-right: 7px;
|
148
|
+
|
149
|
+
h3 {
|
150
|
+
color: var(--primary-color);
|
147
151
|
}
|
152
|
+
|
148
153
|
label {
|
149
154
|
display: inline-block;
|
150
155
|
margin-right: 7px;
|
151
156
|
font-weight: bold;
|
152
|
-
min-width:
|
157
|
+
min-width: 10%;
|
153
158
|
flex-shrink: 0;
|
154
159
|
}
|
155
160
|
input, select {
|
156
|
-
|
157
|
-
|
158
|
-
border:
|
159
|
-
border-radius: 2.8px;
|
160
|
-
font-size: 11.2px;
|
161
|
+
background-color: var(--background-color);
|
162
|
+
color: var(--text-color);
|
163
|
+
border: 1px solid var(--border-color);
|
161
164
|
}
|
165
|
+
|
162
166
|
input[type="color"] {
|
163
167
|
height: 35px;
|
164
168
|
padding: 1.4px;
|
@@ -174,110 +178,9 @@
|
|
174
178
|
transition: background-color 0.3s ease;
|
175
179
|
}
|
176
180
|
button:hover {
|
177
|
-
background-color:
|
181
|
+
background-color: var(--hover);
|
178
182
|
}
|
179
183
|
|
180
|
-
.save-section-btn {
|
181
|
-
background-color: #28a745;
|
182
|
-
margin-top: 7px;
|
183
|
-
margin-right: 7px;
|
184
|
-
}
|
185
|
-
.save-section-btn:hover {
|
186
|
-
background-color: #218838;
|
187
|
-
}
|
188
|
-
.button-group {
|
189
|
-
display: flex;
|
190
|
-
justify-content: flex-start;
|
191
|
-
margin-top: 14px;
|
192
|
-
}
|
193
|
-
.delete-icon {
|
194
|
-
color: var(--delete-color);
|
195
|
-
cursor: pointer;
|
196
|
-
font-weight: bold;
|
197
|
-
font-size: 14px;
|
198
|
-
line-height: 1;
|
199
|
-
padding: 7px 10.5px;
|
200
|
-
margin-left: 7px;
|
201
|
-
border-radius: 2.8px;
|
202
|
-
transition: background-color 0.3s ease;
|
203
|
-
}
|
204
|
-
.delete-icon:hover {
|
205
|
-
color: #fff;
|
206
|
-
background-color: var(--delete-color);
|
207
|
-
}
|
208
|
-
.section-title-container {
|
209
|
-
margin-bottom: 0.7em;
|
210
|
-
}
|
211
|
-
.section-title-container h2 {
|
212
|
-
margin-bottom: 0.14em;
|
213
|
-
}
|
214
|
-
.section-subtitle {
|
215
|
-
font-size: 1.0em;
|
216
|
-
color: #666;
|
217
|
-
margin-bottom: 22.4px;
|
218
|
-
}
|
219
|
-
|
220
|
-
@media (max-width: 768px) {
|
221
|
-
.sections {
|
222
|
-
padding: 7px;
|
223
|
-
}
|
224
|
-
.input-group {
|
225
|
-
flex-direction: column;
|
226
|
-
align-items: flex-start;
|
227
|
-
}
|
228
|
-
label {
|
229
|
-
margin-bottom: 3.5px;
|
230
|
-
}
|
231
|
-
.input-wrapper {
|
232
|
-
width: 100%;
|
233
|
-
}
|
234
|
-
}
|
235
|
-
|
236
|
-
.array-input-container {
|
237
|
-
display: flex;
|
238
|
-
align-items: center;
|
239
|
-
margin-bottom: 3.5px;
|
240
|
-
width: 100%;
|
241
|
-
}
|
242
|
-
|
243
|
-
.array-input {
|
244
|
-
flex-grow: 1;
|
245
|
-
margin-right: 5.6px;
|
246
|
-
}
|
247
|
-
|
248
|
-
.add-array-item {
|
249
|
-
background-color: #4CAF50;
|
250
|
-
color: white;
|
251
|
-
border: none;
|
252
|
-
padding: 3.5px 7px;
|
253
|
-
border-radius: 2.8px;
|
254
|
-
cursor: pointer;
|
255
|
-
}
|
256
|
-
|
257
|
-
.array-items-container {
|
258
|
-
margin-top: 3.5px;
|
259
|
-
width: 100%;
|
260
|
-
}
|
261
|
-
|
262
|
-
.array-item {
|
263
|
-
display: flex;
|
264
|
-
align-items: center;
|
265
|
-
margin-bottom: 3.5px;
|
266
|
-
}
|
267
|
-
|
268
|
-
.array-item-input {
|
269
|
-
flex-grow: 1;
|
270
|
-
margin: 11.2px;
|
271
|
-
}
|
272
|
-
|
273
|
-
.delete-array-item {
|
274
|
-
background-color: #f44336;
|
275
|
-
color: white;
|
276
|
-
border: none;
|
277
|
-
padding: 1.4px 4.2px;
|
278
|
-
border-radius: 2.8px;
|
279
|
-
cursor: pointer;
|
280
|
-
}
|
281
184
|
.logo {
|
282
185
|
width: 52.5px;
|
283
186
|
height: 52.5px;
|
@@ -290,6 +193,7 @@
|
|
290
193
|
}
|
291
194
|
|
292
195
|
.header-container {
|
196
|
+
width: 100%;
|
293
197
|
display: flex;
|
294
198
|
align-items: center;
|
295
199
|
justify-content: center;
|
@@ -306,7 +210,6 @@
|
|
306
210
|
align-items: center;
|
307
211
|
justify-content: center;
|
308
212
|
}
|
309
|
-
|
310
213
|
header {
|
311
214
|
background-color: var(--primary-color);
|
312
215
|
color: white;
|
@@ -330,11 +233,6 @@
|
|
330
233
|
transform: translateY(-100%);
|
331
234
|
}
|
332
235
|
|
333
|
-
h1 {
|
334
|
-
margin: 0;
|
335
|
-
font-size: 1.75em;
|
336
|
-
}
|
337
|
-
|
338
236
|
.action-buttons {
|
339
237
|
width: 100%;
|
340
238
|
background-color: var(--primary-color);
|
@@ -344,36 +242,14 @@
|
|
344
242
|
transition: background-color 0.3s ease, opacity 0.3s ease;
|
345
243
|
}
|
346
244
|
|
347
|
-
.add-field-btn {
|
348
|
-
min-width: 105px;
|
349
|
-
background-color: var(--primary-color);
|
350
|
-
color: white;
|
351
|
-
margin: 7px;
|
352
|
-
font-size: 12.6px;
|
353
|
-
transition: background-color 0.3s ease, opacity 0.3s ease;
|
354
|
-
}
|
355
|
-
|
356
|
-
.apply-changes-button {
|
357
|
-
width: 100%;
|
358
|
-
background-color: #ff4136;
|
359
|
-
color: white;
|
360
|
-
margin: 7px;
|
361
|
-
font-size: 12.6px;
|
362
|
-
transition: background-color 0.3s ease, opacity 0.3s ease;
|
363
|
-
}
|
364
|
-
|
365
245
|
.action-buttons button:hover {
|
366
|
-
|
246
|
+
color: var(--hover);
|
367
247
|
}
|
368
248
|
|
369
249
|
#switchButton {
|
370
250
|
display: none;
|
371
251
|
}
|
372
252
|
|
373
|
-
#applyChangesButton {
|
374
|
-
display: none;
|
375
|
-
}
|
376
|
-
|
377
253
|
#error-button {
|
378
254
|
position: fixed;
|
379
255
|
bottom: 14px;
|
@@ -433,7 +309,8 @@
|
|
433
309
|
left: 50%;
|
434
310
|
transform: translate(-50%, -50%);
|
435
311
|
text-align: center;
|
436
|
-
background-color:
|
312
|
+
background-color: var(--background-color);
|
313
|
+
color: var(--text-color);
|
437
314
|
padding: 28px;
|
438
315
|
border-radius: 14px;
|
439
316
|
box-shadow: 0 2.8px 14px rgba(0, 0, 0, 0.1);
|
@@ -460,7 +337,7 @@
|
|
460
337
|
|
461
338
|
.add-brand-container h2 {
|
462
339
|
font-size: 12.6px;
|
463
|
-
color:
|
340
|
+
color: var(--text-color);
|
464
341
|
margin-bottom: 21px;
|
465
342
|
animation: slideDown 0.5s ease-out 0.3s both;
|
466
343
|
}
|
@@ -482,13 +359,12 @@
|
|
482
359
|
}
|
483
360
|
|
484
361
|
.add-brand-container button:hover {
|
485
|
-
background-color: #3A7BC8;
|
486
362
|
transform: scale(1.05);
|
487
363
|
}
|
488
364
|
|
489
365
|
.button-message {
|
490
366
|
font-size: 12.6px;
|
491
|
-
color:
|
367
|
+
color: var(--text-color);
|
492
368
|
margin-bottom: 3.5px;
|
493
369
|
opacity: 0;
|
494
370
|
animation: fadeInMessage 0.5s ease-out forwards;
|
@@ -530,7 +406,7 @@
|
|
530
406
|
left: 0;
|
531
407
|
width: 100%;
|
532
408
|
height: 100%;
|
533
|
-
background-color:
|
409
|
+
background-color: var(--background-color);
|
534
410
|
display: flex;
|
535
411
|
align-items: center;
|
536
412
|
justify-content: center;
|
@@ -541,31 +417,155 @@
|
|
541
417
|
width: 105px;
|
542
418
|
height: 105px;
|
543
419
|
margin-right: 14px;
|
544
|
-
filter: drop-shadow(2.1px 2.1px 2.1px
|
420
|
+
filter: drop-shadow(2.1px 2.1px 2.1px var(--logo-shadow-color));
|
545
421
|
transition: transform 0.3s ease;
|
546
422
|
}
|
423
|
+
|
424
|
+
.sections {
|
425
|
+
width: 90%;
|
426
|
+
padding: 14px;
|
427
|
+
}
|
428
|
+
.section {
|
429
|
+
background-color: var(--background-color);
|
430
|
+
border-radius: 5.6px;
|
431
|
+
box-shadow: var(--section-shadow);
|
432
|
+
margin-bottom: 21px;
|
433
|
+
padding: 14px;
|
434
|
+
}
|
435
|
+
.section-title {
|
436
|
+
color: var(--text-color);
|
437
|
+
}
|
438
|
+
.section-title-container {
|
439
|
+
margin-bottom: 0.7em;
|
440
|
+
}
|
441
|
+
.section-title-container h2 {
|
442
|
+
margin-bottom: 0.14em;
|
443
|
+
}
|
444
|
+
|
445
|
+
@media (max-width: 768px) {
|
446
|
+
.sections {
|
447
|
+
padding: 7px;
|
448
|
+
}
|
449
|
+
label {
|
450
|
+
margin-bottom: 3.5px;
|
451
|
+
}
|
452
|
+
}
|
453
|
+
.card {
|
454
|
+
background-color: var(--background-color);
|
455
|
+
color: var(--text-color);
|
456
|
+
}
|
457
|
+
.card-header {
|
458
|
+
display: flex;
|
459
|
+
align-items: center;
|
460
|
+
font-weight: bold;
|
461
|
+
margin-bottom: 10px;
|
462
|
+
}
|
463
|
+
.card-content {
|
464
|
+
margin-left: 15px;
|
465
|
+
}
|
466
|
+
.card-item {
|
467
|
+
padding-top: 5px;
|
468
|
+
padding-bottom: 5px;
|
469
|
+
padding-left: 10px;
|
470
|
+
padding-right: 5px;
|
471
|
+
margin-bottom: 20px;
|
472
|
+
display: flex;
|
473
|
+
flex-direction: column;
|
474
|
+
align-items: flex-start;
|
475
|
+
background: var(--card-item-bg);
|
476
|
+
border-radius: 10px;
|
477
|
+
box-shadow: var(--card-shadow);
|
478
|
+
}
|
479
|
+
.card-item:hover {
|
480
|
+
transform: translateY(-1.5px);
|
481
|
+
}
|
482
|
+
.card-key {
|
483
|
+
min-width: 20%;
|
484
|
+
font-weight: bold;
|
485
|
+
cursor: pointer;
|
486
|
+
text-align: left;
|
487
|
+
display: flex;
|
488
|
+
justify-content: flex-start;
|
489
|
+
padding-right: 10px;
|
490
|
+
font-size: 14px;
|
491
|
+
margin-bottom: 5px;
|
492
|
+
margin-right: 10px;
|
493
|
+
hyphens: auto;
|
494
|
+
word-break: break-word;
|
495
|
+
}
|
496
|
+
.card-value-container {
|
497
|
+
display: flex;
|
498
|
+
flex-direction: row;
|
499
|
+
align-items: center;
|
500
|
+
width: 100%;
|
501
|
+
}
|
502
|
+
.card-value {
|
503
|
+
flex: 1 1 80%;
|
504
|
+
width: 100%;
|
505
|
+
display: flex;
|
506
|
+
min-height: 25px;
|
507
|
+
border: 1px solid var(--border-color);
|
508
|
+
border-radius: 3px;
|
509
|
+
margin-bottom: 5px;
|
510
|
+
resize: vertical;
|
511
|
+
flex-direction: column;
|
512
|
+
padding-top: 15px;
|
513
|
+
padding-left: 10px;
|
514
|
+
padding-right: 10px;
|
515
|
+
background-color: var(--background-color);
|
516
|
+
color: var(--text-color);
|
517
|
+
}
|
518
|
+
.card-actions {
|
519
|
+
display: flex;
|
520
|
+
align-items: center;
|
521
|
+
justify-content: flex-start;
|
522
|
+
}
|
523
|
+
.delete-btn {
|
524
|
+
background-color: transparent;
|
525
|
+
color: var(--delete-btn-color);
|
526
|
+
border: none;
|
527
|
+
cursor: pointer;
|
528
|
+
font-size: 16px;
|
529
|
+
margin-left: 5px;
|
530
|
+
}
|
531
|
+
.delete-btn:hover {
|
532
|
+
color: var(--delete-btn-hover);
|
533
|
+
}
|
534
|
+
.add-property-btn {
|
535
|
+
background: none;
|
536
|
+
border: none;
|
537
|
+
color: var(--add-property-btn-color);
|
538
|
+
cursor: pointer;
|
539
|
+
font-size: 16px;
|
540
|
+
}
|
547
541
|
</style>
|
548
542
|
</head>
|
549
|
-
<body>
|
543
|
+
<body class="dark-mode">
|
550
544
|
|
551
545
|
<header id="header" class="header-container">
|
552
546
|
<div class="header-content">
|
553
547
|
<img class="logo" src="../solara.png" alt="Splash Image">
|
554
548
|
<h1><span id="brandNametitle"></span></h1>
|
549
|
+
<button id="modeToggle" class="mode-toggle" aria-label="Toggle dark/light mode">
|
550
|
+
<i class="fas fa-sun"></i>
|
551
|
+
</button>
|
555
552
|
</div>
|
556
|
-
|
557
553
|
</header>
|
558
554
|
|
559
555
|
<div class="loading-overlay" id="loadingOverlay">
|
560
556
|
<img class="loading-overlay-logo" src="../solara.png" alt="Loading Logo">
|
561
557
|
</div>
|
562
558
|
|
559
|
+
<div id="toast" style=" display: none; position: fixed; top: 10%; left: 50%; transform: translate(-50%, 10%); background-color: #4CAF50; color: white; padding: 16px; border-radius: 5px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);">
|
560
|
+
<!-- Message will be set dynamically -->
|
561
|
+
</div>
|
562
|
+
|
563
563
|
<div class="container">
|
564
564
|
<div class="row">
|
565
565
|
|
566
566
|
<div class="column left">
|
567
567
|
<div>
|
568
|
-
<button id="
|
568
|
+
<button id="syncBrandButton" class="action-buttons">Sync</button>
|
569
569
|
<button id="allBrandsButton" class="action-buttons">All Brands</button>
|
570
570
|
<button id="switchButton" class="action-buttons">Switch</button>
|
571
571
|
<button id="exportBrandBtn" class="action-buttons">Export</button>
|
@@ -591,11 +591,11 @@
|
|
591
591
|
<img src="../solara.png" alt="Solara Logo">
|
592
592
|
<h2>Solara simplifies the management of your brand configurations, allowing you to access and update them anytime, anywhere.</h2>
|
593
593
|
<div class="button-message">You can select a JSON file containing brand configurations that were exported using Solara.</div>
|
594
|
-
<button id="uploadJsonBtn" style="
|
595
|
-
<div class="button-message" style="
|
596
|
-
<button id="uploadBrandBtn" style="
|
597
|
-
<div class="button-message" style="
|
598
|
-
<button id="newBrandBtn" style="
|
594
|
+
<button id="uploadJsonBtn" style=" animation-delay: 0.5s;">Upload JSON</button>
|
595
|
+
<div class="button-message" style=" animation-delay: 0.7s;">Alternatively, upload from a folder that includes the brand's JSON files.</div>
|
596
|
+
<button id="uploadBrandBtn" style=" animation-delay: 0.9s;">Upload Folder</button>
|
597
|
+
<div class="button-message" style=" animation-delay: 1.1s;">You also have the option to create new brand configurations.</div>
|
598
|
+
<button id="newBrandBtn" style=" animation-delay: 1.3s;">New Brand</button>
|
599
599
|
</div>
|
600
600
|
|
601
601
|
</div>
|
@@ -611,7 +611,7 @@
|
|
611
611
|
|
612
612
|
<onboard-bottom-sheet id="onboardBottomSheet"></onboard-bottom-sheet>
|
613
613
|
|
614
|
-
<
|
614
|
+
<edit-json-sheet id="editJsonSheet"></edit-json-sheet>
|
615
615
|
|
616
616
|
<message-bottom-sheet id="messageBottomSheet"></message-bottom-sheet>
|
617
617
|
|
@@ -15,7 +15,6 @@ class BrandLocalSource {
|
|
15
15
|
}
|
16
16
|
|
17
17
|
const url = `/brand/details?brand_key=${encodeURIComponent(brandKey)}`;
|
18
|
-
console.log('Fetching configurations from:', url);
|
19
18
|
|
20
19
|
const response = await fetch(url);
|
21
20
|
const result = await response.json();
|
@@ -44,13 +43,13 @@ class BrandLocalSource {
|
|
44
43
|
}
|
45
44
|
}
|
46
45
|
|
47
|
-
async saveSection(
|
46
|
+
async saveSection(key, configuration, brandKey) {
|
48
47
|
if (this.savingInProgress) return;
|
49
48
|
this.savingInProgress = true;
|
50
49
|
|
51
50
|
const dataToSend = {
|
52
51
|
brand_key: brandKey,
|
53
|
-
key:
|
52
|
+
key: key,
|
54
53
|
data: configuration
|
55
54
|
};
|
56
55
|
|
@@ -69,7 +68,6 @@ class BrandLocalSource {
|
|
69
68
|
throw new Error(result.error);
|
70
69
|
}
|
71
70
|
|
72
|
-
console.log(`${sectionItem.name} configuration saved successfully!`);
|
73
71
|
return true;
|
74
72
|
} catch (error) {
|
75
73
|
console.error('Error saving configuration:', error);
|
@@ -95,7 +93,6 @@ class BrandLocalSource {
|
|
95
93
|
throw new Error(result.error);
|
96
94
|
}
|
97
95
|
|
98
|
-
console.log('Switch to brand result:', result);
|
99
96
|
return true;
|
100
97
|
} catch (error) {
|
101
98
|
console.error('Error switching to brand:', error);
|