Skip to content

Commit 724b05d

Browse files
authored
Merge pull request #709 from damongolding/task/release
0.35.0
2 parents 866d32d + 6368211 commit 724b05d

29 files changed

Lines changed: 417 additions & 217 deletions

config.example.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ immich_url: ""
77
## Clock
88
show_time: false
99
time_format: 24 # 12 or 24
10+
show_am_pm: true # show am/pm when using 12 hour format
1011
show_date: false
1112
date_format: YYYY/MM/DD
1213
clock_source: client

config.schema.json

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
],
2424
"examples": ["12", "24"]
2525
},
26+
"show_am_pm": {
27+
"type": "boolean"
28+
},
2629
"show_date": {
2730
"type": "boolean"
2831
},
@@ -402,15 +405,36 @@
402405
"lang": {
403406
"type": "string"
404407
},
405-
"forecast": {
408+
"round_temperature": {
406409
"type": "boolean",
407410
"default": false,
408-
"description": "Whether to include 3 day forecast data"
411+
"description": "Whether to round temperature values to the nearest integer"
409412
},
410-
"round_temperature": {
413+
"forecast": {
411414
"type": "boolean",
412415
"default": false,
413-
"description": "Whether to round temperature values to the nearest integer"
416+
"description": "Whether to include 3 day forecast data"
417+
},
418+
"show": {
419+
"type": "object",
420+
"additionalProperties": false,
421+
"properties": {
422+
"humidity": {
423+
"type": "boolean",
424+
"description": "Show the current humidity",
425+
"default": false
426+
},
427+
"wind": {
428+
"type": "boolean",
429+
"description": "Show the current wind speed",
430+
"default": false
431+
},
432+
"visibility": {
433+
"type": "boolean",
434+
"description": "Show the current visibility",
435+
"default": false
436+
}
437+
}
414438
},
415439
"default": {
416440
"type": "boolean"

frontend/bun.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727
},
2828
"devDependencies": {
29-
"@biomejs/biome": "^2.4.7",
29+
"@biomejs/biome": "^2.4.8",
3030
"autoprefixer": "^10.4.27",
3131
"choices.js": "^11.2.1",
3232
"date-fns": "^4.1.0",

frontend/src/css/weather.css

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,40 @@
4848
padding: 0.6rem 0 0 0.1rem;
4949
}
5050

51-
.weather--description {
51+
.weather--stats {
52+
text-align: right;
53+
display: flex;
54+
align-items: flex-end;
55+
flex-direction: column;
56+
font-size: 1rem;
57+
gap: 0.5rem;
58+
z-index: var(--z-clock);
59+
}
60+
61+
.weather--stat {
5262
display: flex;
5363
padding-top: 0.1rem;
5464
gap: 0.5rem;
5565
align-items: center;
5666
}
5767

58-
.weather--description--icon {
68+
.weather--stat--icon {
69+
display: flex;
70+
align-items: center;
71+
justify-content: center;
5972
width: 1rem;
6073
height: 1rem;
6174
}
6275

63-
.weather--description--icon svg {
76+
.weather--stat--icon svg {
77+
max-width: 1rem;
78+
max-height: 1rem;
6479
fill: #fff;
6580
opacity: 0.8;
6681
filter: drop-shadow(0 0 1rem rgba(0, 0, 0, 1));
6782
}
6883

69-
.weather--description--value {
84+
.weather--stat--value {
7085
z-index: 1;
7186
}
7287

frontend/src/ts/clock.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const CLOCK_UPDATE_INTERVAL = 5000;
66

77
const TIME_FORMATS = {
88
TWELVE_HOUR: "h:mma" as const,
9+
TWELVE_HOUR_NO_AMPM: "h:mm" as const,
910
TWENTY_FOUR_HOUR: "HH:mm" as const,
1011
} as const;
1112

@@ -16,6 +17,7 @@ interface ClockConfig {
1617
dateFormat: string;
1718
showTime: boolean;
1819
timeFormat: TimeFormat;
20+
showAmPm: boolean;
1921
langCode: string;
2022
}
2123

@@ -116,7 +118,9 @@ class Clock {
116118

117119
const timeFormat =
118120
this.config.timeFormat === "12"
119-
? TIME_FORMATS.TWELVE_HOUR
121+
? this.config.showAmPm
122+
? TIME_FORMATS.TWELVE_HOUR
123+
: TIME_FORMATS.TWELVE_HOUR_NO_AMPM
120124
: TIME_FORMATS.TWENTY_FOUR_HOUR;
121125

122126
try {
@@ -163,13 +167,15 @@ function initClock(
163167
kioskDateFormat: string,
164168
kioskShowTime: boolean,
165169
kioskTimeFormat: TimeFormat,
170+
kioskShowAmPm: boolean,
166171
kioskLangCode: string,
167172
): Clock {
168173
const config: ClockConfig = {
169174
showDate: kioskShowDate,
170175
dateFormat: kioskDateFormat,
171176
showTime: kioskShowTime,
172177
timeFormat: kioskTimeFormat,
178+
showAmPm: kioskShowAmPm,
173179
langCode: kioskLangCode,
174180
};
175181

frontend/src/ts/kiosk.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ type KioskData = {
7070
dateFormat: string;
7171
showTime: boolean;
7272
timeFormat: TimeFormat;
73+
showAmPm: boolean;
7374
clockSource: "client" | "server";
7475
transition: string;
7576
showMoreInfo: boolean;
@@ -171,6 +172,7 @@ async function init(): Promise<void> {
171172
kioskData.dateFormat,
172173
kioskData.showTime,
173174
kioskData.timeFormat,
175+
kioskData.showAmPm,
174176
kioskData.langCode,
175177
);
176178
}

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ require (
1313
github.com/goodsign/monday v1.0.2
1414
github.com/google/go-querystring v1.2.0
1515
github.com/google/uuid v1.6.0
16-
github.com/klauspost/compress v1.18.4
16+
github.com/klauspost/compress v1.18.5
1717
github.com/labstack/echo/v5 v5.0.4
1818
github.com/mcuadros/go-defaults v1.2.0
1919
github.com/nicksnyder/go-i18n/v2 v2.6.1
20-
github.com/oapi-codegen/runtime v1.2.0
20+
github.com/oapi-codegen/runtime v1.3.0
2121
github.com/patrickmn/go-cache v2.1.0+incompatible
2222
github.com/pelletier/go-toml/v2 v2.2.4
2323
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
@@ -26,7 +26,7 @@ require (
2626
github.com/vmihailenco/msgpack/v5 v5.4.1
2727
github.com/xeipuuv/gojsonschema v1.2.0
2828
go.yaml.in/yaml/v3 v3.0.4
29-
golang.org/x/image v0.37.0
29+
golang.org/x/image v0.38.0
3030
golang.org/x/sync v0.20.0
3131
golang.org/x/text v0.35.0
3232
golang.org/x/time v0.15.0

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ github.com/jdkato/prose v1.2.1/go.mod h1:AiRHgVagnEx2JbQRQowVBKjG0bcs/vtkGCH1dYA
171171
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
172172
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
173173
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
174-
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
175-
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
174+
github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE=
175+
github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
176176
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
177177
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
178178
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
@@ -223,8 +223,8 @@ github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
223223
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
224224
github.com/oapi-codegen/oapi-codegen/v2 v2.5.1 h1:5vHNY1uuPBRBWqB2Dp0G7YB03phxLQZupZTIZaeorjc=
225225
github.com/oapi-codegen/oapi-codegen/v2 v2.5.1/go.mod h1:ro0npU1BWkcGpCgGD9QwPp44l5OIZ94tB3eabnT7DjQ=
226-
github.com/oapi-codegen/runtime v1.2.0 h1:RvKc1CVS1QeKSNzO97FBQbSMZyQ8s6rZd+LpmzwHMP4=
227-
github.com/oapi-codegen/runtime v1.2.0/go.mod h1:Y7ZhmmlE8ikZOmuHRRndiIm7nf3xcVv+YMweKgG1DT0=
226+
github.com/oapi-codegen/runtime v1.3.0 h1:vyK1zc0gDWWXgk2xoQa4+X4RNNc5SL2RbTpJS/4vMYA=
227+
github.com/oapi-codegen/runtime v1.3.0/go.mod h1:kOdeacKy7t40Rclb1je37ZLFboFxh+YLy0zaPCMibPY=
228228
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY=
229229
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw=
230230
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c=
@@ -327,8 +327,8 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
327327
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 h1:zfMcR1Cs4KNuomFFgGefv5N0czO2XZpUbxGUy8i8ug0=
328328
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6/go.mod h1:46edojNIoXTNOhySWIWdix628clX9ODXwPsQuG6hsK0=
329329
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
330-
golang.org/x/image v0.37.0 h1:ZiRjArKI8GwxZOoEtUfhrBtaCN+4b/7709dlT6SSnQA=
331-
golang.org/x/image v0.37.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY=
330+
golang.org/x/image v0.38.0 h1:5l+q+Y9JDC7mBOMjo4/aPhMDcxEptsX+Tt3GgRQRPuE=
331+
golang.org/x/image v0.38.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY=
332332
golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
333333
golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
334334
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=

internal/common/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ type URLBuilderRequest struct {
168168
// Clock
169169
ShowTime *bool `form:"show_time" url:"show_time,omitempty"`
170170
TimeFormat *string `form:"time_format" url:"time_format,omitempty"`
171+
ShowAmPm *bool `form:"show_am_pm" url:"show_am_pm,omitempty"`
171172
ShowDate *bool `form:"show_date" url:"show_date,omitempty"`
172173
DateFormat *string `form:"date_format" url:"date_format,omitempty"`
173174
ClockSource *string `form:"clock_source" url:"clock_source,omitempty"`

0 commit comments

Comments
 (0)