1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 05:09:42 +02:00

[WIP] User can select theme

This commit is contained in:
Harvey Kandola 2018-11-24 18:39:43 +00:00
parent 11e164496b
commit 679049d2b1
11 changed files with 141 additions and 8 deletions

View file

@ -13,10 +13,12 @@ import $ from 'jquery';
import { empty, and } from '@ember/object/computed';
import { isEmpty } from '@ember/utils';
import { set } from '@ember/object';
import { inject as service } from '@ember/service';
import Notifier from '../../mixins/notifier';
import Component from '@ember/component';
export default Component.extend(Notifier, {
appMeta: service(),
maxTags: 3,
titleEmpty: empty('model.general.title'),
messageEmpty: empty('model.general.message'),
@ -70,6 +72,11 @@ export default Component.extend(Notifier, {
set(this, 'messageError', false);
set(this, 'conversionEndpointError', false);
});
},
onThemeChange(theme) {
this.get('appMeta').setTheme(theme);
this.set('model.general.theme', theme);
}
}
});