fix: alert upload and delete
This commit is contained in:
parent
6d79f9c94d
commit
6fa4c616a1
2 changed files with 10 additions and 11 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue