Sha256: 28087b38d644b871db7df44036392c9ee105458f1bedfab80632504afbd59171

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

<template>
  <dynamic-form
    class="mt-2"
    :parentKey="currentSection.id"
    :settings="sectionSettings"
    :content="currentSectionContent"
    :focusedSetting="settingId"
    :i18nScope="i18nScope"
    @blur="onBlur"
    @change="updateSectionContent"
  />
</template>

<script>
import { mapActions } from 'vuex'
import DynamicForm from '@/components/dynamic-form/index.vue'

export default {
  name: 'SectionSettingList',
  components: { DynamicForm },
  props: {
    sectionId: { type: String, default: undefined },
    settingId: { type: String, default: undefined },
    advanced: { type: Boolean, default: false },
  },
  computed: {
    sectionSettings() {
      return this.advanced
        ? this.currentSectionAdvancedSettings
        : this.services.section.filterSettings(
            this.currentSectionSettings,
            this.currentSectionContent,
          )
    },
    i18nScope() {
      return `${this.currentSectionI18nScope}.settings`
    },
  },
  methods: {
    ...mapActions(['updateSectionContent']),
    onBlur() {
      this.$router
        .push({ name: 'editSection', params: { sectionId: this.sectionId } })
        .catch((err) => {
          if (err.name !== 'NavigationDuplicated') throw err
        })
    },
  },
}
</script>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
maglevcms-1.7.3 app/frontend/editor/components/section-pane/setting-list.vue
maglevcms-1.7.2 app/frontend/editor/components/section-pane/setting-list.vue
maglevcms-1.7.1 app/frontend/editor/components/section-pane/setting-list.vue
maglevcms-1.7.0 app/frontend/editor/components/section-pane/setting-list.vue
maglevcms-1.6.1 app/frontend/editor/components/section-pane/setting-list.vue
maglevcms-1.6.0 app/frontend/editor/components/section-pane/setting-list.vue
maglevcms-1.5.1 app/frontend/editor/components/section-pane/setting-list.vue