Commit Graph
2 Commits
Author SHA1 Message Date
yetone e9b16ca184 gui: a plugin's Update is a button the size of Install, in green, on its card, its row and Update all (#1587, timonwong)
timonwong saw a plugin update announced on Plugins but the button that
brings it hard to find: on a card it was a small chip among the meta
chips ("Update to v0.0.9"), on the Installed row a text link, and Update
all a text link in the footer.

- One updateButton() makes every plugin Update: .pm-act (Install's height,
  min width, padding, font and corners) with .pm-up, green-soft with
  green text, filled green on hover (the app's own tokens; no stripes).
  Its title says the version (or the repo's newer commit for a git one),
  and for a community package that magpie updates by itself within the
  hour.
- A card's one button is Update in place of Signed in / Installed, as an
  app store's Update takes Open's place, and the card's version reads
  "v0.0.7 → v0.0.9" then. Sign in, not done yet, and Move keep their
  place; the Installed row offers Update then. The plugin's page uses the
  same button (actionFor).
- The Installed row's Update and the footer's Update all are the same
  green button.
- The class is pm-up, not update: the title bar's app-update pill owns
  .update (margin, height 22px), which the first try picked up.

Tests:
- new plugin-update-button.test.cjs: at 520px, Chromium and WebKit, en,
  zh, zh-TW, ja, de: the card's Update, the row's Update and Update all
  have Install's height, min width, padding, font, corners and margins,
  are at least Install's width, have a colour that isn't Install's, fit in
  the card, no sideways scroll. On the old plugins.js/css 7/7 fail; with
  the class named update the margins check fails.
- plugin-card-update.test.cjs follows the chip to the card's button.
- every plugin*.test.cjs, both engines: 274/274. The
  first run caught Update taking Sign in's place on the plugin's page
  (plugin-market), fixed by the order above.
JS/CSS only; no Go changed.
2026-10-11 20:10:05 +08:00
yetone a345af91e5 gui: a plugin card's Update chip updates the plugin (莫 on Discord: 显示更新但是好像没有更新按钮) — on Plugins › Discover a card whose plugin has a newer version showed an "Update" chip that looked like a button and did nothing (a click opened the plugin's page); the Update button was only on the Installed tab. The chip is now that button: it names the version ("Update to v0.0.9" / "更新到 v0.0.9"), updates the plugin without opening its page, shows Updating… meanwhile and goes once it is current, and is disabled while another plugin action runs or the plugin is off. plugin-card-update.test.cjs (en, zh) fails on the old code (no button) and passes; plugin-updates, plugin-market and plugin-check-updates still pass (WebKit). 2026-10-03 18:04:41 +08:00