mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-28 22:58:36 +00:00
fix: remove external dependency for icones (#805)
* change all icons to use iconify * fix minor UI elements * fix layout of table
This commit is contained in:
parent
cf166ac641
commit
f91b33db38
40 changed files with 303 additions and 183 deletions
|
@ -6,15 +6,15 @@
|
|||
class="flex items-center justify-between py-3 pl-3 pr-4 text-sm"
|
||||
>
|
||||
<div class="flex w-0 flex-1 items-center">
|
||||
<Icon name="mdi-paperclip" class="h-5 w-5 flex-shrink-0 text-gray-400" aria-hidden="true" />
|
||||
<MdiPaperclip class="h-5 w-5 flex-shrink-0 text-gray-400" aria-hidden="true" />
|
||||
<span class="ml-2 w-0 flex-1 truncate"> {{ attachment.document.title }}</span>
|
||||
</div>
|
||||
<div class="ml-4 flex-shrink-0">
|
||||
<a class="tooltip mr-2" data-tip="Download" :href="attachmentURL(attachment.id)" target="_blank">
|
||||
<Icon class="h-5 w-5" name="mdi-download" />
|
||||
<MdiDownload class="h-5 w-5" />
|
||||
</a>
|
||||
<a class="tooltip" data-tip="Open" :href="attachmentURL(attachment.id)" target="_blank">
|
||||
<Icon class="h-5 w-5" name="mdi-open-in-new" />
|
||||
<MdiOpenInNew class="h-5 w-5" />
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -23,6 +23,9 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ItemAttachment } from "~~/lib/api/types/data-contracts";
|
||||
import MdiPaperclip from "~icons/mdi/paperclip";
|
||||
import MdiDownload from "~icons/mdi/download";
|
||||
import MdiOpenInNew from "~icons/mdi/open-in-new";
|
||||
|
||||
const props = defineProps({
|
||||
attachments: {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="divider my-0"></div>
|
||||
<div class="flex justify-between gap-2">
|
||||
<div v-if="item.insured" class="tooltip z-10" data-tip="Insured">
|
||||
<Icon class="h-5 w-5 text-primary" name="mdi-shield-check" />
|
||||
<MdiShieldCheck class="h-5 w-5 text-primary" />
|
||||
</div>
|
||||
<div class="tooltip" data-tip="Quantity">
|
||||
<span class="badge h-5 w-5 badge-primary badge-sm text-xs">
|
||||
|
@ -35,6 +35,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ItemOut, ItemSummary } from "~~/lib/api/types/data-contracts";
|
||||
import MdiShieldCheck from "~icons/mdi/shield-check";
|
||||
|
||||
const api = useUserApi();
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
<div class="flex justify-center">
|
||||
<BaseButton class="rounded-r-none" :loading="loading" type="submit">
|
||||
<template #icon>
|
||||
<Icon name="mdi-package-variant" class="swap-off h-5 w-5" />
|
||||
<Icon name="mdi-package-variant-closed" class="swap-on h-5 w-5" />
|
||||
<MdiPackageVariant class="swap-off h-5 w-5" />
|
||||
<MdiPackageVariantClosed class="swap-on h-5 w-5" />
|
||||
</template>
|
||||
Create
|
||||
</BaseButton>
|
||||
<div class="dropdown dropdown-top">
|
||||
<label tabindex="0" class="btn rounded-l-none rounded-r-xl">
|
||||
<Icon class="h-5 w-5" name="mdi-chevron-down" />
|
||||
<MdiChevronDown class="h-5 w-5" name="mdi-chevron-down" />
|
||||
</label>
|
||||
<ul tabindex="0" class="dropdown-content menu p-2 shadow bg-base-100 rounded-box w-64 right-0">
|
||||
<li>
|
||||
|
@ -38,6 +38,9 @@
|
|||
import { ItemCreate, LabelOut, LocationOut } from "~~/lib/api/types/data-contracts";
|
||||
import { useLabelStore } from "~~/stores/labels";
|
||||
import { useLocationStore } from "~~/stores/locations";
|
||||
import MdiPackageVariant from "~icons/mdi/package-variant";
|
||||
import MdiPackageVariantClosed from "~icons/mdi/package-variant-closed";
|
||||
import MdiChevronDown from "~icons/mdi/chevron-down";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { ViewType } from "~~/composables/use-preferences";
|
||||
import { ItemSummary } from "~~/lib/api/types/data-contracts";
|
||||
import MdiDotsVertical from "~icons/mdi/dots-vertical";
|
||||
import MdiCardTextOutline from "~icons/mdi/card-text-outline";
|
||||
import MdiTable from "~icons/mdi/table";
|
||||
|
||||
type Props = {
|
||||
view?: ViewType;
|
||||
|
@ -30,18 +33,18 @@
|
|||
<template #description>
|
||||
<div v-if="!viewSet" class="dropdown dropdown-hover dropdown-left">
|
||||
<label tabindex="0" class="btn btn-ghost m-1">
|
||||
<Icon name="mdi-dots-vertical" class="h-7 w-7" />
|
||||
<MdiDotsVertical class="h-7 w-7" />
|
||||
</label>
|
||||
<ul tabindex="0" class="dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32">
|
||||
<li>
|
||||
<button @click="setViewPreference('card')">
|
||||
<Icon name="mdi-card-text-outline" class="h-5 w-5" />
|
||||
<MdiCardTextOutline class="h-5 w-5" />
|
||||
Card
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button @click="setViewPreference('table')">
|
||||
<Icon name="mdi-table" class="h-5 w-5" />
|
||||
<MdiTable class="h-5 w-5" />
|
||||
Table
|
||||
</button>
|
||||
</li>
|
||||
|
|
|
@ -19,10 +19,13 @@
|
|||
>
|
||||
<template v-if="typeof h === 'string'">{{ h }}</template>
|
||||
<template v-else>{{ h.text }}</template>
|
||||
<div :class="`inline-flex ${sortByProperty === h.value ? '' : 'opacity-0'}`">
|
||||
<div
|
||||
v-if="sortByProperty === h.value"
|
||||
:class="`inline-flex ${sortByProperty === h.value ? '' : 'opacity-0'}`"
|
||||
>
|
||||
<span class="swap swap-rotate" :class="{ 'swap-active': pagination.descending }">
|
||||
<Icon name="mdi-arrow-down" class="swap-on h-5 w-5" />
|
||||
<Icon name="mdi-arrow-up" class="swap-off h-5 w-5" />
|
||||
<MdiArrowDown class="swap-on h-5 w-5" />
|
||||
<MdiArrowUp class="swap-off h-5 w-5" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -50,8 +53,8 @@
|
|||
<Currency :amount="d.purchasePrice" />
|
||||
</template>
|
||||
<template v-else-if="cell(h) === 'cell-insured'">
|
||||
<Icon v-if="d.insured" name="mdi-check" class="text-green-500 h-5 w-5" />
|
||||
<Icon v-else name="mdi-close" class="text-red-500 h-5 w-5" />
|
||||
<MdiCheck v-if="d.insured" class="text-green-500 h-5 w-5 inline" />
|
||||
<MdiClose v-else class="text-red-500 h-5 w-5 inline" />
|
||||
</template>
|
||||
<slot v-else :name="cell(h)" v-bind="{ item: d }">
|
||||
{{ extractValue(d, h.value) }}
|
||||
|
@ -73,6 +76,10 @@
|
|||
<script setup lang="ts">
|
||||
import { TableData, TableHeader } from "./Table.types";
|
||||
import { ItemSummary } from "~~/lib/api/types/data-contracts";
|
||||
import MdiArrowDown from "~icons/mdi/arrow-down";
|
||||
import MdiArrowUp from "~icons/mdi/arrow-up";
|
||||
import MdiCheck from "~icons/mdi/check";
|
||||
import MdiClose from "~icons/mdi/close";
|
||||
|
||||
type Props = {
|
||||
items: ItemSummary[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue