diff options
Diffstat (limited to 'frontend/app/views/tile/components/tile.form.js')
| -rw-r--r-- | frontend/app/views/tile/components/tile.form.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/frontend/app/views/tile/components/tile.form.js b/frontend/app/views/tile/components/tile.form.js index c258c5e..54b736e 100644 --- a/frontend/app/views/tile/components/tile.form.js +++ b/frontend/app/views/tile/components/tile.form.js @@ -55,6 +55,7 @@ class TileForm extends Component { pageList: [], popupList: [], cursors: {}, + fontFamilies: [], } constructor(props){ @@ -95,7 +96,12 @@ class TileForm extends Component { a[b.id] = b return a }, {}) - this.setState({ pageList, popupList, cursors }) + let customFonts = (this.props.graph.show.res.settings.custom_fonts || "").split("\n").map(name => ({ + name, + label: name.split(",")[0].replace(/\"/g, "") + })) + let fontFamilies = TEXT_FONT_FAMILIES.concat(customFonts) + this.setState({ pageList, popupList, cursors, fontFamilies }) if (isNew) { const newTile = TILE_CONSTRUCTORS.image({ id: "new", @@ -317,7 +323,7 @@ class TileForm extends Component { : temporaryTile.type === 'video' ? <TileVideoForm tile={temporaryTile} errorFields={errorFields} parent={this} /> : temporaryTile.type === 'text' - ? <TileTextForm tile={temporaryTile} errorFields={errorFields} parent={this} /> + ? <TileTextForm tile={temporaryTile} errorFields={errorFields} parent={this} fontFamilies={this.state.fontFamilies} /> : temporaryTile.type === 'link' ? <TileLinkForm tile={temporaryTile} errorFields={errorFields} parent={this} /> : temporaryTile.type === 'gradient' |
