Skip to content

Commit

Permalink
Working file encoding with yew
Browse files Browse the repository at this point in the history
  • Loading branch information
PKopel committed Nov 27, 2023
1 parent d098d25 commit ccd3d2e
Show file tree
Hide file tree
Showing 7 changed files with 306 additions and 124 deletions.
177 changes: 157 additions & 20 deletions Cargo.lock

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

10 changes: 3 additions & 7 deletions filegram-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ edition = "2021"
[dependencies]
filegram = { path = "../filegram" }

# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = "0.1.7"
getrandom = { version = "0.2.11", features = ["js"] }
js-sys = "0.3.65"
image = "0.24.7"
gloo-worker = "0.5.0"
serde = "1.0.163"
web-sys = { version = "0.3.63", features = [
"File",
Expand All @@ -29,4 +23,6 @@ wasm-bindgen = "0.2.86"
futures = "0.3.28"
yew = { version = "0.20.0", features = ["csr"] }
serde-wasm-bindgen = "0.6.0"
base64 = "0.13.0"
gloo = "0.10.0"
gloo-file = "0.3.0"
base64 = "0.21.5"
7 changes: 7 additions & 0 deletions filegram-web/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
img {
padding: 10px;
}

.img {
padding: 10px;
}
14 changes: 6 additions & 8 deletions filegram-web/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Filegram</title>

<link data-trunk rel="rust" data-type="worker" data-wasm-opt="z" data-bin="filegram_worker" data-weak-refs
data-loader-shim />
<link data-trunk rel="rust" data-wasm-opt="z" data-bin="filegram_app" />
<link data-trunk rel="css" href="/css/style.css">
</head>

<body>
<div id="root"></div>

</body>

</html>
21 changes: 0 additions & 21 deletions filegram-web/src/codec.rs

This file was deleted.

Loading

0 comments on commit ccd3d2e

Please sign in to comment.