diff options
author | binsky <timo@binsky.org> | 2021-08-31 18:14:05 +0300 |
---|---|---|
committer | binsky <timo@binsky.org> | 2021-08-31 18:14:05 +0300 |
commit | 930d8bbb90ec597c63cbac5596002a5a0b0370d9 (patch) | |
tree | 5f45d0fa2a36ef42ac84389feb7f6d3c09e36696 /js/app | |
parent | cc6cca30b5efbbd75a0d6a23b54d7ed309b4a7fa (diff) |
improve icon picker icon loading #712
Signed-off-by: binsky <timo@binsky.org>
Diffstat (limited to 'js/app')
-rw-r--r-- | js/app/directives/iconpicker.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/js/app/directives/iconpicker.js b/js/app/directives/iconpicker.js index 210dfacb..e6a78f7d 100644 --- a/js/app/directives/iconpicker.js +++ b/js/app/directives/iconpicker.js @@ -137,12 +137,8 @@ scope.credential.icon.type = data.substring(data.lastIndexOf(":")+1,data.lastIndexOf(";")); scope.credential.icon.content = data.substring(data.lastIndexOf(",")+1, data.length); }else{ - $http.get(scope.selectedIcon.url).then(function(result) { - var base64Data = window.btoa(result.data); - var mimeType = 'svg+xml'; - scope.credential.icon.type = mimeType; - scope.credential.icon.content = base64Data; - }); + scope.credential.icon.type = 'svg+xml'; + scope.credential.icon.content = scope.selectedIcon.data; } $('#iconPicker').dialog('close'); }; |