Add support for colour setting spelled as ‘color’

This commit is contained in:
Samuel Elliott 2018-03-01 19:30:31 +00:00
parent 7954ebd764
commit 59bbc8d8ef
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,8 @@ export default class Setting {
constructor(args) {
args = args.args || args;
if (args.type === 'color') args.type = 'colour';
if (args.type === 'bool') return new BoolSetting(args);
else if (args.type === 'text') return new StringSetting(args);
else if (args.type === 'number') return new NumberSetting(args);

View File

@ -20,7 +20,7 @@
<FileSetting v-if="setting.type === 'file'" :setting="setting" :change="change"/>
<ArraySetting v-if="setting.type === 'array'" :setting="setting" :change="change" />
<CustomSetting v-if="setting.type === 'custom'" :setting="setting" :change="change" />
<ColourSetting v-if="setting.type === 'colour' || setting.type === 'color'" :setting="setting" :change="change"/>
<ColourSetting v-if="setting.type === 'colour'" :setting="setting" :change="change"/>
<div class="bd-form-divider"></div>
</div>
</template>