mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
18 lines
462 B
JavaScript
18 lines
462 B
JavaScript
import { clock } from "../variables.js";
|
|
import Widget from "resource:///com/github/Aylur/ags/widget.js";
|
|
|
|
/**
|
|
* @param {import('types/widgets/label').Props & {
|
|
* format?: string,
|
|
* interval?: number,
|
|
* }} o
|
|
*/
|
|
export default ({ format = "%H:%M:%S %B %e. %A", ...rest } = {}) =>
|
|
Widget.Label({
|
|
class_name: "clock",
|
|
label: clock.bind("value").transform((time) => {
|
|
return time.format(format) || "wrong format";
|
|
}),
|
|
...rest,
|
|
});
|