Skip to content

Commit

Permalink
fix: remove buffer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Jan 2, 2024
1 parent 30e6f64 commit 1914717
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 69 deletions.
65 changes: 0 additions & 65 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@vue-flow/controls": "1.0.6",
"@vue-flow/core": "1.14.3",
"bootstrap": "^5.3.2",
"buffer": "^6.0.3",
"humanize-duration": "^3.31.0",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
Expand Down
5 changes: 2 additions & 3 deletions src/components/misc/TaskIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
</div>
</template>
<script>
import {Buffer} from "buffer";
import Tooltip from "../misc/Tooltip.vue";
import {cssVariable} from "../../utils/global.js";
Expand Down Expand Up @@ -52,7 +51,7 @@
}
},
imageBase64() {
let icon = this.icon && this.icon.icon ? Buffer.from(this.icon.icon, "base64").toString("utf8") : undefined;
let icon = this.icon && this.icon.icon ? window.atob(this.icon.icon) : undefined;
if (!icon) {
icon = "<svg xmlns=\"http://www.w3.org/2000/svg\" " +
Expand All @@ -73,7 +72,7 @@
icon = icon.replaceAll("currentColor", color);
return Buffer.from(icon, "utf8").toString("base64");
return window.btoa(icon);
},
icon() {
return this.cls ? (this.icons || {})[this.cls] : this.customIcon;
Expand Down

0 comments on commit 1914717

Please sign in to comment.