From 89a9271808162436a0afcc025c7f1bfcf52cb648 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Wed, 8 May 2024 11:03:15 +0100 Subject: [PATCH 1/2] Use `Statamic.$slug` helper instead of `$slugify` --- resources/js/components/blueprints/Section.vue | 2 +- resources/js/components/blueprints/Tab.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/components/blueprints/Section.vue b/resources/js/components/blueprints/Section.vue index 95bff2294d..6dbd71bdf7 100644 --- a/resources/js/components/blueprints/Section.vue +++ b/resources/js/components/blueprints/Section.vue @@ -196,7 +196,7 @@ export default { editConfirmed() { if (! this.editingSection.handle) { - this.editingSection.handle = this.$slugify(this.editingSection.display, '_'); + this.editingSection.handle = Statamic.$slug.separatedBy('_').create(this.editingSection.display) } this.$emit('updated', {...this.section, ...this.editingSection}); diff --git a/resources/js/components/blueprints/Tab.vue b/resources/js/components/blueprints/Tab.vue index cc0d60ac13..dbf1fdb961 100644 --- a/resources/js/components/blueprints/Tab.vue +++ b/resources/js/components/blueprints/Tab.vue @@ -135,7 +135,7 @@ export default { editConfirmed() { if (! this.handle) { - this.handle = this.$slugify(this.display, '_'); + this.handle = Statamic.$slug.separatedBy('_').create(this.display) } this.$emit('updated', { From 7343c15ebdbe2defc18e63b638d3a2fb0ac65c46 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Wed, 8 May 2024 10:45:58 -0400 Subject: [PATCH 2/2] these exist --- resources/js/components/blueprints/Section.vue | 2 +- resources/js/components/blueprints/Tab.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/components/blueprints/Section.vue b/resources/js/components/blueprints/Section.vue index 6dbd71bdf7..6b86678bdc 100644 --- a/resources/js/components/blueprints/Section.vue +++ b/resources/js/components/blueprints/Section.vue @@ -196,7 +196,7 @@ export default { editConfirmed() { if (! this.editingSection.handle) { - this.editingSection.handle = Statamic.$slug.separatedBy('_').create(this.editingSection.display) + this.editingSection.handle = snake_case(this.editingSection.display) } this.$emit('updated', {...this.section, ...this.editingSection}); diff --git a/resources/js/components/blueprints/Tab.vue b/resources/js/components/blueprints/Tab.vue index dbf1fdb961..4cdd039e4d 100644 --- a/resources/js/components/blueprints/Tab.vue +++ b/resources/js/components/blueprints/Tab.vue @@ -135,7 +135,7 @@ export default { editConfirmed() { if (! this.handle) { - this.handle = Statamic.$slug.separatedBy('_').create(this.display) + this.handle = snake_case(this.display) } this.$emit('updated', {