Skip to content

Commit

Permalink
🛠️: refactor FontAwesome icon import in `ConfigTemplate/InstanceDropD…
Browse files Browse the repository at this point in the history
…own`
  • Loading branch information
itisAliRH authored and mvdbeek committed Oct 11, 2024
1 parent 664e2ef commit 99c22af
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions client/src/components/ConfigTemplates/InstanceDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { library } from "@fortawesome/fontawesome-svg-core";
import { faArrowUp, faCaretDown, faEdit, faStethoscope, faTrash } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { useRouter } from "vue-router/composables";
Expand All @@ -12,8 +11,6 @@ interface Props {
isUpgradable: boolean;
}
library.add(faArrowUp, faCaretDown, faEdit, faStethoscope, faTrash);
const router = useRouter();
defineProps<Props>();
Expand All @@ -33,7 +30,7 @@ const emit = defineEmits<{
aria-haspopup="true"
aria-expanded="false"
class="ui-link font-weight-bold text-nowrap">
<FontAwesomeIcon icon="caret-down" class="fa-lg" />
<FontAwesomeIcon :icon="faCaretDown" size="lg" />
<span class="instance-dropdown-name font-weight-bold">{{ name }}</span>
</button>
<div class="dropdown-menu" :aria-labelledby="`${prefix}-instance-dropdown`">
Expand All @@ -51,15 +48,15 @@ const emit = defineEmits<{
:href="routeEdit"
@keypress="router.push(routeEdit)"
@click.prevent="router.push(routeEdit)">
<FontAwesomeIcon icon="edit" />
<FontAwesomeIcon :icon="faEdit" />
<span v-localize>Edit configuration</span>
</button>
<button class="dropdown-item" @keypress="emit('test')" @click.prevent="emit('test')">
<FontAwesomeIcon icon="stethoscope" />
<FontAwesomeIcon :icon="faStethoscope" />
<span v-localize>Test instance</span>
</button>
<button class="dropdown-item" @keypress="emit('remove')" @click.prevent="emit('remove')">
<FontAwesomeIcon icon="trash" />
<FontAwesomeIcon :icon="faTrash" />
<span v-localize>Remove instance</span>
</button>
</div>
Expand Down

0 comments on commit 99c22af

Please sign in to comment.