route changed

This commit is contained in:
Mamalizz
2025-02-28 23:11:16 +03:30
parent 7cead187be
commit 703cb9a2ce
2 changed files with 0 additions and 127 deletions
@@ -1,74 +0,0 @@
<script setup lang="ts">
// imports
import useDeleteAttachment from "~/composables/api/tickets/useDeleteAttachment";
// types
type Props = {
id: number;
size: number;
name: string;
};
type Emits = {
delete: [value: number];
};
// props
defineProps<Props>();
// Emits
const emit = defineEmits<Emits>();
// queries
const { mutateAsync: deleteAttachment, isPending: deleteAttachmentPending } =
useDeleteAttachment();
const handleDeleteAttachment = (id: number) => {
deleteAttachment(
{ id },
{
onSuccess: () => {
emit("delete", id);
},
}
);
};
</script>
<template>
<li class="w-full flex items-center">
<div class="w-2/12 flex justify-start">
<p class="text-sm text-black">{{ (size / 1024).toFixed(2) }}KB</p>
</div>
<div class="flex justify-end w-9/12">
<p class="text-sm text-black">
{{ name }}
</p>
</div>
<div class="w-1/12 ps-1">
<button class="cursor-pointer" @click="handleDeleteAttachment(id)">
<Icon
:name="
deleteAttachmentPending
? 'svg-spinners:ring-resize'
: 'ci:close'
"
:class="
deleteAttachmentPending
? 'text-black/50'
: '**:stroke-red-500'
"
class="pt-1"
size="28"
/>
</button>
</div>
</li>
</template>
<style scoped></style>
@@ -1,53 +0,0 @@
<script setup lang="ts">
// types
type Props = {
is_user: boolean;
date: string;
username: string;
message: string;
profile: string;
files: string[];
};
// props
defineProps<Props>();
</script>
<template>
<div
class="w-full flex items-center"
:class="is_user ? 'justify-start' : 'justify-end'"
>
<div
class="w-full lg:w-1/2 bg-slate-50 border border-slate-200 rounded-xl p-5 flex items-start"
:class="is_user ? 'rounded-br-none' : 'rounded-bl-none'"
>
<div class="w-2/12 flex items-start justify-start">
<img :src="profile" class="size-16 rounded-full" />
</div>
<div class="w-10/12 flex flex-col items-start pt-8">
<div class="flex flex-col gap-0.5 w-full">
<p
class="text-[10px] font-semibold text-[#1677FF] line-clamp-1 text-right"
style="direction: ltr"
>
{{ date }}
</p>
<p
class="text-xs font-semibold text-dynamic-secondary line-clamp-1"
>
{{ username }}
</p>
</div>
<div class="py-2 text-start">
{{ message }}
</div>
</div>
</div>
</div>
</template>
<style scoped></style>