Skip to content

Commit 4325f3e

Browse files
authored
Merge pull request #524 from damongolding/task/release
Task/release
2 parents 9e88777 + 63644fe commit 4325f3e

File tree

14 files changed

+408
-271
lines changed

14 files changed

+408
-271
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ kiosk:
167167

168168
| **yaml** | **ENV** | **Value** | **Default** | **Description** |
169169
|---------------------|-------------------------|--------------|-------------|--------------------------------------------------------------------------------------------|
170-
| config_validation_level | KIOSK_CONFIG_VALIDATION_LEVEL | error \| warning | error | The level of validation to perform on the config.yaml file. |
170+
| config_validation_level | KIOSK_CONFIG_VALIDATION_LEVEL | error \| warning \| off | error | The level of validation to perform on the config.yaml file. |
171171
| port | KIOSK_PORT | int | 3000 | Which port Kiosk should use. NOTE: This is only typically needed when running Kiosk outside of a container. If you are running inside a container the port will need to be reflected in your compose file, e.g. `HOST_PORT:KIOSK_PORT` |
172172
| behind_proxy | KIOSK_BEHIND_PROXY | bool | false | Is Kiosk running behind a proxy? |
173173
| watch_config | KIOSK_WATCH_CONFIG | bool | false | Should Kiosk watch config.yaml file for changes. Reloads all connect clients if a change is detected. |

config.schema.json

Lines changed: 66 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
"type": "boolean"
1818
},
1919
"time_format": {
20-
"type": "integer"
20+
"oneOf": [
21+
{ "type": "string", "enum": ["12", "24"] },
22+
{ "type": "integer", "enum": [12, 24] }
23+
],
24+
"examples": ["12", "24"]
2125
},
2226
"show_date": {
2327
"type": "boolean"
@@ -47,7 +51,8 @@
4751
"type": ["string", "array"],
4852
"items": {
4953
"type": "string"
50-
}
54+
},
55+
"uniqueItems": true
5156
},
5257
"require_all_people": {
5358
"type": "boolean"
@@ -56,13 +61,15 @@
5661
"type": ["string", "array"],
5762
"items": {
5863
"type": "string"
59-
}
64+
},
65+
"uniqueItems": true
6066
},
6167
"albums": {
6268
"type": ["string", "array"],
6369
"items": {
6470
"type": "string"
65-
}
71+
},
72+
"uniqueItems": true
6673
},
6774
"album_video": {
6875
"type": "boolean"
@@ -74,19 +81,22 @@
7481
"type": ["string", "array"],
7582
"items": {
7683
"type": "string"
77-
}
84+
},
85+
"uniqueItems": true
7886
},
7987
"dates": {
8088
"type": ["string", "array"],
8189
"items": {
8290
"type": "string"
83-
}
91+
},
92+
"uniqueItems": true
8493
},
8594
"tags": {
8695
"type": ["string", "array"],
8796
"items": {
8897
"type": "string"
89-
}
98+
},
99+
"uniqueItems": true
90100
},
91101
"memories": {
92102
"type": "boolean"
@@ -103,6 +113,9 @@
103113
"menu_position": {
104114
"type": "string"
105115
},
116+
"disable_navigation": {
117+
"type": "boolean"
118+
},
106119
"disable_ui": {
107120
"type": "boolean"
108121
},
@@ -139,6 +152,9 @@
139152
"sleep_icon": {
140153
"type": "boolean"
141154
},
155+
"disable_sleep": {
156+
"type": "boolean"
157+
},
142158
"transition": {
143159
"type": "string"
144160
},
@@ -154,6 +170,12 @@
154170
"progress_bar_position": {
155171
"type": "string"
156172
},
173+
"custom_css": {
174+
"type": "boolean"
175+
},
176+
"custom_css_class": {
177+
"type": "string"
178+
},
157179
"image_fit": {
158180
"type": "string"
159181
},
@@ -188,7 +210,11 @@
188210
"type": "boolean"
189211
},
190212
"image_time_format": {
191-
"type": "integer"
213+
"oneOf": [
214+
{ "type": "string", "enum": ["12", "24"] },
215+
{ "type": "integer", "enum": [12, 24] }
216+
],
217+
"examples": ["12", "24"]
192218
},
193219
"show_image_date": {
194220
"type": "boolean"
@@ -212,7 +238,8 @@
212238
"type": ["string", "array"],
213239
"items": {
214240
"type": "string"
215-
}
241+
},
242+
"uniqueItems": true
216243
},
217244
"show_image_id": {
218245
"type": "boolean"
@@ -230,13 +257,15 @@
230257
"type": ["string", "array"],
231258
"items": {
232259
"type": "string"
233-
}
260+
},
261+
"uniqueItems": true
234262
},
235263
"hide_button_action": {
236264
"type": ["string", "array"],
237265
"items": {
238266
"type": "string"
239-
}
267+
},
268+
"uniqueItems": true
240269
},
241270
"weather": {
242271
"type": "array",
@@ -248,10 +277,10 @@
248277
"type": "string"
249278
},
250279
"lat": {
251-
"type": "number"
280+
"type": ["number", "string"]
252281
},
253282
"lon": {
254-
"type": "number"
283+
"type": ["number", "string"]
255284
},
256285
"api": {
257286
"type": "string"
@@ -291,11 +320,19 @@
291320
"required": ["url", "event"]
292321
}
293322
},
323+
"blacklist": {
324+
"type": "array",
325+
"items": {
326+
"type": "string"
327+
},
328+
"uniqueItems": true
329+
},
294330
"iframe": {
295331
"type": ["string", "array"],
296332
"items": {
297333
"type": "string"
298-
}
334+
},
335+
"uniqueItems": true
299336
},
300337
"immich_users_api_keys": {
301338
"type": "object",
@@ -307,6 +344,13 @@
307344
},
308345
"required": []
309346
},
347+
"user": {
348+
"type": ["string", "array"],
349+
"items": {
350+
"type": "string"
351+
},
352+
"uniqueItems": true
353+
},
310354
"show_user": {
311355
"type": "boolean"
312356
},
@@ -338,6 +382,9 @@
338382
"type": "object",
339383
"additionalProperties": false,
340384
"properties": {
385+
"version": {
386+
"type": "string"
387+
},
341388
"debug": {
342389
"type": "boolean"
343390
},
@@ -346,9 +393,9 @@
346393
},
347394
"config_validation_level": {
348395
"type": "string",
349-
"enum": ["warning", "error"],
396+
"enum": ["warning", "error", "off"],
350397
"default": "error",
351-
"description": "Controls how invalid configuration is handled. 'warning' logs a warning and continues; 'error' treats invalid configuration as fatal."
398+
"description": "Controls how invalid configuration is handled. 'warning' logs a warning and continues; 'error' treats invalid configuration as fatal; 'off' disables validation checks."
352399
},
353400
"port": {
354401
"type": "integer"
@@ -360,7 +407,9 @@
360407
"type": "boolean"
361408
},
362409
"fetched_assets_size": {
363-
"type": "integer"
410+
"type": "integer",
411+
"minimum": 1,
412+
"maximum": 1000
364413
},
365414
"http_timeout": {
366415
"type": "integer"

internal/common/common.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,20 @@ func (c *Common) Secret() string {
7676

7777
// RouteRequestData contains request metadata and configuration used across routes
7878
type RouteRequestData struct {
79-
RequestConfig config.Config // Configuration for the current request
8079
DeviceID string // Unique identifier for the device making the request
8180
RequestID string // Unique identifier for this specific request
8281
ClientName string // Name of the client making the request
82+
RequestConfig config.Config // Configuration for the current request
8383
}
8484

8585
// ViewImageData contains the image data and metadata for displaying an image in the view
8686
type ViewImageData struct {
87-
ImmichAsset immich.Asset // ImmichAsset contains immich asset data
8887
ImageData string // ImageData contains the image as base64 data
8988
ImageBlurData string // ImageBlurData contains the blurred image as base64 data
90-
ImageDominantColor color.RGBA // ImageDominantColor contains the dominant color of the image
9189
ImageDate string // ImageDate contains the date of the image
9290
User string // User the user api key used
91+
ImmichAsset immich.Asset // ImmichAsset contains immich asset data
92+
ImageDominantColor color.RGBA // ImageDominantColor contains the dominant color of the image
9393
}
9494

9595
// ViewData contains all the data needed to render a view in the application
@@ -104,17 +104,17 @@ type ViewData struct {
104104
}
105105

106106
type ViewImageDataOptions struct {
107-
RelativeAssetWanted bool
108107
RelativeAssetBucket kiosk.Source
109108
RelativeAssetBucketID string
110109
ImageOrientation immich.ImageOrientation
110+
RelativeAssetWanted bool
111111
}
112112

113113
// ContextCopy stores a copy of key HTTP context information including URL and headers
114114
type ContextCopy struct {
115-
URL url.URL // The request URL
116115
RequestHeader http.Header // Headers from the incoming request
117116
ResponseHeader http.Header // Headers for the outgoing response
117+
URL url.URL // The request URL
118118
}
119119

120120
// CopyContext creates a copy of essential context data from an echo.Context

0 commit comments

Comments
 (0)