b7951c4e839a7fcb1d761084ba1fba8a06089049 max Wed Aug 26 01:52:20 2026 -0700 hgSession: use the outline floppy-disk icon for Overwrite, easier to recognize as save diff --git src/hg/js/hgSession.js src/hg/js/hgSession.js index 474beedc234..a1dda41235a 100644 --- src/hg/js/hgSession.js +++ src/hg/js/hgSession.js @@ -168,36 +168,39 @@ sessDt.rows().every(function() { if (this.data().encName === enc) { found = this; } }); return found; } // ---- table cell rendering ------------------------------------------------ // Inline icons (Font Awesome solid paths, embedded as SVG so they do not depend on the site's Font // Awesome version). fill:currentColor picks up the button's text/danger color. var SESS_TRASH_SVG = '<svg class="sessIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"' + ' aria-hidden="true"><path fill="currentColor" d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3' + ' 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8' + 'c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7' + ' 47.9-45L416 128z"/></svg>'; -// Font Awesome "floppy-disk" (save) solid path. -var SESS_SAVE_SVG = '<svg class="sessIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"' + - ' aria-hidden="true"><path fill="currentColor" d="M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64' + - ' 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7' + - ' 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32' + - '-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"/></svg>'; +// Font Awesome "floppy-disk" (save) regular/outline path - reads more clearly as a save icon. +var SESS_SAVE_SVG = '<svg class="sessIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"' + + ' aria-hidden="true"><path fill="currentColor" d="M160 144C151.2 144 144 151.2 144 160L144 480C144' + + ' 488.8 151.2 496 160 496L480 496C488.8 496 496 488.8 496 480L496 237.3C496 233.1 494.3 229 491.3' + + ' 226L416 150.6L416 240C416 257.7 401.7 272 384 272L224 272C206.3 272 192 257.7 192 240L192 144L160' + + ' 144zM240 144L240 224L368 224L368 144L240 144zM96 160C96 124.7 124.7 96 160 96L402.7 96C419.7 96' + + ' 436 102.7 448 114.7L525.3 192C537.3 204 544 220.3 544 237.3L544 480C544 515.3 515.3 544 480' + + ' 544L160 544C124.7 544 96 515.3 96 480L96 160zM256 384C256 348.7 284.7 320 320 320C355.3 320 384' + + ' 348.7 384 384C384 419.3 355.3 448 320 448C284.7 448 256 419.3 256 384z"/></svg>'; // Font Awesome "lock" solid path - marks a private (not-shared) session, since sharing is the default. var SESS_LOCK_SVG = '<svg class="sessLock" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"' + ' aria-hidden="true"><path fill="currentColor" d="M144 144v48H304V144c0-44.2-35.8-80-80-80s-80' + ' 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0' + ' 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"/></svg>'; function sessActionsHtml(row) { // Order: Share, Edit, then the icon-only Overwrite (floppy) and Delete (trash). var e = sessEnc(row.encName); return '<button type="button" class="gbPill" data-act="share" data-enc="' + e + '" ' + 'title="Copy a shareable link or change who can see this session">Share</button>' + '<button type="button" class="gbPill" data-act="edit" data-enc="' + e + '" ' + 'title="Rename this session or edit its description">Edit</button>' + '<button type="button" class="gbPill" data-act="overwrite" data-enc="' + e + '" ' + 'aria-label="Overwrite with current view" ' +