Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
chore;
Browse files Browse the repository at this point in the history
  • Loading branch information
zsmatrix62 committed Mar 1, 2022
1 parent 38f18c7 commit 6591c42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the [release page](https://github.com/echoo-app/echoo-app/releases).

----

![](docs/json-1.png)
![](docs/img/json-1.png)

-----

Expand Down
5 changes: 2 additions & 3 deletions web-src/src/app/tool-blocks/base64serde.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,20 @@ export const Base64SerdeStringBlockBlock = () => {
;

export const Base64SerdeImageBlockBlock = () => {
const regImgTagSrcBase64 = `<img.*?src=('|")data:image\\/([a-zA-Z]*);base64,([^\\('|")]*) `

const createImage = (data: string) => {
let src = "data:image/jpeg;base64,";
src += data
let newImage = document.createElement("img");
newImage.src = src
newImage.onerror = function (s) {
newImage.onerror = function (_) {
newImage.src = ""
}
return newImage
}

const [base64SourceType, setBase64SourceType] = useObservableState<number>((obs) => {
obs.subscribe(t => {
obs.subscribe(_ => {
onInValueChanged("")
})
return obs
Expand Down

0 comments on commit 6591c42

Please sign in to comment.