Rename constants

This commit is contained in:
Ramon Wenger 2022-06-22 20:34:43 +02:00
parent 0060889a63
commit 813751cf26
4 changed files with 10 additions and 10 deletions

View File

@ -140,7 +140,7 @@
import {CHOOSER, transformInnerContents} from '@/components/content-block-form/helpers.js';
import ContentElementActions from '@/components/content-block-form/ContentElementActions.vue';
import {ContentBlock, numberOrUndefined} from "@/@types";
import {DEFAULT_FEATURES} from "@/consts/features.consts";
import {DEFAULT_FEATURE_SET} from "@/consts/features.consts";
// TODO: refactor this file, it's huuuuuge!
interface ContentBlockFormData {
@ -159,7 +159,7 @@
},
features: {
type: String,
default: DEFAULT_FEATURES
default: DEFAULT_FEATURE_SET
}
},
provide(): object {
@ -191,7 +191,7 @@
return this.localContentBlock.title > '';
},
hasDefaultFeatures(): boolean {
return this.features === DEFAULT_FEATURES;
return this.features === DEFAULT_FEATURE_SET;
}
},
methods: {

View File

@ -46,7 +46,7 @@
import formElementIcons from '@/components/ui/form-element-icons';
import CrossIcon from '@/components/icons/CrossIcon';
import ChooserElement from '@/components/content-forms/ChooserElement';
import {DEFAULT_FEATURES} from '@/consts/features.consts';
import {DEFAULT_FEATURE_SET} from '@/consts/features.consts';
export default {
@ -73,7 +73,7 @@
},
data() {
const hasDefaultFeatures = this.features === DEFAULT_FEATURES;
const hasDefaultFeatures = this.features === DEFAULT_FEATURE_SET;
return {
convertToList: false,
chooserTypes: [
@ -127,7 +127,7 @@
return this.chooserTypes.filter(type => !("show" in type) || type.show ); // display element if `show` is not set or if `show` evaluates to true
},
hasDefaultFeatures() {
return this.features === DEFAULT_FEATURES;
return this.features === DEFAULT_FEATURE_SET;
}
},

View File

@ -1,2 +1,2 @@
export const DEFAULT_FEATURES = 'default';
export const ROOMS_FEATURES = 'rooms';
export const DEFAULT_FEATURE_SET = 'default';
export const ROOMS_FEATURE_SET = 'rooms';

View File

@ -7,14 +7,14 @@
<script>
import ContentBlockForm from '@/components/content-block-form/ContentBlockForm';
import {ROOMS_FEATURES} from '@/consts/features.consts';
import {ROOMS_FEATURE_SET} from '@/consts/features.consts';
export default {
components: {ContentBlockForm},
data() {
return {
features: ROOMS_FEATURES,
features: ROOMS_FEATURE_SET,
roomEntry: {
title: '',
contents: []