Speed Dial Minor QOLs (#17291)

Single click to launch actions. Close button removed to prevent cluttering
This commit is contained in:
Lam Wei Lun authored and GitHub committed 2026-11-05 18:09:59 +08:00
1 parent b2978d1c73
commit f96bbe8db1
3 files changed
+5 -48

No files matched your search

+3 -15
View File
@@ -889,15 +889,6 @@ function renderFav() {
badge.title = T("sd_fav_slot", "Favorite %s (%s)", slot_num, shortcutAlt() + slot);
tile.appendChild(badge);
}
// Direct removal: a hover-revealed ✕ in the tile's corner. click() stops propagation so it
// unpins without activating the action.
var unpin = document.createElement("button");
unpin.className = "fav-unpin";
unpin.title = T("sd_remove_fav", "Remove from favorites");
unpin.setAttribute("aria-label", T("sd_remove_fav", "Remove from favorites"));
unpin.innerHTML = '<svg width="9" height="9" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="4" y1="4" x2="12" y2="12"/><line x1="12" y1="4" x2="4" y2="12"/></svg>';
unpin.onclick = function (ev) { ev.stopPropagation(); toggleFav(id); };
tile.appendChild(unpin);
tile.oncontextmenu = function (ev) {
ev.preventDefault();
// why: selecting shows the eyebrow, which grows the launcher - resize so the popup
@@ -1025,13 +1016,11 @@ function renderActionRow(a, i) {
var pin = document.createElement("button");
pin.className = "pin";
setPinState(pin, on);
// stopPropagation keeps the bookmark's click from launching the row.
pin.onclick = function (ev) { ev.stopPropagation(); toggleFav(a.id); };
// why: two quick fav/unfav clicks must not dblclick-run the row
pin.ondblclick = function (ev) { ev.stopPropagation(); };
shell.row.appendChild(pin);
shell.row.onclick = function () { sel = { zone: "list", i: i }; render({ resize: true }); };
shell.row.ondblclick = function () { sel = { zone: "list", i: i }; activateEntry(a); };
shell.row.onclick = function () { sel = { zone: "list", i: i }; activateEntry(a); };
return shell.row;
}
@@ -1196,8 +1185,7 @@ function renderTabRow(t, i) {
var hint = tabAliasHint(t, query);
if (hint)
shell.line.appendChild(markedText("row-alias", hint.text, hint.ranges));
shell.row.onclick = function () { sel = { zone: "list", i: i }; render({ resize: true }); };
shell.row.ondblclick = function () { sel = { zone: "list", i: i }; jumpToTab(t); };
shell.row.onclick = function () { sel = { zone: "list", i: i }; jumpToTab(t); };
return shell.row;
}
+2 -32
View File
@@ -55,6 +55,8 @@ body {
.fav-tile {
flex: 0 0 auto;
/* why: anchors the absolutely positioned Alt/Option slot badge in the tile's corner. */
position: relative;
/* keep tiles full-size; don't shrink to fit - scroll instead */
width: 30px;
height: 30px;
@@ -78,38 +80,6 @@ body {
outline-offset: 2px;
}
/* Hover-revealed remove button in the tile's corner; sits inside the tile bounds so overflow:hidden clips it. */
.fav-tile {
position: relative;
}
.fav-unpin {
position: absolute;
top: 1px;
right: 1px;
width: 13px;
height: 13px;
padding: 0;
border: 0;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--muted, var(--orca-muted, #6b7280));
background: rgba(127, 127, 127, .35);
cursor: pointer;
opacity: 0;
}
.fav-tile:hover .fav-unpin,
.fav-tile.sel .fav-unpin {
opacity: 1;
}
.fav-unpin:hover {
background: rgba(127, 127, 127, .6);
}
/* Numbered quick-launch slot (Alt/Option+digit), top-left corner of the fav tile. */
.fav-slot {
position: absolute;
-1
View File
@@ -126,7 +126,6 @@ nlohmann::json speed_dial_ui_strings()
{"sd_fav_slot", _u8L("Favorite %s (%s)")},
{"sd_pin_fav", _u8L("Pin to favorites (%s)")},
{"sd_unpin_fav", _u8L("Unpin from favorites (%s)")},
{"sd_remove_fav", _u8L("Remove from favorites")},
{"sd_move_left", _u8L("Move left")},
{"sd_move_right", _u8L("Move right")},
{"sd_unpin", _u8L("Unpin")},