fix: alert upload and delete

This commit is contained in:
somnetsak123 2023-11-28 09:24:20 +07:00 committed by Methapon2001
parent 6d79f9c94d
commit 6fa4c616a1
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
2 changed files with 10 additions and 11 deletions

View file

@ -20,14 +20,15 @@ const props = withDefaults(
>
<q-card style="width: 400px">
<q-card-section>
<div class="text-h6">แจงเตอนการลบ</div>
<div class="text-h6"><q-icon name="error" color="negative" size="2.5rem"/>แจงเตอนการลบ</div>
</q-card-section>
<q-card-section class="q-pt-none">
าดำเนนการตอจะทำการลบ
</q-card-section>
<q-card-actions align="right" class="bg-white text-red">
<q-card-actions align="right" class="bg-white text-primary">
<q-space />
<q-btn
flat
@ -44,7 +45,7 @@ const props = withDefaults(
flat
label="ลบ"
v-close-popup
class="text-teal"
class="text-red"
@click="
() => {
deleteFolder(pathname)

View file

@ -17,10 +17,10 @@ const props = withDefaults(defineProps<{ drawerFile: boolean }>(), {
drawerFile: false,
})
async function handleSubmit(continueUpload:boolean = false) {
async function handleSubmit(continueUpload: boolean = false) {
if (!inputFile.value) return
// getFile(p)
if (checkFile(inputFile.value.name) || continueUpload ) {
if (checkFile(inputFile.value.name) || continueUpload) {
await uploadFile(currentPath.value, inputFile.value, {
title: fileTitle.value,
description: fileDesc.value,
@ -115,8 +115,6 @@ async function handleSubmit(continueUpload:boolean = false) {
/>
</q-drawer>
<q-btn label="Click me" color="primary" @click="notification = true" />
<q-dialog
v-model="notification"
persistent
@ -125,14 +123,14 @@ async function handleSubmit(continueUpload:boolean = false) {
>
<q-card style="width: 400px">
<q-card-section>
<div class="text-h6">เตอนพบไฟลอซำในระบบ</div>
<div class="text-h6"><q-icon name="error" color="negative" size="2.5rem"/>เตอนพบไฟลอซำในระบบ</div>
</q-card-section>
<q-card-section class="q-pt-none">
าดำเนนการตอจะอพขอมลทบกบอนเก
</q-card-section>
<q-card-actions align="right" class="bg-white text-red">
<q-card-actions align="right" class="bg-white text-primary">
<q-space />
<q-btn flat label="ยกเลิก" v-close-popup />
@ -140,8 +138,8 @@ async function handleSubmit(continueUpload:boolean = false) {
flat
label="ดำเนินการต่อ"
v-close-popup
class="text-teal"
@click="()=> handleSubmit(true)"
class="text-red"
@click="() => handleSubmit(true)"
/>
</q-card-actions>
</q-card>