diff --git a/app/resources/svg/google-drive.svg b/app/resources/svg/google-drive.svg new file mode 100644 index 00000000..cd8dd52a --- /dev/null +++ b/app/resources/svg/google-drive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/resources/svg/onedrive.svg b/app/resources/svg/onedrive.svg new file mode 100644 index 00000000..e179dfa7 --- /dev/null +++ b/app/resources/svg/onedrive.svg @@ -0,0 +1 @@ + diff --git a/app/scripts/hbs-helpers/index.js b/app/scripts/hbs-helpers/index.js index a7b23692..0a916cfa 100644 --- a/app/scripts/hbs-helpers/index.js +++ b/app/scripts/hbs-helpers/index.js @@ -4,3 +4,4 @@ import 'hbs-helpers/ifeq'; import 'hbs-helpers/ifneq'; import 'hbs-helpers/ifemptyoreq'; import 'hbs-helpers/res'; +import 'hbs-helpers/svg'; diff --git a/app/scripts/hbs-helpers/svg.js b/app/scripts/hbs-helpers/svg.js new file mode 100644 index 00000000..27b9b8b6 --- /dev/null +++ b/app/scripts/hbs-helpers/svg.js @@ -0,0 +1,9 @@ +import Handlebars from 'hbs'; + +Handlebars.registerHelper('svg', (name, cls) => { + const icon = require(`svg/${name}.svg`).default; + if (cls) { + return `'; + iconSvg = 'google-drive'; _baseUrl = 'https://www.googleapis.com/drive/v3'; _baseUrlUpload = 'https://www.googleapis.com/upload/drive/v3'; diff --git a/app/scripts/storage/impl/storage-onedrive.js b/app/scripts/storage/impl/storage-onedrive.js index 71f3f73d..a6be08e9 100644 --- a/app/scripts/storage/impl/storage-onedrive.js +++ b/app/scripts/storage/impl/storage-onedrive.js @@ -10,18 +10,7 @@ class StorageOneDrive extends StorageBase { name = 'onedrive'; enabled = true; uipos = 40; - iconSvg = - ''; + iconSvg = 'onedrive'; _baseUrl = 'https://graph.microsoft.com/v1.0/me'; diff --git a/app/templates/open.hbs b/app/templates/open.hbs index 66e2601e..c5427121 100644 --- a/app/templates/open.hbs +++ b/app/templates/open.hbs @@ -39,7 +39,7 @@