refactor: align copy code pattern with rest of components page
Use inline template literals with {% raw %}{% endraw %} and HTML entities
(") for quotes, consistent with other copy code buttons on the page.
Removed the codeSnippets JS variables.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -435,34 +435,6 @@ function adminComponents() {
|
||||
showDynamicConfirmDemo: false,
|
||||
dynamicItemName: '',
|
||||
|
||||
// Code snippets for confirm modal macros
|
||||
codeSnippets: {
|
||||
confirmModal: `{% from 'shared/macros/modals.html' import confirm_modal %}
|
||||
|
||||
{{ confirm_modal(
|
||||
'deleteConfirm',
|
||||
'Delete Item',
|
||||
'Are you sure you want to delete this item?',
|
||||
'deleteItem()',
|
||||
'showDeleteModal',
|
||||
'Delete',
|
||||
'Cancel',
|
||||
'danger'
|
||||
) }}`,
|
||||
confirmModalDynamic: `{% from 'shared/macros/modals.html' import confirm_modal_dynamic %}
|
||||
|
||||
{{ confirm_modal_dynamic(
|
||||
'removePlatformModal',
|
||||
'Remove Platform',
|
||||
"'Are you sure you want to remove \\\"' + (item?.name || '') + '\\\" ?'",
|
||||
'confirmRemove()',
|
||||
'showConfirmModal',
|
||||
'Remove',
|
||||
'Cancel',
|
||||
'warning'
|
||||
) }}`
|
||||
},
|
||||
|
||||
// Example log data for demo
|
||||
showErrorLogDemo() {
|
||||
this.exampleLog = {
|
||||
|
||||
Reference in New Issue
Block a user