From a9b018b39f6b20e621038e29aa15d106a72ffc6c Mon Sep 17 00:00:00 2001 From: Vincenzo Cestone Date: Wed, 30 Mar 2022 16:40:55 +0200 Subject: [PATCH] Removed from d4s storage the fa dependency --- storage/d4s-storage.js | 20 ++++++++------------ storage/img/file-earmark.svg | 3 +++ storage/img/filetype-pdf.svg | 3 +++ storage/img/folder.svg | 3 +++ storage/img/image.svg | 4 ++++ 5 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 storage/img/file-earmark.svg create mode 100644 storage/img/filetype-pdf.svg create mode 100644 storage/img/folder.svg create mode 100644 storage/img/image.svg diff --git a/storage/d4s-storage.js b/storage/d4s-storage.js index ed7a860..ce4f414 100644 --- a/storage/d4s-storage.js +++ b/storage/d4s-storage.js @@ -6,8 +6,8 @@ class D4SStorageHtmlElement extends HTMLElement { #d4s = null #d4smissmsg = 'Required d4s-boot-2 component not found' - //#baseurl = 'https://api.dev.d4science.org' - #baseurl = 'https://storagehub.pre.d4science.net/storagehub/workspace' + #baseurl = 'https://api.d4science.org/workspace' + //#baseurl = 'https://storagehub.pre.d4science.net/storagehub/workspace' constructor() { super() @@ -17,11 +17,7 @@ class D4SStorageHtmlElement extends HTMLElement { const linkElem1 = document.createElement('link') linkElem1.setAttribute('rel', 'stylesheet') linkElem1.setAttribute('href', 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css') - const linkElem2 = document.createElement('link') - linkElem2.setAttribute('rel', 'stylesheet') - linkElem2.setAttribute('href', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css') root.appendChild(linkElem1) - root.appendChild(linkElem2) } get d4s() { @@ -53,7 +49,7 @@ class D4SStorageHtmlElement extends HTMLElement { * Builds storagehub VREFolder tree * ` + var i = `` if (item['@class'].includes('FolderItem')) { - i = `` + i = `` } else if (item['@class'].includes('ImageFile')) { - i = `` + i = `` } else if (item['@class'].includes('PDFFileItem')) { - i = `` + i = `` } return '' + i + '' } diff --git a/storage/img/file-earmark.svg b/storage/img/file-earmark.svg new file mode 100644 index 0000000..c3d086b --- /dev/null +++ b/storage/img/file-earmark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/storage/img/filetype-pdf.svg b/storage/img/filetype-pdf.svg new file mode 100644 index 0000000..e1fc9b6 --- /dev/null +++ b/storage/img/filetype-pdf.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/storage/img/folder.svg b/storage/img/folder.svg new file mode 100644 index 0000000..fd4dc5a --- /dev/null +++ b/storage/img/folder.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/storage/img/image.svg b/storage/img/image.svg new file mode 100644 index 0000000..facacee --- /dev/null +++ b/storage/img/image.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file