feat: show macro usage count (#1030)

* feat: show macro usage count

* feat: show macro reference count only when ALT key hold down

* fix: the macro reference help text
This commit is contained in:
Róbert Kiss
2019-09-03 21:42:27 +02:00
committed by László Monda
parent 9844645409
commit fef24613e4
10 changed files with 110 additions and 8 deletions

View File

@@ -20,6 +20,7 @@
<li>Right click on a key: Capture key</li>
<li>Hold Shift while clicking on a key: Remap on all keymaps</li>
<li>Hold Alt while clicking on a key: Remap on all layers</li>
<li>Hold Alt to see macro reference counts in the side menu</li>
</ul>
</div>
</div>

View File

@@ -91,6 +91,12 @@
<div class="sidebar__level-2" [routerLinkActive]="['active']">
<a [routerLink]="['/macro', macro.id]"
[class.disabled]="state.updatingFirmware">{{macro.name}}</a>
<span *ngIf="state.macroUsageCountVisible"
class="sidebar__macro_count badge"
title="This is the number of times the macro is used across all keymaps."
data-toggle="tooltip"
data-placement="bottom"
data-container="body">{{ macro.usageCount }}</span>
</div>
</li>
</ul>

View File

@@ -148,6 +148,12 @@ ul {
right: 19px;
top: 3px;
}
&__macro_count {
position: absolute;
right: 11px;
top: 1px;
}
}
.menu--bottom {