@the-grid/ed
Advanced tools
Comparing version 0.19.0 to 0.19.1
## dev | ||
## 0.19.1 - 2016-08-01 | ||
* FIX -- `ed.setCoverPreview` fixed | ||
## 0.19.0 - 2016-07-30 | ||
@@ -4,0 +8,0 @@ |
@@ -275,2 +275,3 @@ /* eslint no-console: 0 */ | ||
} | ||
const {progress, status, failed} = block.metadata | ||
@@ -281,2 +282,7 @@ if (progress === undefined && status === undefined && failed === undefined) { | ||
ed.updateProgress(block.id, {progress, status, failed}) | ||
const {cover} = block | ||
if (cover && cover.src) { | ||
ed.setCoverPreview(block.id, cover.src) | ||
} | ||
} | ||
@@ -283,0 +289,0 @@ } |
@@ -547,2 +547,3 @@ /*eslint quotes: [0], comma-style: [0]*/ | ||
metadata: { | ||
starred: true, | ||
status: 'Sharing... https://thegrid.io/#8', | ||
@@ -646,2 +647,21 @@ progress: 67 | ||
{ | ||
'type': 'text', | ||
'html': '<p>Placeholder for URL share with progress:</p>', | ||
'metadata': {'starred': true} | ||
}, | ||
sharing, | ||
{ | ||
'type': 'text', | ||
'html': '<p>Placeholder failed:</p>', | ||
'metadata': {'starred': true} | ||
}, | ||
{ id: '0000-failed' | ||
, type: 'placeholder' | ||
, metadata: | ||
{ starred: true | ||
, status: 'Hmmm...' | ||
, failed: true | ||
} | ||
}, | ||
{ | ||
'id': 'abc-00000000-h1', | ||
@@ -677,10 +697,2 @@ 'type': 'h1', | ||
tweet, | ||
sharing, | ||
{ id: '0000-failed' | ||
, type: 'placeholder' | ||
, metadata: | ||
{ status: 'Hmmm...' | ||
, failed: true | ||
} | ||
}, | ||
{ | ||
@@ -687,0 +699,0 @@ 'id': 'abc-00000000-h3', |
@@ -238,6 +238,6 @@ 'use strict'; | ||
var theme = failed === true ? 'error' : 'info'; | ||
var color = failed === true ? 'error' : 'info'; | ||
return (0, _react.createElement)(_Progress2.default, { value: progress / 100, | ||
style: { margin: '8px 0' }, | ||
theme: theme | ||
color: color | ||
}); | ||
@@ -244,0 +244,0 @@ } |
@@ -68,7 +68,7 @@ 'use strict'; | ||
function makeProgress(progress, theme) { | ||
function makeProgress(progress, color) { | ||
if (progress == null) return; | ||
return (0, _react.createElement)(_Progress2.default, { value: progress / 100, | ||
style: { marginTop: 16 }, | ||
theme: theme | ||
color: color | ||
}); | ||
@@ -75,0 +75,0 @@ } |
@@ -477,2 +477,4 @@ 'use strict'; | ||
this._coverPreviews[id] = src; | ||
// Let content widgets know to update | ||
this.trigger('media.update.id', id); | ||
} | ||
@@ -479,0 +481,0 @@ }, { |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.19.0", | ||
"version": "0.19.1", | ||
"description": "the grid api with prosemirror", | ||
@@ -8,0 +8,0 @@ "main": "dist/ed.js", |
@@ -192,7 +192,7 @@ // Copy style to head | ||
const theme = (failed === true ? 'error' : 'info') | ||
const color = (failed === true ? 'error' : 'info') | ||
return el(Progress | ||
, { value: progress / 100 | ||
, style: {margin: '8px 0'} | ||
, theme | ||
, color | ||
} | ||
@@ -199,0 +199,0 @@ ) |
@@ -57,3 +57,3 @@ import React, {createElement as el} from 'react' | ||
function makeProgress (progress, theme) { | ||
function makeProgress (progress, color) { | ||
if (progress == null) return | ||
@@ -63,3 +63,3 @@ return el(Progress | ||
, style: {marginTop: 16} | ||
, theme | ||
, color | ||
} | ||
@@ -66,0 +66,0 @@ ) |
@@ -396,2 +396,4 @@ import '../util/react-tap-hack' | ||
this._coverPreviews[id] = src | ||
// Let content widgets know to update | ||
this.trigger('media.update.id', id) | ||
} | ||
@@ -398,0 +400,0 @@ getCoverPreview (id) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
7343772
13986