mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-22 09:32:38 +00:00
feat: update system
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { clock } from "../variables.js";
|
||||
import Widget from "resource:///com/github/Aylur/ags/widget.js";
|
||||
import GLib from "gi://GLib";
|
||||
|
||||
/**
|
||||
* @param {import('types/widgets/label').Props & {
|
||||
@@ -7,20 +7,11 @@ import GLib from "gi://GLib";
|
||||
* interval?: number,
|
||||
* }} o
|
||||
*/
|
||||
export default ({
|
||||
format = "%H:%M:%S %B %e. %A",
|
||||
interval = 1000,
|
||||
...rest
|
||||
} = {}) =>
|
||||
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,
|
||||
connections: [
|
||||
[
|
||||
interval,
|
||||
(label) =>
|
||||
(label.label =
|
||||
GLib.DateTime.new_now_local().format(format) || "wrong format"),
|
||||
],
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user