mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-30 18:13:23 +08:00
Use icon references instead of library adding.
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { library } from "@fortawesome/fontawesome-svg-core";
|
||||
import { faCaretDown, faCaretUp, faTrashAlt } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
||||
import { BButton, BButtonGroup } from "bootstrap-vue";
|
||||
|
||||
// @ts-ignore: bad library types
|
||||
library.add(faTrashAlt, faCaretUp, faCaretDown);
|
||||
|
||||
interface Props {
|
||||
index: number;
|
||||
numElements: number;
|
||||
@@ -38,7 +34,7 @@ const emit = defineEmits<{
|
||||
size="sm"
|
||||
class="ml-0"
|
||||
@click="() => emit('swap-up')">
|
||||
<FontAwesomeIcon icon="caret-up" />
|
||||
<FontAwesomeIcon :icon="faCaretUp" />
|
||||
</BButton>
|
||||
<BButton
|
||||
:id="downButtonId"
|
||||
@@ -50,7 +46,7 @@ const emit = defineEmits<{
|
||||
size="sm"
|
||||
class="ml-0"
|
||||
@click="() => emit('swap-down')">
|
||||
<FontAwesomeIcon icon="caret-down" />
|
||||
<FontAwesomeIcon :icon="faCaretDown" />
|
||||
</BButton>
|
||||
</BButtonGroup>
|
||||
|
||||
@@ -63,7 +59,7 @@ const emit = defineEmits<{
|
||||
size="sm"
|
||||
class="ml-0"
|
||||
@click="() => emit('delete')">
|
||||
<FontAwesomeIcon icon="trash-alt" />
|
||||
<FontAwesomeIcon :icon="faTrashAlt" />
|
||||
</BButton>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { library } from "@fortawesome/fontawesome-svg-core";
|
||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
||||
import { defineAsyncComponent, nextTick, type PropType } from "vue";
|
||||
@@ -68,9 +67,6 @@ const emit = defineEmits<{
|
||||
(e: "swap", a: number, b: number): void;
|
||||
}>();
|
||||
|
||||
// @ts-ignore: bad library types
|
||||
library.add(faPlus);
|
||||
|
||||
function onInsert() {
|
||||
emit("insert");
|
||||
}
|
||||
@@ -148,7 +144,7 @@ const { keyObject } = useKeyedObjects();
|
||||
|
||||
<span v-b-tooltip.hover :title="buttonTooltip">
|
||||
<b-button v-if="!props.sustainRepeats" :disabled="maxRepeats" @click="onInsert">
|
||||
<FontAwesomeIcon icon="plus" class="mr-1" />
|
||||
<FontAwesomeIcon :icon="faPlus" class="mr-1" />
|
||||
<span data-description="repeat insert">Insert {{ props.input.title || "Repeat" }}</span>
|
||||
</b-button>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user