Compare commits
1 Commits
api-utils
...
lite/ui-ic
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d0dccf5ba |
@@ -7,7 +7,7 @@
|
|||||||
@remove="emit('removeSort', property)"
|
@remove="emit('removeSort', property)"
|
||||||
>
|
>
|
||||||
<span class="property">
|
<span class="property">
|
||||||
<FontAwesomeIcon :icon="isAscending ? faCaretUp : faCaretDown" />
|
<UiIcon :icon="isAscending ? faCaretUp : faCaretDown" />
|
||||||
{{ property }}
|
{{ property }}
|
||||||
</span>
|
</span>
|
||||||
</UiFilter>
|
</UiFilter>
|
||||||
@@ -57,10 +57,11 @@ import {
|
|||||||
faSort,
|
faSort,
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import FormWidget from "@/components/FormWidget.vue";
|
import FormWidget from "@/components/FormWidget.vue";
|
||||||
import UiButton from "@/components/ui/UiButton.vue";
|
|
||||||
import UiActionButton from "@/components/ui/UiActionButton.vue";
|
import UiActionButton from "@/components/ui/UiActionButton.vue";
|
||||||
|
import UiButton from "@/components/ui/UiButton.vue";
|
||||||
import UiFilter from "@/components/ui/UiFilter.vue";
|
import UiFilter from "@/components/ui/UiFilter.vue";
|
||||||
import UiFilterGroup from "@/components/ui/UiFilterGroup.vue";
|
import UiFilterGroup from "@/components/ui/UiFilterGroup.vue";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
import UiModal from "@/components/ui/UiModal.vue";
|
import UiModal from "@/components/ui/UiModal.vue";
|
||||||
import useModal from "@/composables/modal.composable";
|
import useModal from "@/composables/modal.composable";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<th>
|
<th>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<span class="label">
|
<span class="label">
|
||||||
<FontAwesomeIcon v-if="icon" :icon="icon" />
|
<UiIcon :icon="icon" />
|
||||||
<slot />
|
<slot />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon?: IconDefinition;
|
icon?: IconDefinition;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<span class="widget">
|
<span class="widget">
|
||||||
<span v-if="before || $slots.before" class="before">
|
<span v-if="before || $slots.before" class="before">
|
||||||
<slot name="before">
|
<slot name="before">
|
||||||
<FontAwesomeIcon v-if="isIcon(before)" :icon="before" fixed-width />
|
<UiIcon v-if="isIcon(before)" :icon="before" fixed-width />
|
||||||
<template v-else>{{ before }}</template>
|
<template v-else>{{ before }}</template>
|
||||||
</slot>
|
</slot>
|
||||||
</span>
|
</span>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span v-if="after || $slots.after" class="after">
|
<span v-if="after || $slots.after" class="after">
|
||||||
<slot name="after">
|
<slot name="after">
|
||||||
<FontAwesomeIcon v-if="isIcon(after)" :icon="after" fixed-width />
|
<UiIcon v-if="isIcon(after)" :icon="after" fixed-width />
|
||||||
<template v-else>{{ after }}</template>
|
<template v-else>{{ after }}</template>
|
||||||
</slot>
|
</slot>
|
||||||
</span>
|
</span>
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
before?: IconDefinition | string | object; // "object" added as workaround
|
before?: IconDefinition | string | object; // "object" added as workaround
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<FontAwesomeIcon class="power-state-icon" :class="className" :icon="icon" />
|
<UiIcon :class="className" :icon="icon" class="power-state-icon" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
faQuestion,
|
faQuestion,
|
||||||
faStop,
|
faStop,
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
import type { PowerState } from "@/libs/xen-api";
|
import type { PowerState } from "@/libs/xen-api";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@@ -29,7 +30,7 @@ const icon = computed(() => icons[props.state] ?? faQuestion);
|
|||||||
const className = computed(() => `state-${props.state.toLocaleLowerCase()}`);
|
const className = computed(() => `state-${props.state.toLocaleLowerCase()}`);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="postcss">
|
<style lang="postcss" scoped>
|
||||||
.power-state-icon {
|
.power-state-icon {
|
||||||
color: var(--color-extra-blue-d60);
|
color: var(--color-extra-blue-d60);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<FontAwesomeIcon :icon="icon" class="icon" />
|
<UiIcon :icon="icon" class="icon" />
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon: IconDefinition;
|
icon: IconDefinition;
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="infra-action">
|
<div class="infra-action">
|
||||||
<slot>
|
<slot>
|
||||||
<FontAwesomeIcon :icon="icon" fixed-width />
|
<UiIcon :icon="icon" fixed-width />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon?: IconDefinition;
|
icon?: IconDefinition;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
>
|
>
|
||||||
<a :href="href" class="link" @click="navigate">
|
<a :href="href" class="link" @click="navigate">
|
||||||
<FontAwesomeIcon :icon="icon" class="icon" />
|
<UiIcon :icon="icon" class="icon" />
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { RouteLocationRaw } from "vue-router";
|
import type { RouteLocationRaw } from "vue-router";
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon: IconDefinition;
|
icon: IconDefinition;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<li class="infra-loading-item">
|
<li class="infra-loading-item">
|
||||||
<div class="infra-item-label-placeholder">
|
<div class="infra-item-label-placeholder">
|
||||||
<div class="link-placeholder">
|
<div class="link-placeholder">
|
||||||
<FontAwesomeIcon :icon="icon" class="icon" />
|
<UiIcon :icon="icon" class="icon" />
|
||||||
<div class="loader"> </div>
|
<div class="loader"> </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon: IconDefinition;
|
icon: IconDefinition;
|
||||||
|
|||||||
@@ -4,13 +4,14 @@
|
|||||||
<slot />
|
<slot />
|
||||||
</span>
|
</span>
|
||||||
<span class="remove" @click.stop="emit('remove')">
|
<span class="remove" @click.stop="emit('remove')">
|
||||||
<FontAwesomeIcon :icon="faRemove" class="icon" />
|
<UiIcon :icon="faRemove" class="icon" />
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { faRemove } from "@fortawesome/free-solid-svg-icons";
|
import { faRemove } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(event: "edit"): void;
|
(event: "edit"): void;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
v-if="icon !== undefined"
|
v-if="icon !== undefined"
|
||||||
|
:fixed-width="fixedWidth"
|
||||||
:icon="icon"
|
:icon="icon"
|
||||||
:spin="busy"
|
:spin="busy"
|
||||||
class="ui-icon"
|
class="ui-icon"
|
||||||
:fixed-width="fixedWidth"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
import { faSpinner } from "@fortawesome/free-solid-svg-icons";
|
import { faSpinner } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
>
|
>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<span v-if="onClose" class="close-icon" @click="emit('close')">
|
<span v-if="onClose" class="close-icon" @click="emit('close')">
|
||||||
<FontAwesomeIcon :icon="faXmark" />
|
<UiIcon :icon="faXmark" />
|
||||||
</span>
|
</span>
|
||||||
<div v-if="icon || $slots.icon" class="modal-icon">
|
<div v-if="icon || $slots.icon" class="modal-icon">
|
||||||
<slot name="icon">
|
<slot name="icon">
|
||||||
<FontAwesomeIcon :icon="icon" />
|
<UiIcon :icon="icon" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<UiTitle v-if="$slots.title" type="h4">
|
<UiTitle v-if="$slots.title" type="h4">
|
||||||
@@ -38,6 +38,7 @@ import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
|||||||
import { faXmark } from "@fortawesome/free-solid-svg-icons";
|
import { faXmark } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { useMagicKeys, whenever } from "@vueuse/core";
|
import { useMagicKeys, whenever } from "@vueuse/core";
|
||||||
import UiButtonGroup from "@/components/ui/UiButtonGroup.vue";
|
import UiButtonGroup from "@/components/ui/UiButtonGroup.vue";
|
||||||
|
import UiIcon from "@/components/ui/UiIcon.vue";
|
||||||
import UiTitle from "@/components/ui/UiTitle.vue";
|
import UiTitle from "@/components/ui/UiTitle.vue";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
|
|||||||
@@ -3,13 +3,11 @@ import { createApp } from "vue";
|
|||||||
import App from "@/App.vue";
|
import App from "@/App.vue";
|
||||||
import i18n from "@/i18n";
|
import i18n from "@/i18n";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
app.use(i18n);
|
app.use(i18n);
|
||||||
app.use(createPinia());
|
app.use(createPinia());
|
||||||
app.use(router);
|
app.use(router);
|
||||||
app.component("FontAwesomeIcon", FontAwesomeIcon);
|
|
||||||
|
|
||||||
app.mount("#root");
|
app.mount("#root");
|
||||||
|
|||||||
Reference in New Issue
Block a user