mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
feat: group and filter items by list in "on page" section
This commit is contained in:
373
popup/popup.css
373
popup/popup.css
@@ -799,52 +799,108 @@ body {
|
||||
.page-highlights-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
gap: 10px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.page-highlights-info-card {
|
||||
.page-highlights-header-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 10px;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.page-highlights-info-card strong {
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.refresh-button {
|
||||
width: 100%;
|
||||
min-height: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: var(--text-color);
|
||||
transition: all 0.2s;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.refresh-button:hover {
|
||||
.page-highlights-total-label {
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
letter-spacing: var(--tracking-wide);
|
||||
text-transform: uppercase;
|
||||
color: var(--text-color);
|
||||
opacity: 0.7;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-highlights-total-count {
|
||||
flex: 1;
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.page-highlights-controls {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-highlights-group-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
cursor: pointer;
|
||||
padding: 8px 10px;
|
||||
margin: 0 -2px;
|
||||
border-radius: 6px;
|
||||
font-size: var(--text-sm);
|
||||
color: var(--text-color);
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
transition: background 0.2s, border-color 0.2s;
|
||||
}
|
||||
|
||||
.page-highlights-group-toggle:hover {
|
||||
background: var(--section-bg);
|
||||
}
|
||||
|
||||
.refresh-button i {
|
||||
font-size: 16px;
|
||||
.page-highlights-group-toggle .switch-wrapper {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-highlights-group-label {
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.page-highlights-filters {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.page-highlights-filter-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 10px;
|
||||
font-size: var(--text-xs);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
color: var(--text-color);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.page-highlights-filter-chip:hover {
|
||||
background: var(--section-bg);
|
||||
}
|
||||
|
||||
.page-highlights-filter-chip.active {
|
||||
border-color: var(--list-color, var(--accent));
|
||||
background: color-mix(in srgb, var(--list-color, var(--accent)) 14%, var(--input-bg));
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.page-highlights-filter-chip .filter-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-highlights-list {
|
||||
@@ -852,7 +908,7 @@ body {
|
||||
overflow-y: auto;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
@@ -864,25 +920,74 @@ body {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.page-highlights-group-section {
|
||||
border-bottom: 1px solid var(--input-border);
|
||||
}
|
||||
|
||||
.page-highlights-group-section:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.page-highlights-group-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
letter-spacing: var(--tracking-wide);
|
||||
text-transform: uppercase;
|
||||
color: var(--text-color);
|
||||
opacity: 0.7;
|
||||
background: var(--section-bg);
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.page-highlights-group-header:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.page-highlights-group-header i {
|
||||
font-size: 10px;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
.page-highlights-group-section.collapsed .page-highlights-group-header i {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.page-highlights-group-header .group-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-highlight-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
padding: 6px 12px 6px 14px;
|
||||
border-bottom: 1px solid var(--input-border);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
border-left: 3px solid transparent;
|
||||
background: var(--input-bg);
|
||||
}
|
||||
|
||||
|
||||
.page-highlight-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.page-highlight-item:hover {
|
||||
background: var(--section-bg);
|
||||
border-left: 3px solid var(--accent);
|
||||
padding-left: 9px;
|
||||
}
|
||||
|
||||
.page-highlight-item[style*="--item-tint"] {
|
||||
background: color-mix(in srgb, var(--item-tint) 4%, var(--input-bg));
|
||||
}
|
||||
|
||||
.page-highlight-word {
|
||||
@@ -891,14 +996,31 @@ body {
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.page-highlight-preview {
|
||||
display: inline-block;
|
||||
padding: 3px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 2px 0;
|
||||
font-size: var(--text-base);
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.page-highlight-preview .preview-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-highlight-list-tag {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-color);
|
||||
opacity: 0.5;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.page-highlight-position {
|
||||
@@ -949,69 +1071,156 @@ body {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.exception-toggle-btn {
|
||||
.exceptions-mode-card {
|
||||
padding: 6px 10px;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.exceptions-mode-label {
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 500;
|
||||
letter-spacing: var(--tracking-wide);
|
||||
text-transform: uppercase;
|
||||
color: var(--text-color);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.exceptions-mode-select {
|
||||
width: 100%;
|
||||
min-height: 32px;
|
||||
padding: 0 10px;
|
||||
font-size: var(--text-base);
|
||||
color: var(--text-color);
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.exceptions-add-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.exception-domain-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 32px;
|
||||
padding: 0 10px;
|
||||
font-size: var(--text-base);
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 6px;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.exception-domain-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.exception-add-btn {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
min-width: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: var(--text-color);
|
||||
transition: all 0.2s;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.exception-toggle-btn:hover {
|
||||
background: var(--section-bg);
|
||||
}
|
||||
|
||||
.exception-toggle-btn.danger {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
border-color: rgba(239, 68, 68, 0.3);
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.exception-toggle-btn.danger:hover {
|
||||
background: rgba(239, 68, 68, 0.2);
|
||||
}
|
||||
|
||||
.exception-toggle-btn i {
|
||||
font-size: 16px;
|
||||
.exception-add-btn i {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.exceptions-list-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.exceptions-list-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.clear-exceptions-link {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s, color 0.2s;
|
||||
}
|
||||
|
||||
.clear-exceptions-link:hover {
|
||||
opacity: 1;
|
||||
color: var(--danger);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.exceptions-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.exception-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--input-border);
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.exception-item .exception-domain-icon {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
min-width: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
font-size: 10px;
|
||||
color: var(--text-color);
|
||||
opacity: 0.5;
|
||||
background: var(--section-bg);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.exception-item .exception-domain-icon i {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.exception-item.exception-empty {
|
||||
justify-content: center;
|
||||
color: var(--text-color);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.exception-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
@@ -1022,10 +1231,11 @@ body {
|
||||
|
||||
.exception-domain {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
font-size: var(--text-base);
|
||||
color: var(--text-color);
|
||||
word-break: break-word;
|
||||
line-height: 1.4;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.exception-remove {
|
||||
@@ -1054,29 +1264,6 @@ body {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.clear-exceptions-btn {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
border: 1px solid rgba(239, 68, 68, 0.3);
|
||||
color: var(--danger);
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.clear-exceptions-btn:hover {
|
||||
background: rgba(239, 68, 68, 0.2);
|
||||
}
|
||||
|
||||
.clear-exceptions-btn i {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Settings Overlay */
|
||||
.settings-overlay {
|
||||
|
||||
@@ -198,16 +198,20 @@
|
||||
<div class="tab-content" data-tab-content="page-highlights">
|
||||
<div class="tab-inner">
|
||||
<div class="page-highlights-section">
|
||||
<div class="page-highlights-info-card">
|
||||
<span data-i18n="total_highlights">Total:</span>
|
||||
<strong id="totalHighlightsCount">0</strong>
|
||||
<div class="page-highlights-header-row">
|
||||
<span class="page-highlights-total-label" data-i18n="total_matches">Total matches</span>
|
||||
<span class="page-highlights-total-count" id="totalHighlightsCount">0</span>
|
||||
</div>
|
||||
<div class="page-highlights-controls">
|
||||
<label class="page-highlights-group-toggle">
|
||||
<span class="switch-wrapper">
|
||||
<input type="checkbox" id="pageHighlightsGroupByList" class="switch-input" />
|
||||
<span class="switch-slider"></span>
|
||||
</span>
|
||||
<span class="page-highlights-group-label" data-i18n="group_by_list">Group by list</span>
|
||||
</label>
|
||||
<div id="pageHighlightsListFilters" class="page-highlights-filters"></div>
|
||||
</div>
|
||||
|
||||
<button class="refresh-button" id="refreshHighlightsBtn">
|
||||
<i class="fa-solid fa-rotate"></i>
|
||||
<span data-i18n="refresh">Refresh</span>
|
||||
</button>
|
||||
|
||||
<div id="pageHighlightsList" class="page-highlights-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,23 +225,26 @@
|
||||
<i class="fa-solid fa-ban"></i>
|
||||
<span data-i18n="site_exceptions">Site Exceptions</span>
|
||||
</label>
|
||||
|
||||
<button class="exception-toggle-btn" id="toggleExceptionBtn">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
<span id="exceptionBtnText" data-i18n="add_exception">Add to Exceptions</span>
|
||||
</button>
|
||||
|
||||
<div class="exceptions-mode-card">
|
||||
<span class="exceptions-mode-label" data-i18n="exceptions_mode">Mode</span>
|
||||
<select id="exceptionsModeSelect" class="exceptions-mode-select" aria-label="Exceptions mode">
|
||||
<option value="blacklist" data-i18n="exceptions_mode_blacklist">Blacklist — don't highlight on these sites</option>
|
||||
<option value="whitelist" data-i18n="exceptions_mode_whitelist">Whitelist — only highlight on these sites</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="exceptions-add-row">
|
||||
<input type="text" id="exceptionDomainInput" class="exception-domain-input" data-i18n="exception_domain_placeholder" placeholder="example.com" />
|
||||
<button type="button" class="exception-add-btn btn-primary-subdued" id="addExceptionBtn" aria-label="Add">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="exceptions-list-wrapper">
|
||||
<label class="section-label">
|
||||
<span data-i18n="exceptions_list">Exception Sites:</span>
|
||||
</label>
|
||||
<div class="exceptions-list-header">
|
||||
<span class="exceptions-mode-label" id="exceptionsListLabel" data-i18n="exceptions_list">Exception Sites</span>
|
||||
<button type="button" class="clear-exceptions-link" id="clearExceptionsBtn" data-i18n="clear_all">Clear all</button>
|
||||
</div>
|
||||
<div id="exceptionsList" class="exceptions-list"></div>
|
||||
</div>
|
||||
|
||||
<button class="clear-exceptions-btn" id="clearExceptionsBtn">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
<span data-i18n="clear_all">Clear All</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user