From c9901c3c0c3fd21e273f3a35d6dc04ae7afbbc3b Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 24 Jan 2024 09:54:02 +0300 Subject: [PATCH] Update dialog docs --- doc/confirmdialog/BasicDoc.vue | 49 +++++++++++++------- doc/confirmdialog/HeadlessDoc.vue | 8 ++-- doc/confirmdialog/PositionDoc.vue | 76 ++++++++++++++++++------------- doc/confirmdialog/TemplateDoc.vue | 26 +++++++---- doc/confirmpopup/BasicDoc.vue | 37 +++++++++++---- doc/confirmpopup/HeadlessDoc.vue | 38 ++++++++-------- doc/confirmpopup/TemplateDoc.vue | 34 ++++++++------ doc/dialog/TemplateDoc.vue | 8 ++-- 8 files changed, 168 insertions(+), 108 deletions(-) diff --git a/doc/confirmdialog/BasicDoc.vue b/doc/confirmdialog/BasicDoc.vue index e5b213d6b..b1dc45d75 100644 --- a/doc/confirmdialog/BasicDoc.vue +++ b/doc/confirmdialog/BasicDoc.vue @@ -4,8 +4,8 @@
- - + +
@@ -17,16 +17,16 @@ export default { code: { basic: ` - - + + `, options: ` @@ -38,6 +38,9 @@ export default { message: 'Are you sure you want to proceed?', header: 'Confirmation', icon: 'pi pi-exclamation-triangle', + rejectClass: 'p-button-secondary p-button-outlined', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -49,10 +52,12 @@ export default { confirm2() { this.$confirm.require({ message: 'Do you want to delete this record?', - header: 'Delete Confirmation', + header: 'Danger Zone', icon: 'pi pi-info-circle', - rejectClass: 'p-button-text p-button-text', - acceptClass: 'p-button-danger p-button-text', + rejectLabel: 'Cancel', + acceptLabel: 'Delete', + rejectClass: 'p-button-secondary p-button-outlined', + acceptClass: 'p-button-danger', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 }); }, @@ -70,8 +75,8 @@ export default {
- - + +
@@ -87,6 +92,9 @@ const confirm1 = () => { message: 'Are you sure you want to proceed?', header: 'Confirmation', icon: 'pi pi-exclamation-triangle', + rejectClass: 'p-button-secondary p-button-outlined', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -99,10 +107,12 @@ const confirm1 = () => { const confirm2 = () => { confirm.require({ message: 'Do you want to delete this record?', - header: 'Delete Confirmation', + header: 'Danger Zone', icon: 'pi pi-info-circle', - rejectClass: 'p-button-text p-button-text', - acceptClass: 'p-button-danger p-button-text', + rejectLabel: 'Cancel', + acceptLabel: 'Delete', + rejectClass: 'p-button-secondary p-button-outlined', + acceptClass: 'p-button-danger', accept: () => { toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 }); }, @@ -122,6 +132,9 @@ const confirm2 = () => { message: 'Are you sure you want to proceed?', header: 'Confirmation', icon: 'pi pi-exclamation-triangle', + rejectClass: 'p-button-secondary p-button-outlined', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -133,10 +146,12 @@ const confirm2 = () => { confirm2() { this.$confirm.require({ message: 'Do you want to delete this record?', - header: 'Delete Confirmation', + header: 'Danger Zone', icon: 'pi pi-info-circle', - rejectClass: 'p-button-text p-button-text', - acceptClass: 'p-button-danger p-button-text', + rejectLabel: 'Cancel', + acceptLabel: 'Delete', + rejectClass: 'p-button-secondary p-button-outlined', + acceptClass: 'p-button-danger', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 }); }, diff --git a/doc/confirmdialog/HeadlessDoc.vue b/doc/confirmdialog/HeadlessDoc.vue index b5feda522..c6225a776 100644 --- a/doc/confirmdialog/HeadlessDoc.vue +++ b/doc/confirmdialog/HeadlessDoc.vue @@ -18,7 +18,7 @@
- +
@@ -44,7 +44,7 @@ export default { - + `, options: `
- +
@@ -107,7 +107,7 @@ export default {
- +
diff --git a/doc/confirmdialog/PositionDoc.vue b/doc/confirmdialog/PositionDoc.vue index 3688c8d54..ac8fa5cbe 100644 --- a/doc/confirmdialog/PositionDoc.vue +++ b/doc/confirmdialog/PositionDoc.vue @@ -5,18 +5,18 @@
- - + +
- - - + + +
- - - + + +
@@ -30,18 +30,18 @@ export default { basic: `
- - + +
- - - + + +
- - - + + +
`, options: ` @@ -50,18 +50,18 @@ export default {
- - + +
- - - + + +
- - - + + +
@@ -76,6 +76,10 @@ export default { header: 'Confirmation', icon: 'pi pi-info-circle', position: position, + rejectClass: 'p-button-secondary p-button-text', + acceptClass: 'p-button-text', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Request submitted', life: 3000 }); }, @@ -94,18 +98,18 @@ export default {
- - + +
- - - + + +
- - - + + +
@@ -124,6 +128,10 @@ const confirmPosition = (position) => { header: 'Confirmation', icon: 'pi pi-info-circle', position: position, + rejectClass: 'p-button-secondary p-button-text', + acceptClass: 'p-button-text', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Request submitted', life: 3000 }); }, @@ -145,6 +153,10 @@ const confirmPosition = (position) => { header: 'Confirmation', icon: 'pi pi-info-circle', position: position, + rejectClass: 'p-button-secondary p-button-text', + acceptClass: 'p-button-text', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Request submitted', life: 3000 }); }, diff --git a/doc/confirmdialog/TemplateDoc.vue b/doc/confirmdialog/TemplateDoc.vue index 47fa1c7da..38850982b 100644 --- a/doc/confirmdialog/TemplateDoc.vue +++ b/doc/confirmdialog/TemplateDoc.vue @@ -11,7 +11,7 @@
- +
@@ -30,7 +30,7 @@ export default { - + `, options: `
- +
@@ -59,8 +59,10 @@ export default { icon: 'pi pi-exclamation-circle', acceptIcon: 'pi pi-check', rejectIcon: 'pi pi-times', - rejectClass: 'p-button-sm', - acceptClass: 'p-button-outlined p-button-sm', + rejectClass: 'p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -84,7 +86,7 @@ export default {
- +
@@ -104,8 +106,10 @@ const showTemplate = () => { icon: 'pi pi-exclamation-circle', acceptIcon: 'pi pi-check', rejectIcon: 'pi pi-times', - rejectClass: 'p-button-sm', - acceptClass: 'p-button-outlined p-button-sm', + rejectClass: 'p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -128,8 +132,10 @@ const showTemplate = () => { icon: 'pi pi-exclamation-circle', acceptIcon: 'pi pi-check', rejectIcon: 'pi pi-times', - rejectClass: 'p-button-sm', - acceptClass: 'p-button-outlined p-button-sm', + rejectClass: 'p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, diff --git a/doc/confirmpopup/BasicDoc.vue b/doc/confirmpopup/BasicDoc.vue index 7b695081d..2bbb340a5 100644 --- a/doc/confirmpopup/BasicDoc.vue +++ b/doc/confirmpopup/BasicDoc.vue @@ -4,8 +4,8 @@
- - + +
@@ -17,16 +17,16 @@ export default { code: { basic: ` - - + + `, options: ` @@ -38,6 +38,10 @@ export default { target: event.currentTarget, message: 'Are you sure you want to proceed?', icon: 'pi pi-exclamation-triangle', + rejectClass: 'p-button-secondary p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -51,7 +55,10 @@ export default { target: event.currentTarget, message: 'Do you want to delete this record?', icon: 'pi pi-info-circle', + rejectClass: 'p-button-secondary p-button-outlined p-button-sm', acceptClass: 'p-button-danger p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Delete', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 }); }, @@ -69,8 +76,8 @@ export default {
- - + +
@@ -86,6 +93,10 @@ const confirm1 = (event) => { target: event.currentTarget, message: 'Are you sure you want to proceed?', icon: 'pi pi-exclamation-triangle', + rejectClass: 'p-button-secondary p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -100,7 +111,10 @@ const confirm2 = (event) => { target: event.currentTarget, message: 'Do you want to delete this record?', icon: 'pi pi-info-circle', + rejectClass: 'p-button-secondary p-button-outlined p-button-sm', acceptClass: 'p-button-danger p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Delete', accept: () => { toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 }); }, @@ -120,6 +134,10 @@ const confirm2 = (event) => { target: event.currentTarget, message: 'Are you sure you want to proceed?', icon: 'pi pi-exclamation-triangle', + rejectClass: 'p-button-secondary p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Save', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -133,7 +151,10 @@ const confirm2 = (event) => { target: event.currentTarget, message: 'Do you want to delete this record?', icon: 'pi pi-info-circle', + rejectClass: 'p-button-secondary p-button-outlined p-button-sm', acceptClass: 'p-button-danger p-button-sm', + rejectLabel: 'Cancel', + acceptLabel: 'Delete', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted', life: 3000 }); }, diff --git a/doc/confirmpopup/HeadlessDoc.vue b/doc/confirmpopup/HeadlessDoc.vue index 16d765126..d3c6e9ad1 100644 --- a/doc/confirmpopup/HeadlessDoc.vue +++ b/doc/confirmpopup/HeadlessDoc.vue @@ -4,17 +4,17 @@
- +
@@ -27,33 +27,33 @@ export default { basic: ` - + `, options: ` @@ -64,7 +64,7 @@ export default { this.$confirm.require({ target: event.currentTarget, group: 'headless', - message: 'Are you sure? You cannot undo this.', + message: 'Save your current process?', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -82,17 +82,17 @@ export default {
- +
@@ -107,7 +107,7 @@ const requireConfirmation = (event) => { confirm.require({ target: event.currentTarget, group: 'headless', - message: 'Are you sure? You cannot undo this.', + message: 'Save your current process?', accept: () => { toast.add({severity:'info', summary:'Confirmed', detail:'You have accepted', life: 3000}); }, @@ -126,7 +126,7 @@ const requireConfirmation = (event) => { this.$confirm.require({ target: event.currentTarget, group: 'headless', - message: 'Are you sure? You cannot undo this.', + message: 'Save your current process?', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, diff --git a/doc/confirmpopup/TemplateDoc.vue b/doc/confirmpopup/TemplateDoc.vue index fee39f73b..610866079 100644 --- a/doc/confirmpopup/TemplateDoc.vue +++ b/doc/confirmpopup/TemplateDoc.vue @@ -4,14 +4,14 @@
- +
@@ -24,27 +24,27 @@ export default { basic: ` - + `, options: ` @@ -59,8 +59,10 @@ export default { icon: 'pi pi-exclamation-circle', acceptIcon: 'pi pi-check', rejectIcon: 'pi pi-times', - rejectClass: 'p-button-sm', - acceptClass: 'p-button-outlined p-button-sm', + acceptLabel: 'Confirm', + rejectLabel: 'Cancel', + rejectClass: 'p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, @@ -78,14 +80,14 @@ export default {
- +
@@ -104,8 +106,10 @@ const showTemplate = (event) => { icon: 'pi pi-exclamation-circle', acceptIcon: 'pi pi-check', rejectIcon: 'pi pi-times', - rejectClass: 'p-button-sm', - acceptClass: 'p-button-outlined p-button-sm', + acceptLabel: 'Confirm', + rejectLabel: 'Cancel', + rejectClass: 'p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', accept: () => { toast.add({severity:'info', summary:'Confirmed', detail:'You have accepted', life: 3000}); }, @@ -128,8 +132,10 @@ const showTemplate = (event) => { icon: 'pi pi-exclamation-circle', acceptIcon: 'pi pi-check', rejectIcon: 'pi pi-times', - rejectClass: 'p-button-sm', - acceptClass: 'p-button-outlined p-button-sm', + acceptLabel: 'Confirm', + rejectLabel: 'Cancel', + rejectClass: 'p-button-outlined p-button-sm', + acceptClass: 'p-button-sm', accept: () => { this.$toast.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 }); }, diff --git a/doc/dialog/TemplateDoc.vue b/doc/dialog/TemplateDoc.vue index 24ab5d67c..5089d9caf 100644 --- a/doc/dialog/TemplateDoc.vue +++ b/doc/dialog/TemplateDoc.vue @@ -22,7 +22,7 @@ @@ -55,7 +55,7 @@ export default { `, @@ -80,7 +80,7 @@ export default { @@ -117,7 +117,7 @@ export default {