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 style="width: 400px">
<q-card-section> <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>
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
าดำเนนการตอจะทำการลบ าดำเนนการตอจะทำการลบ
</q-card-section> </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-space />
<q-btn <q-btn
flat flat
@ -44,7 +45,7 @@ const props = withDefaults(
flat flat
label="ลบ" label="ลบ"
v-close-popup v-close-popup
class="text-teal" class="text-red"
@click=" @click="
() => { () => {
deleteFolder(pathname) deleteFolder(pathname)

View file

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