refactor: consolidate CodeMirror editors into unified AE_Comp_Editor_CodeMirror component
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
import { ae_api } from '$lib/stores/ae_stores';
|
||||
import E_app_codemirror_v5 from '$lib/app_components/e_app_codemirror_v5.svelte';
|
||||
import AE_Comp_Editor_CodeMirror from '$lib/elements/AE_Comp_Editor_CodeMirror.svelte';
|
||||
import Ae_comp_event_settings_form from './ae_comp__event_settings_form.svelte';
|
||||
import Ae_comp_event_settings_pres_mgmt_form from './ae_comp__event_settings_pres_mgmt_form.svelte';
|
||||
import Ae_comp_event_settings_basic_form from './ae_comp__event_settings_basic_form.svelte';
|
||||
@@ -84,14 +84,13 @@
|
||||
onsave={(data: any) => handle_save('cfg_json', data)}
|
||||
/>
|
||||
{:else}
|
||||
<E_app_codemirror_v5
|
||||
editable={true}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
readonly={false}
|
||||
content={JSON.stringify(event_obj.cfg_json, null, 4)}
|
||||
bind:new_content={event_obj.cfg_json}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button
|
||||
class="btn preset-tonal-primary"
|
||||
@@ -120,14 +119,13 @@
|
||||
onsave={(data: any) => handle_save('mod_pres_mgmt_json', data)}
|
||||
/>
|
||||
{:else}
|
||||
<E_app_codemirror_v5
|
||||
editable={true}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
readonly={false}
|
||||
content={JSON.stringify(event_obj.mod_pres_mgmt_json, null, 4)}
|
||||
bind:new_content={event_obj.mod_pres_mgmt_json}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button
|
||||
class="btn preset-tonal-primary"
|
||||
@@ -157,14 +155,13 @@
|
||||
onsave={(data: any) => handle_save('mod_badges_json', data)}
|
||||
/>
|
||||
{:else}
|
||||
<E_app_codemirror_v5
|
||||
editable={true}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
readonly={false}
|
||||
content={JSON.stringify(event_obj.mod_badges_json, null, 4)}
|
||||
bind:new_content={event_obj.mod_badges_json}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button
|
||||
class="btn preset-tonal-primary"
|
||||
@@ -193,14 +190,13 @@
|
||||
onsave={(data: any) => handle_save('mod_abstracts_json', data)}
|
||||
/>
|
||||
{:else}
|
||||
<E_app_codemirror_v5
|
||||
editable={true}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
readonly={false}
|
||||
content={JSON.stringify(event_obj.mod_abstracts_json, null, 4)}
|
||||
bind:new_content={event_obj.mod_abstracts_json}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button
|
||||
class="btn preset-tonal-primary"
|
||||
@@ -216,14 +212,13 @@
|
||||
<details class="details">
|
||||
<summary class="summary">Exhibits (mod_exhibits_json)</summary>
|
||||
<div class="p-4">
|
||||
<E_app_codemirror_v5
|
||||
editable={true}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
readonly={false}
|
||||
content={JSON.stringify(event_obj.mod_exhibits_json, null, 4)}
|
||||
bind:new_content={event_obj.mod_exhibits_json}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button
|
||||
class="btn preset-tonal-primary"
|
||||
@@ -237,14 +232,13 @@
|
||||
<details class="details">
|
||||
<summary class="summary">Meetings (mod_meetings_json)</summary>
|
||||
<div class="p-4">
|
||||
<E_app_codemirror_v5
|
||||
editable={true}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
readonly={false}
|
||||
content={JSON.stringify(event_obj.mod_meetings_json, null, 4)}
|
||||
bind:new_content={event_obj.mod_meetings_json}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button
|
||||
class="btn preset-tonal-primary"
|
||||
|
||||
Reference in New Issue
Block a user