mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 08:54:36 +03:00
762c3c4df0
no issue * move "save on first change" behaviour into editor controller * allow TAB events to be specified in keyEvents hash of gh-input * replace mobiledoc-kit/gh-koenig with a SimpleMDE based editor - remove `gh-koenig` in-repo-addon from `package.json` so that test files etc aren't loaded - remove `mobiledoc-kit` dependencies - extends `gh-editor` to handle file drag/drop - adds `gh-uploader` and `gh-progress-bar` components to handle file uploads in a more composable manner - adds `gh-simplemde` component that wraps SimpleMDE
24 lines
497 B
JavaScript
24 lines
497 B
JavaScript
import Component from 'ember-component';
|
|
import {htmlSafe} from 'ember-string';
|
|
|
|
export default Component.extend({
|
|
tagName: '',
|
|
|
|
// Public attributes
|
|
percentage: 0,
|
|
isError: false,
|
|
|
|
// Internal attributes
|
|
progressStyle: '',
|
|
|
|
didReceiveAttrs() {
|
|
this._super(...arguments);
|
|
|
|
let percentage = this.get('percentage');
|
|
let width = (percentage > 0) ? `${percentage}%` : '0';
|
|
|
|
this.set('progressStyle', htmlSafe(`width: ${width}`));
|
|
}
|
|
|
|
});
|