Skip to content

Commit

Permalink
Use fontawesome icon for key delete button (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored Jan 6, 2025
1 parent 717df34 commit 38be222
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/AnyKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
v-if="visible"
class="remove"
@click.stop="remove"
>x</div></div>
><font-awesome-icon icon="times" size="xs" /></div></div>
</template>
<script>
import { mapMutations } from 'vuex';
Expand Down
2 changes: 1 addition & 1 deletion src/components/BaseKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@dragstart="dragstart" @dragend="dragend" @drop.stop="dropped" @dragleave.prevent="dragleave"
@dragover.prevent="dragover" @dragenter.prevent="dragenter">{{ displayName }}<font-awesome-icon v-if="icon"
size="2x" :icon="icon" /><template v-if="visible">
<div v-if="visible" class="remove" @click.stop="remove">x</div>
<div v-if="visible" class="remove" @click.stop="remove"><font-awesome-icon icon="times" size="xs" /></div>
</template></div>
</template>
<script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ContainerKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
v-if="visible"
class="remove"
@click.stop="remove"
>x</div></div>
><font-awesome-icon icon="times" size="xs" /></div></div>
</template>
<script>
import isUndefined from 'lodash/isUndefined';
Expand Down
2 changes: 1 addition & 1 deletion src/components/LayerContainerKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@dragleave.prevent="dragleaveContents"
@click.prevent.stop="clickContents"
>{{ contents }}</div></div>
<div v-if="visible" class="remove" @click.stop="remove">x</div>
<div v-if="visible" class="remove" @click.stop="remove"><font-awesome-icon icon="times" size="xs" /></div>
</div>
</template>
<script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/LayerKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
v-if="visible"
class="remove"
@click.stop="remove"
>x</div>
><font-awesome-icon icon="times" size="xs" /></div>
</div>
</template>
<script>
Expand Down
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import {
faPrint,
faUndo,
faTrash,
faTimes,
faHatWizard,
faMagic,
faStar,
Expand Down Expand Up @@ -100,6 +101,7 @@ const icons = [
faSearch,
faStar,
faTrash,
faTimes,
faUndo,
faUpload,
faWindows,
Expand Down
5 changes: 5 additions & 0 deletions src/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,18 @@ button {
padding-right: 2px;
// color: #ccc;
cursor: pointer;
opacity: 0.5;
}

.key:hover .remove {
width: unset;
height: unset;
}

.key:hover .remove:hover {
opacity: 1;
}

// .key.active-key {
// // background: #d4f9d1;
// }
Expand Down

0 comments on commit 38be222

Please sign in to comment.