This commit is contained in:
casper 2021-06-02 21:23:11 +02:00
commit 16130954f3
2 changed files with 9 additions and 5 deletions

View File

@ -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 },

View File

@ -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: {