mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
feat: click selection indicator to clear selection
This commit is contained in:
parent
a8744f2c82
commit
2f979ad692
2 changed files with 9 additions and 4 deletions
|
|
@ -644,6 +644,10 @@ export abstract class BasesViewBase extends Component {
|
|||
if (!this.selectionIndicatorEl) {
|
||||
this.selectionIndicatorEl = document.createElement("div");
|
||||
this.selectionIndicatorEl.className = "tn-selection-indicator";
|
||||
this.selectionIndicatorEl.addEventListener("click", () => {
|
||||
this.plugin.taskSelectionService?.clearSelection();
|
||||
this.plugin.taskSelectionService?.exitSelectionMode();
|
||||
});
|
||||
this.rootElement.appendChild(this.selectionIndicatorEl);
|
||||
}
|
||||
this.selectionIndicatorEl.textContent = `${count} selected`;
|
||||
|
|
|
|||
|
|
@ -1290,10 +1290,6 @@
|
|||
background-color: color-mix(in srgb, var(--interactive-accent) 20%, transparent);
|
||||
}
|
||||
|
||||
/* Selection mode cursor change on cards */
|
||||
.tasknotes-plugin.tn-selection-mode .task-card {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Selection indicator floating badge */
|
||||
.tasknotes-plugin .tn-selection-indicator {
|
||||
|
|
@ -1310,6 +1306,11 @@
|
|||
z-index: 100;
|
||||
display: none;
|
||||
animation: tn-selection-indicator-appear 0.2s ease-out;
|
||||
transition: background-color var(--tn-transition-fast);
|
||||
}
|
||||
|
||||
.tasknotes-plugin .tn-selection-indicator:hover {
|
||||
background-color: var(--interactive-accent-hover);
|
||||
}
|
||||
|
||||
@keyframes tn-selection-indicator-appear {
|
||||
|
|
|
|||
Loading…
Reference in a new issue