From a5edc770771479532f6e4af08e71b242744625d2 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Apr 2021 15:54:30 +0200 Subject: mitigating some weird nav issues and FOUC --- frontend/app/views/tile/components/tile.form.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'frontend/app/views/tile/components') 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' ? : temporaryTile.type === 'text' - ? + ? : temporaryTile.type === 'link' ? : temporaryTile.type === 'gradient' -- cgit v1.2.3-70-g09d2