Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions frontend/components/Item/Card.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<template>
<Card class="relative overflow-hidden">
<div v-if="tableRow" class="absolute left-1 top-1 z-10">
<div
v-if="tableRow"
class="absolute left-0 top-0 z-10 cursor-pointer p-1 pointer-coarse:p-2.5"
@click.stop="tableRow.toggleSelected()"
@pointerdown.stop
>
<Checkbox
class="size-5 bg-accent hover:bg-background-accent"
class="pointer-events-none size-5 bg-accent hover:bg-background-accent"
:model-value="tableRow.getIsSelected()"
:aria-label="$t('components.item.view.selectable.select_card')"
@update:model-value="tableRow.toggleSelected()"
/>
</div>
<NuxtLink :to="`/item/${item.id}`">
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Location/CreateModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";
import BaseModal from "@/components/App/CreateModal.vue";
import type { EntityTypeSummary, EntitySummary } from "~~/lib/api/types/data-contracts";
import type { EntitySummary } from "~~/lib/api/types/data-contracts";
import { AttachmentTypes } from "~~/lib/api/types/non-generated";
import { useDialog, useDialogHotkey } from "~/components/ui/dialog-provider";
import { useTagStore } from "~/stores/tags";
Expand Down
2 changes: 1 addition & 1 deletion frontend/lib/api/classes/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class ItemsApi extends BaseAPI {
return {
...resp,
data: resp.data?.items ?? [],
} as { data: EntitySummary[]; error: any; status: number };
};
}

getTree(tq: TreeQuery = { withItems: false }) {
Expand Down
2 changes: 0 additions & 2 deletions frontend/pages/collection/index/entity-types.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { useI18n } from "vue-i18n";
import { toast } from "@/components/ui/sonner";
import type {
EntityTypeCreate,
Expand All @@ -23,7 +22,6 @@
import FormCheckbox from "~/components/Form/Checkbox.vue";
import TemplateSelector from "~/components/Template/Selector.vue";

const { t } = useI18n();
const api = useUserApi();
const confirm = useConfirm();
const { openDialog, closeDialog } = useDialog();
Expand Down
4 changes: 0 additions & 4 deletions frontend/pages/item/[id]/index/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import type { ItemAttachment, EntityFieldData, EntityOut, EntityUpdate } from "~~/lib/api/types/data-contracts";
import { AttachmentTypes } from "~~/lib/api/types/non-generated";
import { useTagStore } from "~/stores/tags";
import { useLocationStore } from "~~/stores/locations";
import MdiLoading from "~icons/mdi/loading";
import MdiDelete from "~icons/mdi/delete";
import MdiPencil from "~icons/mdi/pencil";
Expand Down Expand Up @@ -47,9 +46,6 @@

const itemId = computed<string>(() => route.params.id as string);

const locationStore = useLocationStore();
const locations = computed(() => locationStore.allLocations);

const tagStore = useTagStore();
const tags = computed(() => tagStore.tags);

Expand Down
4 changes: 0 additions & 4 deletions frontend/pages/location/[id]/index/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import type { ItemAttachment, EntityFieldData, EntityOut, EntityUpdate } from "~~/lib/api/types/data-contracts";
import { AttachmentTypes } from "~~/lib/api/types/non-generated";
import { useTagStore } from "~/stores/tags";
import { useLocationStore } from "~~/stores/locations";
import MdiLoading from "~icons/mdi/loading";
import MdiDelete from "~icons/mdi/delete";
import MdiPencil from "~icons/mdi/pencil";
Expand Down Expand Up @@ -44,9 +43,6 @@

const locationId = computed<string>(() => route.params.id as string);

const locationStore = useLocationStore();
const locations = computed(() => locationStore.allLocations);

const tagStore = useTagStore();
const tags = computed(() => tagStore.tags);

Expand Down
7 changes: 2 additions & 5 deletions frontend/pages/location/[id]/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import type { AnyDetail, Details } from "~~/components/global/DetailsSection/types";
import { filterZeroValues } from "~~/components/global/DetailsSection/types";
import type { ItemAttachment } from "~~/lib/api/types/data-contracts";
import { useLocationStore } from "~~/stores/locations";
import MdiPackageVariant from "~icons/mdi/package-variant";
import MdiPlus from "~icons/mdi/plus";
import MdiPencil from "~icons/mdi/pencil";
Expand Down Expand Up @@ -49,7 +48,7 @@

const locationId = computed<string>(() => route.params.id as string);

const { data: location, refresh } = useAsyncData(locationId.value, async () => {
const { data: location } = useAsyncData(locationId.value, async () => {
const { data, error } = await api.items.getLocation(locationId.value);
if (error) {
toast.error(t("locations.toast.failed_load_location"));
Expand Down Expand Up @@ -86,8 +85,6 @@
navigateTo(`/location/${locationId.value}/edit`);
}

const locationStore = useLocationStore();

// Photos
type Photo = {
thumbnailSrc?: string;
Expand Down Expand Up @@ -229,7 +226,7 @@
<button
v-for="(photo, i) in photos"
:key="i"
class="aspect-square group relative overflow-hidden rounded-lg border bg-muted"
class="group relative aspect-[1/1] overflow-hidden rounded-lg border bg-muted"
@click="openImageDialog(photo, location.id)"
>
<img
Expand Down
7 changes: 1 addition & 6 deletions frontend/pages/reset-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@
</CardContent>

<CardFooter class="flex flex-col gap-2">
<Button
form="reset-password-form"
type="submit"
class="w-full"
:disabled="loading || !passwordValid || !token"
>
<Button form="reset-password-form" type="submit" class="w-full" :disabled="loading || !passwordValid || !token">
{{ $t("index.reset_password_set") }}
</Button>
<NuxtLink to="/" class="text-sm text-muted-foreground hover:underline">
Expand Down
Loading