diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-30 11:38:15 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-30 11:38:15 +0100 |
| commit | 4d6f14e7d106dadeb354081a32dfa8b1f40371e0 (patch) | |
| tree | 0c2c8c9aee5ccc3085b125462bb17684f472d309 /deckit/modules | |
| parent | 30fed7fc778560e759ae5602901d898af80e0a28 (diff) | |
| download | deck-it-master.tar.gz deck-it-master.zip | |
Vikunja's frontend_url said port 80, so a tap opened the wrong page; the
frontend lives at the API's address, so open uses [todo] url.
A hold now turns the chip green with a ticked box and shrinks it away,
a snooze carries it off to the right; the row is redrawn only after the
animation, so it is not cut short.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'deckit/modules')
| -rw-r--r-- | deckit/modules/todo.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/deckit/modules/todo.py b/deckit/modules/todo.py index 8ce673d..3c698e0 100644 --- a/deckit/modules/todo.py +++ b/deckit/modules/todo.py @@ -104,7 +104,6 @@ class Todo: self.pass_ = cfg.get("pass", _pass) self.token = None self.now = cfg.get("now", lambda: datetime.now(timezone.utc)) - self.front = None self.st = {"tasks": [], "error": None} self.wake, self.stopping = threading.Event(), False self.actions = {"open": self._open, "done": self._done, "snooze": self._snooze} if self.url else {} @@ -123,8 +122,6 @@ class Todo: def refresh(self): try: - if self.front is None: - self.front = self.http("GET", self.url + "/api/v1/info", "").get("frontend_url", "") items = self._call("GET", "/api/v2/tasks?" + urllib.parse.urlencode( {"filter": FILTER, "per_page": 50})).get("items") or [] self.st = {"tasks": pick(items, self.now()), "error": None} @@ -148,8 +145,9 @@ class Todo: def _open(self, body): i = self._id(body) - base = (self.front or self.url).rstrip("/") - self._write(lambda: self.popen(["xdg-open", f"{base}/tasks/{i}"])) + # ponytail: the frontend at the API's address; /api/v1/info's frontend_url + # is often wrong behind a port (it says :80). A [todo] frontend if they ever differ. + self._write(lambda: self.popen(["xdg-open", f"{self.url}/tasks/{i}"])) def _done(self, body): i = self._id(body) |
