From e421c19b6bd5a4ad93c3ae9407c5508f700bbe65 Mon Sep 17 00:00:00 2001 From: Rick Companje Date: Wed, 2 Jun 2021 17:52:39 +0200 Subject: [PATCH 1/2] Update files.js --- src/js/actions/files.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/js/actions/files.js b/src/js/actions/files.js index e31bcbe..ba451f9 100644 --- a/src/js/actions/files.js +++ b/src/js/actions/files.js @@ -87,7 +87,10 @@ export const openFileSelector = () => { }; async function loadFile(dispatch, fileName, getData) { - switch (fileName.match(/\.[0-9a-z]+$/i)[0].toUpperCase()) { + let matches = fileName.match(/\.[0-9a-z]+$/i); + if (!matches) return; + + switch (matches[0].toUpperCase()) { case ".ZIP": let zip = await JSZip.loadAsync(await getData()); @@ -104,7 +107,7 @@ export const openFileSelector = () => { const sketchBlob = new Blob([sketchData], { type: 'application/json' }); const doc = { - name: fileName, + name: fileName.replace(".doodle3d",""), appVersion: VERSION, _attachments: { img: { content_type: imgBlob.type, data: imgBlob }, From d7eed9f90399196d4b732d9eb5a384e8864c81a4 Mon Sep 17 00:00:00 2001 From: Rick Companje Date: Wed, 2 Jun 2021 17:52:44 +0200 Subject: [PATCH 2/2] Update Thumb.js --- src/js/components/Thumb.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/components/Thumb.js b/src/js/components/Thumb.js index f71571f..09b8b44 100644 --- a/src/js/components/Thumb.js +++ b/src/js/components/Thumb.js @@ -39,14 +39,15 @@ const styles = { alignItems: 'center' }, label: { - fontSize: '1.2rem', - fontWeight: 'bold', - textTransform: 'uppercase', + fontSize: '1rem', + fontWeight: 'normal', + textTransform: 'none', display: 'box', overflow: 'hidden', textOverflow: 'ellipsis', boxOrient: 'vertical', wordWrap: 'break-word', + maxWidth: '200px', lineClamp: '2' }, openContextMenu: {