feat!: migrate to ags v3, redesign styles

This commit is contained in:
2025-12-05 20:32:18 -08:00
parent 42b4f99c37
commit 11c257e4b3
14 changed files with 182 additions and 153 deletions

View File

@@ -1,12 +1,6 @@
// let current_time = Variable(GLib.DateTime.new_now_local().format("%H:%M"))
// GLib.timeout_add(GLib.PRIORITY_DEFAULT, 1000, () => {
// const now = GLib.DateTime.new_now_local()
// current_time.set(now.format("%b %e (%a) %H:%M"))
// return true
import { Gtk } from "ags/gtk4"
import { createPoll } from "ags/time"
// })
export default function Time() {
const time = createPoll("", 500, () => {
return new Date().toLocaleString(undefined, {
@@ -14,11 +8,13 @@ export default function Time() {
})
})
return <box class="status-box">
<label label={time} />
</box>
// return <box class="status-box">
// <label label={bind(current_time)} />
// </box>
return (
<menubutton class="date-popover status-box">
<popover>
<Gtk.Calendar />
</popover>
<label label={time} />
</menubutton>
)
}