From 193cd8c2e1cc7e16b1389b95036bf7f4f99f97e0 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 16:45:36 +0200 Subject: feat(assistant): Ask and Do as captioned tile grids with icons The actions sat as buttons bunched at the left of the card. Each group is now a grid of equal tiles across the card's width, icon over label, about 150 px a column, with a small Ask or Do caption. Icons are Font Awesome and Octicons codepoints checked in Inconsolata Nerd Font's cmap; a saved preset without one gets a fallback. The lists referenced from QML are var, since a library's top-level const is not reliably exposed. Co-Authored-By: Claude Opus 5.5 --- desktop/assistant/Ops.js | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'desktop/assistant/Ops.js') diff --git a/desktop/assistant/Ops.js b/desktop/assistant/Ops.js index e59560d..2761a2d 100644 --- a/desktop/assistant/Ops.js +++ b/desktop/assistant/Ops.js @@ -15,29 +15,30 @@ // daemon's write, or "compress", which opens the COMPRESS formats. kinds // lists the staged kinds it fits ("any" fits every mix); min is the number // of files it needs; format is the suffix a file already has when the -// operation would not change it. +// operation would not change it. icon is a Nerd Font codepoint, checked in +// Inconsolata Nerd Font's cmap. const OPS = [ - { label: "To .md", op: "md", kinds: ["pdf"] }, - { label: "To images", op: "pdf-images", kinds: ["pdf"] }, - { label: "Merge", op: "pdf-merge", kinds: ["pdf"], min: 2 }, - { label: "Extract audio", op: "audio", kinds: ["video"] }, - { label: "To MP4", op: "mp4", kinds: ["video"], format: [".mp4"] }, - { label: "To WebM", op: "webm", kinds: ["video"], format: [".webm"] }, - { label: "To GIF", op: "gif", kinds: ["video"] }, - { label: "Trackcrop", op: "trackcrop", kinds: ["video"] }, - { label: "To PNG", op: "png", kinds: ["image"], format: [".png"] }, - { label: "To JPEG", op: "jpeg", kinds: ["image"], format: [".jpg", ".jpeg"] }, - { label: "To WebP", op: "webp", kinds: ["image"], format: [".webp"] }, - { label: "Resize 50%", op: "half", kinds: ["image"] }, - { label: "Extract", op: "extract", kinds: ["archive"] }, - { label: "Compress…", op: "compress", kinds: ["any"] }, + { label: "To .md", icon: "\uf48a", op: "md", kinds: ["pdf"] }, + { label: "To images", icon: "\uf1c5", op: "pdf-images", kinds: ["pdf"] }, + { label: "Merge", icon: "\uf419", op: "pdf-merge", kinds: ["pdf"], min: 2 }, + { label: "Extract audio", icon: "\uf001", op: "audio", kinds: ["video"] }, + { label: "To MP4", icon: "\uf008", op: "mp4", kinds: ["video"], format: [".mp4"] }, + { label: "To WebM", icon: "\uf008", op: "webm", kinds: ["video"], format: [".webm"] }, + { label: "To GIF", icon: "\uf1c8", op: "gif", kinds: ["video"] }, + { label: "Trackcrop", icon: "\uf05b", op: "trackcrop", kinds: ["video"] }, + { label: "To PNG", icon: "\uf03e", op: "png", kinds: ["image"], format: [".png"] }, + { label: "To JPEG", icon: "\uf03e", op: "jpeg", kinds: ["image"], format: [".jpg", ".jpeg"] }, + { label: "To WebP", icon: "\uf03e", op: "webp", kinds: ["image"], format: [".webp"] }, + { label: "Resize 50%", icon: "\uf065", op: "half", kinds: ["image"] }, + { label: "Extract", icon: "\uf07c", op: "extract", kinds: ["archive"] }, + { label: "Compress…", icon: "\uf1c6", op: "compress", kinds: ["any"] }, ]; -const COMPRESS = [ - { label: ".zip", op: "zip" }, - { label: ".tar.gz", op: "tgz" }, - { label: ".tar.xz", op: "txz" }, - { label: ".tar.bz2", op: "tbz2" }, +var COMPRESS = [ + { label: ".zip", icon: "\uf1c6", op: "zip" }, + { label: ".tar.gz", icon: "\uf1c6", op: "tgz" }, + { label: ".tar.xz", icon: "\uf1c6", op: "txz" }, + { label: ".tar.bz2", icon: "\uf1c6", op: "tbz2" }, ]; function ext(name) { -- cgit v1.2.3