diff --git a/app/renderer/app.js b/app/renderer/app.js index 18b0e08..e80f6df 100644 --- a/app/renderer/app.js +++ b/app/renderer/app.js @@ -370,7 +370,7 @@ class StepForgeApp { type: 'button', className: this.state.selectMode ? 'primary' : '', onClick: () => this.toggleSelectMode(), - }, this.state.selectMode ? 'Selecting' : 'Select') : null, + }, 'Select') : null, ), el('div.row', { style: { justifyContent: 'space-between', marginBottom: '14px' } }, el('div', {}, @@ -526,7 +526,7 @@ class StepForgeApp { const selected = this.state.selectedGuides.has(guide.guideId); const description = (guide.descriptionHtml || '').replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim(); const card = el('div.guide-card', { - className: `guide-card${selectMode ? ' selectable' : ''}${selected ? ' selected' : ''}`, + className: `guide-card${selected ? ' selected' : ''}`, onClick: () => { if (selectMode) this.toggleGuideSelection(guide.guideId); else this.openGuide(guide.guideId); @@ -537,20 +537,15 @@ class StepForgeApp { this.guideContextMenu(e, guide); }, }, - selectMode - ? el('input.select-check', { - type: 'checkbox', - checked: selected, - onClick: (e) => { e.stopPropagation(); this.toggleGuideSelection(guide.guideId); }, - }) - : el('div.fav', { - className: `fav${guide.favorite ? ' on' : ''}`, - onClick: async (e) => { - e.stopPropagation(); - await api.library.setFavorite({ guideId: guide.guideId, favorite: !guide.favorite }); - await this.refreshLibrary(); - }, - }, '★'), + el('div.fav', { + className: `fav${guide.favorite ? ' on' : ''}`, + onClick: async (e) => { + e.stopPropagation(); + if (selectMode) return; + await api.library.setFavorite({ guideId: guide.guideId, favorite: !guide.favorite }); + await this.refreshLibrary(); + }, + }, '★'), el('h4', {}, guide.title || 'Untitled guide'), el('div.meta', {}, el('span.badge', {}, badgeText), diff --git a/app/renderer/style.css b/app/renderer/style.css index 2006e9b..e3b92e8 100644 --- a/app/renderer/style.css +++ b/app/renderer/style.css @@ -53,6 +53,7 @@ body { #app { display: flex; flex-direction: column; height: 100vh; } #view { flex: 1; min-height: 0; display: flex; } +#view > * { flex: 1; min-height: 0; display: flex; } .hidden { display: none !important; } .muted { color: var(--muted); font-size: 12px; } @@ -267,14 +268,6 @@ kbd { opacity: 1; color: #f5a524; } -.guide-card .select-check { - position: absolute; - top: 11px; - right: 12px; - width: 16px; - height: 16px; - cursor: pointer; -} .guide-card .muted { font-size: 12px; margin-top: auto; padding-top: 8px; } .guide-card .snippet, .qa-item .snippet { color: var(--muted); }